Projektdateien hinzufügen.
This commit is contained in:
46
VideoBrowser/Helpers/BindingProxy.cs
Normal file
46
VideoBrowser/Helpers/BindingProxy.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
namespace VideoBrowser.Helpers
|
||||
{
|
||||
using System.Windows;
|
||||
|
||||
/// <summary>
|
||||
/// Defines the <see cref="BindingProxy" />.
|
||||
/// </summary>
|
||||
public class BindingProxy : Freezable
|
||||
{
|
||||
#region Fields
|
||||
|
||||
/// <summary>
|
||||
/// The binding data context property.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty DataProperty =
|
||||
DependencyProperty.Register(nameof(DataContext), typeof(object), typeof(BindingProxy), new UIPropertyMetadata(null));
|
||||
|
||||
#endregion Fields
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the DataContext.
|
||||
/// </summary>
|
||||
public object DataContext
|
||||
{
|
||||
get { return GetValue(DataProperty); }
|
||||
set { SetValue(DataProperty, value); }
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// The CreateInstanceCore.
|
||||
/// </summary>
|
||||
/// <returns>The <see cref="Freezable"/>.</returns>
|
||||
protected override Freezable CreateInstanceCore()
|
||||
{
|
||||
return new BindingProxy();
|
||||
}
|
||||
|
||||
#endregion Methods
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user