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
In the last days I have worked on the next point on my to do list.
Everybody should know my PagingControl
, 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
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
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
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