Я определил панель инструментов для своего приложения UWP следующим образом:
<StackPanel Orientation="Horizontal">
<ToggleButton Margin="5,5,0,5" Height="40" Width="30" Style="{StaticResource ToggleButtonRevealStyle}" Background="Transparent" BorderThickness="1,1,0,1" FontFamily="Segoe MDL2 Assets " Content=""/>
<ToggleButton Margin="0,5,5,5" Height="40" Width="30" Style="{StaticResource ToggleButtonRevealStyle}" Background="Transparent" BorderThickness="0,1,1,1" FontFamily="Segoe MDL2 Assets " Content=""/>
<Button Margin="5,5,0,5" Height="40" Width="30" Style="{StaticResource ButtonRevealStyle}" Background="Transparent" BorderThickness="1,1,0,1" FontFamily="Segoe MDL2 Assets " Content=""/>
<Button Margin="0,5,5,5" Height="40" Width="30" Style="{StaticResource ButtonRevealStyle}" Background="Transparent" BorderThickness="0,1,1,1" FontFamily="Segoe MDL2 Assets " Content=""/>
<TextBox Margin="5" TextAlignment="Center" Height="40" Width="1" BorderThickness="1" Background="Transparent" Padding="7" FontSize="16"/>
<Button Margin="5,5,0,5" Height="40" Width="30" Style="{StaticResource ButtonRevealStyle}" Background="Transparent" BorderThickness="1,1,0,1" FontFamily="Segoe MDL2 Assets " Content=""/>
<Button Margin="0,5,5,5" Height="40" Width="30" Style="{StaticResource ButtonRevealStyle}" Background="Transparent" BorderThickness="0,1,1,1" FontFamily="Segoe MDL2 Assets " Content=""/>
<Button Margin="5" Height="40" Width="40" Style="{StaticResource ButtonRevealStyle}" Background="Transparent" BorderThickness="1" FontFamily="Segoe MDL2 Assets " Content=""/>
<Button Margin="5" Height="40" Width="40" Style="{StaticResource ButtonRevealStyle}" Background="Transparent" BorderThickness="1" FontFamily="Segoe MDL2 Assets " Content=""/>
</StackPanel>
Это (правильный) результат:
Но иногда эффект раскрытия просто не показан:
Почему это так?Как я могу постоянно применять эффект раскрытия?