Height="{Binding ActualHeight, ElementName=M}"
Width="{Binding ActualWidth, ElementName=M}">
这句是错的吧,因为Popup根本不知道需要多大尺寸,他哪里来的ActualWidth和Height,你需要让里面的内容顶出去
里面的Grid尤其要注意Height的问题 <Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
Width="{Binding ActualWidth, ElementName=M}">
这句是错的吧,因为Popup根本不知道需要多大尺寸,他哪里来的ActualWidth和Height,你需要让里面的内容顶出去
里面的Grid尤其要注意Height的问题 <Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
而且这个代码在窗口不是很大的时候都是正常工作的。
只有窗口占了超过整个屏幕的大约80%面积以上的时候才会出问题。。很奇怪~
我把代码改成指定内部Grid大小结果也是一样。。窗口超过一定面积的时候就显示不全了。
仅供参考。
grid放在window里,window的size限制了grid的size,你是不是window不够大?
而且当前情况是Popup比window要小。
http://bbs.csdn.net/topics/390360261
同求解决方案。貌似这个问题还挺普遍http://stackoverflow.com/questions/2633129/cant-create-a-fullscreen-wpf-popup我准备先试试用2个popup拼接起来看能行不。实在不行只能用窗体来实现了。
•A Popup that covers more than 75 percent of the screen, reduces its width first and then its height to meet the maximum coverage limit of 75 percent.