56 lines
1.3 KiB
C#
56 lines
1.3 KiB
C#
using CopaData.FileInspector.GUI.TilingPanels.Models;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
|
|
namespace CopaData.FileInspector.GUI.TilingPanels.Controls;
|
|
|
|
public class TilingPanelControl : Control
|
|
{
|
|
static TilingPanelControl()
|
|
{
|
|
DefaultStyleKeyProperty.OverrideMetadata(
|
|
typeof(TilingPanelControl),
|
|
new FrameworkPropertyMetadata(typeof(TilingPanelControl)));
|
|
}
|
|
|
|
public TilingPanelControl()
|
|
{
|
|
|
|
}
|
|
|
|
#region DependencyProperties
|
|
|
|
public Orientation SplitOrientation => Panel.SplitOrientation;
|
|
|
|
public TilingNode Alpha => Panel.Alpha;
|
|
public TilingNode? Beta => Panel.Beta;
|
|
|
|
public TilingPanel Panel
|
|
{
|
|
get => (TilingPanel)GetValue(PanelProperty);
|
|
set => SetValue(PanelProperty, value);
|
|
}
|
|
|
|
public static DependencyProperty PanelProperty = DependencyProperty
|
|
.Register(nameof(Panel),
|
|
typeof(TilingPanel),
|
|
typeof(TilingPanelControl),
|
|
new PropertyMetadata(null));
|
|
|
|
public double SplitterWidth
|
|
{
|
|
get => (double)GetValue(SplitterWidthProperty);
|
|
set => SetValue(SplitterWidthProperty, value);
|
|
}
|
|
|
|
public static DependencyProperty SplitterWidthProperty = DependencyProperty
|
|
.Register(
|
|
nameof(SplitterWidth),
|
|
typeof(double),
|
|
typeof(TilingPanelControl),
|
|
new PropertyMetadata(6.0));
|
|
|
|
#endregion
|
|
}
|
|
|