我为我的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>
这是(正确的)结果:
但有时候露出效果并没有显示出来:
为什么会这样?如何在任何时候强制执行揭示效果?