I have a textbox binded to one of my viewModel's properties
<TextBox x:Name="box" Height="20" TextWrapping="Wrap" Text="{Binding name}"/>
viewModel.cs:
public string name { get; set; }
[...]
public void clear(){
name = "";
}
AddCommand: Icommand class:
public void Execute(object parameter){
//do some stuff
viewModel.clear();
}
Everything else works perfect. I can read the textbox's and use them to do some calculation in viewModel then bind those calculation to labels to display. But I just cant clear those textbox after I read them. I tried setting the binding to mode=twoway but still doesn't work