惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
MongoDB | Blog
MongoDB | Blog
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
D
Docker
云风的 BLOG
云风的 BLOG
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
G
Google Developers Blog
GbyAI
GbyAI
T
Tailwind CSS Blog
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
C
Check Point Blog
I
InfoQ
Microsoft Azure Blog
Microsoft Azure Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
阮一峰的网络日志
阮一峰的网络日志
小众软件
小众软件
N
Netflix TechBlog - Medium
B
Blog RSS Feed
腾讯CDC
aimingoo的专栏
aimingoo的专栏

博客园 - oldkingsir

angularjs2 学习笔记(六) Form angularjs2 学习笔记(五) http服务 angularjs2 学习笔记(三) 服务 angularjs2 学习笔记(四) 路由 angularjs2 学习笔记(二) 组件 angularjs2 学习笔记(一) 开发环境搭建 Silverlight中利用MEF进行模块注入时注入错误问题分析 prism中ImportingConstructor构造注入时的参数匹配 解决Prism的EventAggregator的事件订阅错误 解决Prism中Region的GetView不起作用问题 Prism中在Region中注入匹配问题 想找一个专业一点的silverlight开发的群,谁知道啊! silverlight 学习笔记 (九):Prism与MVVM模式在silverlight中的应用 由csdn搬家来此 silverlight 学习笔记 (八):Prism中MEF的初步认识 silverlight 学习笔记 (七):Prism的第一个应用 vs2010中使用odac for .net的连接配置 Silverlight中对WCF RIA 的异步调用的同步处理解决办法 silverlight 学习笔记导航
在Prism中利用Region的对ContentControl的自动充填问题
oldkingsir · 2012-02-25 · via 博客园 - oldkingsir

在使用Prism的Region进行布局时,我们希望在该Region的内容页,也就是我们的View能自动填充整个Region。一般情况下我们会在ContentControl中将HorizontalAlignment以及VerticalAlignment设置为Stretch,仅仅这样设置还不够,我们还需要对ContentControl中的HorizontalContentAlignment以及VerticalContentAlignment设置为Stretch,否则无法实现整个Region中的View全部填充。如下代码:

<Border BorderBrush="Silver" BorderThickness="1" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" Margin="0" Name="border1" VerticalAlignment="Stretch" Background="#FF4848B9">
            <ContentControl Name="contentControl1" prism:RegionManager.RegionName="MainTitleRegion" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" />
        </Border>