Advertisement
Guest User

Untitled

a guest
Aug 15th, 2011
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 KB | None | 0 0
  1. class SplitToFour
  2. {
  3.     public static readonly DependencyProperty FirstProperty =
  4.            DependencyProperty.Register(
  5.                "First",
  6.                typeof(string),
  7.                typeof(SplitToFour),
  8.                new PropertyMetadata((d, e) =>
  9.                      { ((SplitToFour)d).UpdateSource(); })));
  10.  
  11.     // the same for other three
  12.  
  13.     public SplitToFour(DependencyObject o, DependencyProperty p)
  14.     {
  15.         DependencyPropertyDescriptor dpd =
  16.             DependencyPropertyDescriptor.FromProperty(p, p.OwnerType));
  17.         dpd.AddValueChanged(o, delegate { UpdateParts(); });
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement