【发布时间】:2015-02-01 15:07:23
【问题描述】:
希望这对您在这里的 WPF 专家来说是一个快速的。当寡妇移动或改变大小时,是否有任何简单的 XAML 解决方案允许我的弹出窗口移动?代码如下。如果没有,我总是可以在后面的代码中处理一个事件。
<Grid>
<Canvas>
<Expander Header="details" HorizontalAlignment="Center" VerticalAlignment="Top" ExpandDirection="Down"
Expanded="Expander_Expanded" Panel.ZIndex="99" Collapsed="Expander_Collapsed" Name="expander">
<Popup PopupAnimation="Slide" Name="popup" Width="200" Height="200" StaysOpen="True" AllowsTransparency="True"
IsOpen="False" >
<Grid Background="Cornsilk">
<Grid.BitmapEffect>
<DropShadowBitmapEffect/>
</Grid.BitmapEffect>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock TextWrapping="Wrap" FontWeight="Bold">
Some example text
</TextBlock>
</Grid>
</Popup>
</Expander>
</Canvas>
</Grid>
【问题讨论】:
标签: wpf