public partial class MyControl : UserControl
{
public static readonly DependencyProperty FileProperty = DependencyProperty.Register(
nameof(File),
typeof(File),
typeof(MyControl),
new PropertyMetadata(default(File)));
public MyControl()
{
this.InitializeComponent();
}
public File File
{
get { return (File)this.GetValue(FileProperty); }
set { this.SetValue(FileProperty, value); }
}
}