2012-02-22

My Libraries are your libraries.

I say that because on this website you will find many C# & WPF libraries for the daily development.

The libraries have several benefits: - well and complete documentation, - detailed description pages, - intellisense and debugging symbols, - open source, - for free for any kind of application. Each library is licensed under the MIT License.

If you for example develop with the MVVM pattern or search for controls which are not inside the .Net framework, you should have a look into the libraries on this page. In most cases you will find an appropriate and reasonable solution. If you just need one control instead of a whole library, you have the freedome to take the sources and copy them into your project.

If you have any question, any problem, need an idea how to solve a problem, have any problem using a library, found an issue or just miss anything, don't hesitate and contact me, I will try to help you.

News

Forwarding Win API Messages to a ICommand

The WPF Window has the problem that not all events from the Win API are represented by a C# event. For example the right click in the title bar or just moving the window itself.
To get such events I have created the WindowBehavior in the DW.SharpTools.

Now, to have the same connected to ICommands, I have added two attach dependency properties to the WindowBehavior in the DW.Interactivity.
With them it is possible to say which Win API events will be forwarded to a command by the IDs. For instance:

<Window Interactivity:WindowBehavior.WinApiMessages="0x216;0x214"
 Interactivity:WindowBehavior.WinApiCommand="{Binding WinApiCommand}">
</Window>
public partial class DemoWindow : Window
{
 public DemoWindow()
 {
  WinApiCommand = new DelegateCommand(WinApi);
 }

 public ICommand WinApiCommand { get; set; }
 private void WinApi(object arg)
 {
  var e = (NotifyEventArgs)arg;
  if (e.MessageId == WindowMessages.WM_MOVING)
  //...
 }
}

The messages can be written in hex values like Microsoft write them in the MSDN like "0x216;0x214" but also the integers are possible, like "3;4".
To get all Win API messages, just "All" have to be written.

 

Facts:

Library: DW.Interactivity
Version: 12.1.7.0
Date: 2012-1-9 18:24