屏幕分辨率改变后,WPF Popup不在顶部?

时间:2013-02-01 09:03:29

标签: c# wpf xaml wpf-controls

<Border Name="PART_MegaMenuHoverArea" Padding="{TemplateBinding Padding}" CornerRadius="5" BorderThickness="0" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
<Grid Panel.ZIndex="1000">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<ContentPresenter Grid.Column="0" ContentSource="Header" Margin="0,-3,0,0"/>
<Image x:Name="Checkmark" Grid.Column="1" Source="../Images/Checkmark.png" Visibility="Collapsed" Margin="10,-1,0,0"/>
</Grid>
</Border>
<Popup Name="PART_MegaMenuPopup" AllowsTransparency="True" PlacementTarget="{Binding ElementName=PART_MegaMenuHoverArea}" PlacementRectangle="{TemplateBinding PlacementRectangle}"
StaysOpen="False" Placement="Bottom">

其余的代码是UI逻辑,所以绑定都在前端。它适用于Windows 7,但在Windows XP上,屏幕分辨率更改后,弹出窗口会在主窗口后面呈现。有什么想法吗?

0 个答案:

没有答案