Files
test_demo/MX-PD-盘古 - new/PanGu.DieBonderApp/MainShell/Resources/CustomControl/DieMapPreviewWindow.xaml.cs

105 lines
3.0 KiB
C#
Raw Normal View History

using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
namespace MainShell.Resources.CustomControl
{
public partial class DieMapPreviewWindow : Window
{
public static readonly DependencyProperty CaptionProperty =
DependencyProperty.Register("Caption", typeof(string), typeof(DieMapPreviewWindow), new PropertyMetadata(string.Empty));
public static readonly DependencyProperty MapModelProperty =
DependencyProperty.Register("MapModel", typeof(DieMapModel), typeof(DieMapPreviewWindow), new PropertyMetadata(null));
public static readonly DependencyProperty DieSizeProperty =
DependencyProperty.Register("DieSize", typeof(double), typeof(DieMapPreviewWindow), new PropertyMetadata(8.0));
public static readonly DependencyProperty SpacingProperty =
DependencyProperty.Register("Spacing", typeof(double), typeof(DieMapPreviewWindow), new PropertyMetadata(1.0));
public static readonly DependencyProperty MapBackgroundProperty =
DependencyProperty.Register("MapBackground", typeof(Brush), typeof(DieMapPreviewWindow), new PropertyMetadata(new SolidColorBrush(Color.FromRgb(229, 231, 235))));
public static readonly DependencyProperty DieClickedCommandProperty =
DependencyProperty.Register("DieClickedCommand", typeof(ICommand), typeof(DieMapPreviewWindow), new PropertyMetadata(null));
public string Caption
{
get
{
return (string)GetValue(CaptionProperty);
}
set
{
SetValue(CaptionProperty, value);
}
}
public DieMapModel MapModel
{
get
{
return (DieMapModel)GetValue(MapModelProperty);
}
set
{
SetValue(MapModelProperty, value);
}
}
public double DieSize
{
get
{
return (double)GetValue(DieSizeProperty);
}
set
{
SetValue(DieSizeProperty, value);
}
}
public double Spacing
{
get
{
return (double)GetValue(SpacingProperty);
}
set
{
SetValue(SpacingProperty, value);
}
}
public Brush MapBackground
{
get
{
return (Brush)GetValue(MapBackgroundProperty);
}
set
{
SetValue(MapBackgroundProperty, value);
}
}
public ICommand DieClickedCommand
{
get
{
return (ICommand)GetValue(DieClickedCommandProperty);
}
set
{
SetValue(DieClickedCommandProperty, value);
}
}
public DieMapPreviewWindow()
{
InitializeComponent();
}
}
}