2017-01-09 13:25:52 +03:00
|
|
|
|
using System;
|
2017-02-18 00:15:59 +03:00
|
|
|
|
using System.ComponentModel;
|
2017-01-09 13:25:52 +03:00
|
|
|
|
using System.Globalization;
|
|
|
|
|
|
using System.Windows;
|
|
|
|
|
|
using System.Windows.Controls;
|
|
|
|
|
|
using System.Windows.Data;
|
|
|
|
|
|
|
2017-08-31 12:55:09 +03:00
|
|
|
|
namespace BrightSharp.Diagrams
|
2017-01-09 13:25:52 +03:00
|
|
|
|
{
|
2017-02-18 00:15:59 +03:00
|
|
|
|
|
|
|
|
|
|
[ToolboxItem(false)]
|
2017-01-09 13:25:52 +03:00
|
|
|
|
public class SizeChrome : Control
|
|
|
|
|
|
{
|
|
|
|
|
|
static SizeChrome()
|
|
|
|
|
|
{
|
2017-08-31 12:55:09 +03:00
|
|
|
|
DefaultStyleKeyProperty.OverrideMetadata(typeof(SizeChrome), new FrameworkPropertyMetadata(typeof(SizeChrome)));
|
2017-01-09 13:25:52 +03:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class DoubleFormatConverter : IValueConverter
|
|
|
|
|
|
{
|
|
|
|
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
|
|
|
|
{
|
|
|
|
|
|
double d = (double)value;
|
|
|
|
|
|
if (double.IsNaN(d)) return "(Auto)";
|
|
|
|
|
|
return Math.Round(d);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
|
|
|
|
{
|
|
|
|
|
|
return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|