Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyPathClass
- {
- public static readonly DependencyProperty MyShapeProperty = DependencyProperty.RegisterAttached("MyShape", typeof(Geometry), typeof(MyPathClass), new FrameworkPropertyMetadata(OnMyShapeChanged()));
- private static void OnMyShapeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
- {
- (MyPathClass)d.MyShape = e.NewValue;
- }
- public Geometry MyShape
- {
- get
- {
- return (Geometry)GetValue(MyShapeProperty);
- }
- set
- {
- //Вот сюда без OnMyShapeChanged отказывается заходить
- SetValue(MyShapeProperty, Value);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement