Advertisement
BradleyUffner

Untitled

May 11th, 2017
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. public class MvvmCommandBindings : DependencyObject
  2. {
  3. public static readonly DependencyProperty CommandsProperty =
  4. DependencyProperty.RegisterAttached("Commands",
  5. typeof(List<MvvmCommandBinding>),
  6. typeof(MvvmCommandBindings),
  7. new FrameworkPropertyMetadata(new List<MvvmCommandBinding>()));
  8.  
  9.  
  10. public static void SetCommands(UIElement element, List<MvvmCommandBinding> value)
  11. {
  12. element.SetValue(CommandsProperty,value);
  13. }
  14.  
  15. public static List<MvvmCommandBinding> GetCommands(UIElement element)
  16. {
  17. return (List<MvvmCommandBinding>) element.GetValue(CommandsProperty);
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement