<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wpfApplication1="clr-namespace:WpfApplication1"
Title="MainWindow" Height="350" Width="525">
<Grid wpfApplication1:NewPropertyHelper.Prop="{Binding}">
</Grid>
</Window>
namespace WpfApplication1
{
public static class NewPropertyHelper
{
public static readonly DependencyProperty PropProperty = DependencyProperty.RegisterAttached("Prop", typeof (object), typeof (NewPropertyHelper), new PropertyMetadata(default(object)));
public static object GetProp(UIElement element)
{
return (object) element.GetValue(PropProperty);
}
public static void SetProp(UIElement element, object value)
{
element.SetValue(PropProperty, value);
}
}
}