为什么我的Popup在某些机器上显示与Placement属性相反?

cpl*_*tts 8 wpf popup

我有一个简单的WPF Popup,当用户点击Button时我会显示它.

<Button
    x:Name="aButton"
    Content="Up/Down"
    Width="75"
    Height="30"
    Click="aButton_Click"
/>
<Popup
    PlacementTarget="{Binding ElementName=aButton}"
    Placement="Right"
    VerticalOffset="-31"
    StaysOpen="False"
    AllowsTransparency="True"
>
    <StackPanel>
        <Button Width="45" Height="45" Margin="2,0,2,2" Content="+"/>
        <Button Width="45" Height="45" Margin="2,0,2,0" Content="-"/>
    </StackPanel>
</Popup>
Run Code Online (Sandbox Code Playgroud)

非常奇怪的是......这段代码的运行方式不同,具体取决于它运行的机器.

我在我的主桌面上运行此代码,一切正常......并且应该如此.我在我的PDC09上网本上运行它......弹出窗口显示相反(左侧而不是右侧,因为我告诉它使用Placement属性).

为什么是这样?我能做些什么呢?

cpl*_*tts 12

我无法通过谷歌找到任何东西...但在WPF论坛上幸运的搜索,很快发现了这篇文章.自我注意:如果Google无法找到任何内容,请不要忘记搜索WPF论坛.

答案是我的PDC09上网本是一款平板电脑,显然,微软认为在平板电脑上显示与Placement属性相反的Popup是一个好主意,该平板电脑配置为惯用右手的人...弹出窗口不会出现在用户手中.

解决方案是恢复自定义Popup放置...如果您不想要此行为.

我很想知道有关此问题的任何其他方法.