首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

请教怎么在xaml中定义这样的grid

2012-03-27 
请问如何在xaml中定义这样的grid?如果window为宽屏幕(16:9),Grid为window中央4:3区域,如果window为标准屏(

请问如何在xaml中定义这样的grid?
如果window为宽屏幕(16:9),Grid为window中央4:3区域,如果window为标准屏(4:3),那么Grid为windows所有区域,请问这样的条件Grid在xaml中如何定义?

[解决办法]
最简单可以理解为:

XML code
<Window x:Class="WpfApplication1.MainWindow"        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"        Title="MainWindow" Height="350" Width="525">    <Viewbox>        <Grid Width="800" Height="600" Background="Yellow">        </Grid>    </Viewbox></Window> 

热点排行