Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/311.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# WP上的XAML路径控制行为_C#_Xaml_Windows Phone 8_Windows Phone 8.1_Windows Store Apps - Fatal编程技术网

C# WP上的XAML路径控制行为

C# WP上的XAML路径控制行为,c#,xaml,windows-phone-8,windows-phone-8.1,windows-store-apps,C#,Xaml,Windows Phone 8,Windows Phone 8.1,Windows Store Apps,我正在创建Windows 8.1项目WP+WinStore 按钮放置在网格单元中,其中有2行2列。1行1列大小为45px。所以切换按钮是方形的 我有这样的代码来创建汉堡按钮: <ToggleButton HorizontalAlignment="Stretch" Background="Red" VerticalAlignment="Stretch" Padding="8" Style="{StaticResource BurgerMenuButtonStyle}" HorizontalC

我正在创建Windows 8.1项目WP+WinStore

按钮放置在网格单元中,其中有2行2列。1行1列大小为45px。所以切换按钮是方形的

我有这样的代码来创建汉堡按钮:

<ToggleButton HorizontalAlignment="Stretch" Background="Red" VerticalAlignment="Stretch" Padding="8" Style="{StaticResource BurgerMenuButtonStyle}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
    <Path VerticalAlignment="Center" HorizontalAlignment="Center" Stretch="Uniform" Fill="White" Data="M1E-06,19.102 L32,19.102 L32,23.878 L1E-06,23.878 z M0,9.553 L32,9.553 L32,14.328 L0,14.328 z M0,0 L32,0 L32,4.775 L0,4.775 z" />
</ToggleButton>

平板电脑显示如下控件(正确):

但是windows phone显示如下(这是不正确的):


有人能提出一个修复方案并解释为什么会出现这种情况吗?

我在Lumia 830设备(1607)上测试了您的代码,但效果很好。那么您的Windows Phone类型和操作系统版本是什么?那么汉堡包的风格呢?@Mattew Wu我发现了这个问题。平板电脑和手机的控制风格似乎不同,是什么导致了平板电脑上的正常行为和手机上的不正常行为