2012-05-20

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

EllipsedProgressBar renewed for a value display

In the last few days I have worked on the next point on my to-do list. The EllipsedProgressBar was just indeterminate.
To change this I have completely renewed the EllipsedProgressBar, it can show values in a pie form, with just a like or by items provided by an IItemsFactory.

There are many properties available, and a GappedOverlay too. With them nearly every kind of look can be created.

 

Facts:

Library: DW.WPFToolkit
Version: 12.5.13.0
Date: 2012-5-13 09:28

 

Slide animation in PagingControl

In the last days I have worked on the next point on my to do list.

Everybody should know my PagingControl wink, with this several "Pages" can be displayed and scrolled by the "back" and "next" buttons and the small bubbles as well.

Now this control gots an optional slide animation, it can be controlled by two properties, the animation direction and the speed.
Just see the documentation how to use.

 

Facts:

Library: DW.WPFToolkit
Version: 12.4.28.0
Date: 2012-5-1 13:19

 

Easier unregister in the Mediator with tokens

Callback registerd in the Mediator automatically goes removed if the object is destroyed because a weak reference is used internally.
But it is much more clean if the events will be deregistered manually before.

Consider using the Dipose Pattern.

public class Demo : IDisposable
{
	public Demo()
	{
		Mediator.ListenForObject<ItemSelectedEventArgs>(ItemSelected);
	}
	
	private void ItemSelected(object obj)
	{
		var selectedItem = ((ItemSelectedEventArgs)obj).Item;
		DoSomething(selectedItem);
	}
	
	private bool _disposed;
	
	~Demo()
	{
		Dispose(false);
		GC.SuppressFinalize(this);
	}
	
	public Dispose()
	{
		Dispose(true);
	}
	
	private void Dispose(bool disposing)
	{
		if (_disposed)
			return;
		
		if (disposing)
		{
			Mediator.IgnoreForObject<ItemSelectedEventArgs>(ItemSelected);
		}
		
		_disposed = true;
	}
}

The problem with this is that an anonymous method cannot be used because it might not be working for an unregister.

To have the possibility for an anonymous method I have adjusted the signatures. The methods ListenForMessage and ListenForObject now returns a ListenToken.

This token can be passed to the Ignore method and the callback will be removed, no matter if it was a message or an object listener.

public class Demo : IDisposable
{
	private ListenToken _itemSelectedToken;

	public Demo()
	{
		_itemSelectedToken = Mediator.ListenForObject<ItemSelectedEventArgs>(p => DoSomething(((ItemSelectedEventArgs)p).Item);
	}
	
	private bool _disposed;
	
	~Demo()
	{
		Dispose(false);
		GC.SuppressFinalize(this);
	}
	
	public Dispose()
	{
		Dispose(true);
	}
	
	private void Dispose(bool disposing)
	{
		if (_disposed)
			return;
		
		if (disposing)
		{
			Mediator.Ignore(_itemSelectedToken);
		}
		
		_disposed = true;
	}
}

 

 

Facts:

Library: DW.SharpTools
Version: 12.3.17.0
Date: 2012-3-17 18:12

 

Closing of popups on focus switch

I got a report that the popup in my DW.WPFToolkit (e.g. die TreeComboBox) was not closing if the focus of the whole application was switched.

This I have fixed in the DW.SharpTools (the DW.WPFToolkit controls use the PopupHandler object in the DW.SharpTools for this internally).

To get the fix, just load the DW.SharpTools in the 12.2.9.0 version and put it beside the DW.WPFToolkit.

 

Facts:

Library: DW.SharpTools
Version: 12.2.9.0
Date: 2012-2-9 19:50

 

ObservableDictionary added

Sometimes it will be great to have a dictionary bindable to a WPF list.
If you use a normal dictionary you will have no UI update if an item is added, changed or removed. You have to send a property changed for the whole list manually.

Therefore I have added a ObservableDictionary to my DW.SharpTools. It implements the INotifyCollectionChanged and the INotifyPropertyChanged as well.

 

Facts:

Library: DW.SharpTools
Version: 12.2.8.0
Date: 2012-2-8 21:54