qamp/Qrakhen.TilingFrames/Controls/HostFrameControl.cs

40 lines
964 B
C#

using System.Windows;
using System.Windows.Controls;
using Qrakhen.TilingFrames.Models;
namespace Qrakhen.TilingFrames.Controls;
/// <summary>
/// Control that represents the state of a <see cref="HostFrame"/>,
/// with all the necessary interaction logic tied to it.
/// </summary>
public class HostFrameControl : ContentControl
{
static HostFrameControl()
{
DefaultStyleKeyProperty.OverrideMetadata(
typeof(HostFrameControl),
new FrameworkPropertyMetadata(typeof(HostFrameControl)));
}
public HostFrameControl()
{
}
#region DependencyProperties
public HostFrame Frame {
get => (HostFrame)GetValue(FrameProperty);
set => SetValue(FrameProperty, value);
}
public static DependencyProperty FrameProperty = DependencyProperty
.Register(nameof(Frame),
typeof(HostFrame),
typeof(HostFrameControl),
new PropertyMetadata(null));
#endregion
}