To the DataObject.Pasting event in the Textbox I want to assign the TextBoxPasting function which is located in the viewmodel (MVVM pattern). Unfortunately the code does not work. I use the library:
xmlns:behaviours="http://schemas.microsoft.com/xaml/behaviors".
View - code:
To the DataObject.Pasting event in the Textbox I want to assign the TextBoxPasting function which is located in the viewmodel (MVVM pattern). Unfortunately the code does not work. I use the library: xmlns:behaviours="http://schemas.microsoft.com/xaml/behaviors". View - code: [code]
[/code] ViewModel - code: [code]public class MechanicViewModel : ViewModelBase, IMechanicViewModel { private static readonly Regex _regex = new Regex("[^0-9.-]+");
public MechanicViewModel() { DataObjectPastingCommand = new DelegateCommand(TextBoxPasting); }
public DelegateCommand DataObjectPastingCommand { get; private set; }