In the following steps, we will build a simple application that will create and execute a multi trigger based on some conditions and change the Foreground and Background properties of the TextBox controls:
- Open the MainWindow.xaml file.
- Replace the default Grid panel with a vertical StackPanel.
- Add two TextBox controls inside the panel and set their Text property to represent some text. Here's the XAML that we will be using in this example:
<StackPanel> <TextBox Text="Focus your cursor here" FontSize="20" HorizontalAlignment="Stretch" VerticalAlignment="Center" Height="30" Margin="4"/> <TextBox Text="Focus your cursor here" FontSize="20" HorizontalAlignment="Stretch" VerticalAlignment="Center" Height="30"...