Format:
Recent snippets matching tags of MVVM
public abstract class ViewModelBase : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; protected void RaisePropertyChanged(string property) { if (PropertyChanged == null) return; PropertyChanged(this, new PropertyChangedEventArgs(property)); PropertyChanged(this,
99 Views
no comments
public class DelegateCommand : ICommand { private readonly Predicate<object> _canExecute; private readonly Action<object> _execute; public event EventHandler CanExecuteChanged; public DelegateCommand(Action<object> execute) : this(execute, null) {
152 Views
no comments
//Calling Code for VM to pass message box delegate Func<string, string, MessageBoxButton, MessageBoxImage, MessageBoxResult> messageBox = (msg, caption, buttons, image) => MessageBox.Show(msg, caption, buttons, image); //pass above variable to VM //Usage of message box delegate variable inside VM MessageBoxResult = messageBoxinVM("Test Message", "Test Caption for Message", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
289 Views
no comments
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Windows.Data; namespace VMLocatorSample.ViewModels { public class ViewModelLocator
1023 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
