zoukankan      html  css  js  c++  java
  • 在Prism中利用Region的对ContentControl的自动充填问题

    在使用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>
  • 相关阅读:
    python中神之bug
    常用好的软件
    远程登录
    centos7改静态ip
    SpringMVC归纳
    mysql数据库操作手册
    MyBatis归纳
    Maven归纳
    maven操作手册
    java知识库
  • 原文地址:https://www.cnblogs.com/oldkingsir/p/2367768.html
Copyright © 2011-2022 走看看