Hi Markus.
please, use Internet!
In WPF, what are the differences between the x:Name and Name attributes?
Input --- Check IsOK
Set Trigger to "Check IsOK" like this:
<DataTrigger Binding="{Binding CheckIsOk}" Value="True">
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
How can I get the focus to move to the text field xy after an event?
How can I achieve that after an event the focus is automatically set on button A or button B?
In case of success, move on or in case of error MessageBox and stay in the text field.
Regards Markus
Hi Markus.
please, use Internet!
In WPF, what are the differences between the x:Name and Name attributes?
Input --- Check IsOK
Set Trigger to "Check IsOK" like this:
<DataTrigger Binding="{Binding CheckIsOk}" Value="True">
Hi Markus,
for each UIElement con can set FocusManager.FocusedElement and Trigger to set focus to next UIElement like this:
<DataTrigger Binding="{Binding ElementName=firstTextBox, Path=Text.Length}" Value="1">
<Setter Property="FocusManager.FocusedElement" Value="{Binding ElementName=secondTextBox}"/>
</DataTrigger>
<TextBox Grid.Row="0" Grid.Column="1"
Text="{Binding Path=ScannedMagazin, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
HorizontalAlignment="Left" Height="33" Margin="54,236,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="621" FontSize="20" >
<TextBox.InputBindings>
<KeyBinding Command="{Binding Cmd}" CommandParameter="PressEnterScannedMagazine" Key="Enter" />
</TextBox.InputBindings>
</TextBox>
<DataTrigger Binding="{Binding ElementName=firstTextBox, Path=Text.Length}" Value="1">
<Setter Property="FocusManager.FocusedElement" Value="{Binding ElementName=secondTextBox}"/>
</DataTrigger>
Sorry it is not clear.
firstTextBox is the name of the textbox?
Value="1"
Two possibilities.
If the content of the textbox is good, select the button X.
If the content of the text box is good, select the text box Y. Can you make a whole sample please?
Hi,
what is different between Name and x:Name?
<TextBox Grid.Row="0" Grid.Column="0" x:Name="txtNewOrder"
Text="{Binding Path=NewOrderScan, Mode=TwoWay,
I need like a function for validate, not only the length.
Works with length 6, but I need not the length.
Input --- Check IsOK?, if OK goes to next textbox or set the focus for button XY.