How to clear text box on click in MVVM
问题 I have a textbox and a button I want to clear the contents of textbox on button click. I am using MVVM prism. My XAML is <TextBox Grid.Row="0" Text="{Binding Path=TextProperty,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" Name="txtUserEntry2"/> <Button Content="Select" Command="{Binding Path=MyCommand}" /> and In my View Model public string TextProperty { get { return selectedText; } set { selectedText = value; SetProperty(ref selectedText, value); } } //////......... private void