Назначает функцию PreviewTextInput в Texbox, сохраняя шаблон WPF. ⇐ C#
-
Anonymous
Назначает функцию PreviewTextInput в Texbox, сохраняя шаблон WPF.
I have a window named MechanicView.xaml and its back-end that is MechanicView.xaml.cs. The MechanicView.xaml window is connected via DataContext to the MechanicViewModel.cs file. The MechanicView.xaml window contains a TextBox with a PreviewTextInput event. How do I assign a function to the PreviewTextInput event that will be in the MechanicViewModel.cs file? I want to keep the MVVM pattern so I want to avoid creating a function in the MechanicView.xaml.cs file
Источник: https://stackoverflow.com/questions/780 ... pf-pattern
I have a window named MechanicView.xaml and its back-end that is MechanicView.xaml.cs. The MechanicView.xaml window is connected via DataContext to the MechanicViewModel.cs file. The MechanicView.xaml window contains a TextBox with a PreviewTextInput event. How do I assign a function to the PreviewTextInput event that will be in the MechanicViewModel.cs file? I want to keep the MVVM pattern so I want to avoid creating a function in the MechanicView.xaml.cs file
Источник: https://stackoverflow.com/questions/780 ... pf-pattern
Мобильная версия