Guest User

Untitled

a guest
Jan 18th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. <Button Command="{Binding AlertCommand}"></Button>
  2.  
  3. public RelayCommand AlertCommand { get; set; }
  4.  
  5. public void Alert()
  6. {
  7. MessageBox.Show("message");
  8. }
  9.  
  10. <Button PreviewMouseLeftButtonUp="OnMouseLeftButtonUp"></Button>
  11.  
  12. private void OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
  13. {
  14. var ctx = (MainViewModel) this.DataContext;
  15. ctx.Alert();
  16. }
Add Comment
Please, Sign In to add comment