I have a textbox in which I am handling its text changed event.Now when I click button I want to clear the text from the textbox.
Now when I have text in the textbox and when I call my command the text is not cleared.
xaml
   <TextBox   Text="{Binding SearchText,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" Name="mytxtBox">
        <TextBox.InputBindings>
            <KeyBinding Command="{Binding Path=SearchCommand}" CommandParameter="{Binding ElementName=mytxtBox, Path=Text}" Key="Enter"/>
        </TextBox.InputBindings>
    </TextBox>
ViewModel
   public string SearchText
    {
        get
        {
            return TypedText;
        }
        set
        {
             TypedText=value;
                if (string.IsNullOrEmpty(TypedText.ToString()))// This is called when the text is empty
                {
                    Some Logic//
                }             
            SetProperty(ref TypedText, value);   
        }
    }
    private void MyCommandExecuted(string text)
    {
        SearchText= string.Empty;
    }
 
     
    