Introduction
This page and the source code will be updated from time to time, so bookmark it and stay tuned.
Since the library is a work in progress, there could be a few undocumented classes and files. Ignore them please, or use at your risk. If it is not documented, it is probably not finished or not working properly yet.
Of course, the code can be used free of charge provided that the copyright statements stay intact. And of course, Michael Agroskin accepts no responsibility whatsoever for any crashes, errors, or data losses occurring as a result of using this library. Hopefully, there will be no such things, but better be safe than sorry.
Anyway, I hope that you will find those utility classes and controls very useful. At least, it won’t hurt you to take a look and maybe to learn something new. I created those classes out of sheer desperation when nothing else worked, and I have to use some of them every time I write the WPF stuff.
Library
- {}
Adorners
- AdornerUtils.cs
- TemplatedAdorner.cs
- {}
Animations
- {}
AutoComplete
- {}
Behaviours
- EventBehaviourFactory.cs - Provides utility classes making it easy to execute commands when routed (or regular .NET) events are raised on WPF elements. Example of usage:
public static class TextBoxBehaviour
{
public static readonly DependencyProperty TextChangedCommand =
RoutedEventBehaviourFactory.CreateCommandExecutionEventBehaviour
(TextBox.TextChangedEvent,
"TextChangedCommand", typeof (TextBoxBehaviour));
public static void SetTextChangedCommand
(DependencyObject o, ICommand value)
{
o.SetValue(TextChangedCommand, value);
}
public static ICommand GetTextChangedCommand(DependencyObject o)
{
return o.GetValue(TextChangedCommand) as ICommand;
}
public static readonly DependencyProperty TextChangedCommandParameter =
RoutedEventBehaviourFactory.CreateCommandParameter(TextChangedCommand);
public static void SetTextChangedCommandParameter
(DependencyObject o, object value)
{
o.SetValue(TextChangedCommandParameter, value);
}
public static object GetTextChangedCommandParameter(DependencyObject o)
{
return o.GetValue(TextChangedCommandParameter);
}
}
<textbox xxx:textchangedcommandparameter="{Binding ...}"
xxx:textchangedcommand="{Binding SomeCommand}" />
- {}
Bindings
- {}
Collections
- {}
Commands
- {}
Common
- {}
Converters
- AddConverter.cs
- BooleanValueConverter.cs
- BrushValueConverter.cs
- ByteValueConverter.cs
- CharValueConverter.cs
- ColorValueConverter.cs
- CombineFlagsConverter.cs
- ConverterEnums.cs
- DateTimeValueConverter.cs
- DecimalValueConverter.cs
- DelegateConverter.cs
- DelegateMultiConverter.cs
- DoubleValueConverter.cs
- EditableFlagsToBooleanConverter.cs
- EnumToBooleanConverter.cs
- EnumValueConverter.cs
- FlagsToBooleanConverter.cs
- GridLengthValueConverter.cs
- NotConverter.cs
- ObjectToObjectConverter.cs
- ThicknessValueConverter.cs
- TimeSpanValueConverter.cs
- {}
Delegates
- {}
DragDrop
- DataConsumer.cs
- DataConsumerFactory.cs
- DataObjectBase.cs
- DataProvider.cs
- DataProviderFactory.cs
- DataTransfer.cs
- DragDropConsts.cs
- {}
Extensions
- {}
Helpers
- DelayedAction.cs
- DelegateEqualityComparer.cs
- DummyTypeConverter.cs
- LookupItem.cs
- Ref.cs
- Serializer.cs
- WindowBehavior.cs
- {}
Menus
- CompositeContextMenu.cs
- CompositeMenu.cs
- CompositeMenuItem.cs
- FlatteningMenuItems.cs
- {}
ReadOnly
- ReadOnlyClone.cs
- ReadOnlyCloneFactory.cs
- {}
Threading
- MultiThreadedWrapper.cs
- ThreadedVisualHelper.cs
- ThreadingUtils.cs
- {}
Visuals
- VisualTargetPresentationSource.cs
- VisualWrapper.cs
- {}
WeakEvents