so I have an Textbox on which I binded an Property that is named: Artikelnummer
In the Property of Artikelnummer I have some code in the set part, but after my code I want to select the whole Text of the Textbox where the Property is Binded to.
How can I select the text of the Textbox from the ViewModel binded Property?
Like I have this Textbox:
<TextBox x:Name="txtReferenzartikelnummer" Grid.Column="1" Style="{StaticResource WatermarkErrorTooltip}" HorizontalAlignment="Stretch"
Height="32" TextWrapping="Wrap" Tag="Artikelnummer" VerticalAlignment="Center" Margin="0,0,31,0" Text="{Binding Artikelnummer}
KeyUp="txtWechselEnter_KeyUP"/>
string _Artikelnummer;
public string Artikelnummer
{
get { return _Artikelnummer; }
set
{
_Artikelnummer = value;
//my code
//here it should selectAll text of the Textbox
}
}`
Anyone an Idea?