1
У меня есть две кнопки. Как включить вторую кнопку после нажатия первой кнопки, используя только xaml.Триггер для включения кнопки
<Window.Resources>
<Style x:Key="NewButtonStyle" TargetType="{x:Type Button}">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=SecondButton, Path=IsEnabled,Mode=TwoWay}" Value="True">
<Setter Property="IsEnabled" Value="True"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid>
<Button x:Name="FirstButton" Content="Button" HorizontalAlignment="Left" Margin="10,22,0,0" VerticalAlignment="Top" Width="75" Style="{StaticResource NewButtonStyle}"/>
<Button x:Name="SecondButton" Content="Button" HorizontalAlignment="Left" Margin="105,22,0,0" VerticalAlignment="Top" Width="75" IsEnabled="False"/>
</Grid>