Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Button Command="{Binding AlertCommand}"></Button>
- public RelayCommand AlertCommand { get; set; }
- public void Alert()
- {
- MessageBox.Show("message");
- }
- <Button PreviewMouseLeftButtonUp="OnMouseLeftButtonUp"></Button>
- private void OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
- {
- var ctx = (MainViewModel) this.DataContext;
- ctx.Alert();
- }
Add Comment
Please, Sign In to add comment