|
using System.Windows.Markup;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows;
namespace SelectionAreaSample
{
public sealed class EllipseGeometryConverter : MarkupExtension, IMultiValueConverter
{
public override object ProvideValue(System.IServiceProvider serviceProvider)
{
return this;
}
#region IMultiValueConverter Members
public object Convert(object[] values, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return new EllipseGeometry(new Rect((Point)values[0], (Point)values[1]));
}
public object[] ConvertBack(object value, System.Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
{
throw new System.NotImplementedException();
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.