zoukankan      html  css  js  c++  java
  • Ribbon菜单栏布局和调整大小

    Ribbon菜单栏布局和调整大小

    原文地址:http://blog.csdn.net/kyranhan/article/details/6641076

    设置菜单组的变化顺序。窗口大小调整时,GroupSizeReductionOrder设置多个菜单组的先后顺序,下图显示当逐渐缩小窗口时,菜单的变化

    View Code
     <ribbon:RibbonTab x:Name="HomeTab" Header="Home"
    
                                  GroupSizeReductionOrder="tbdGroup2, tbdGroup1, editGroup">
    
                    <ribbon:RibbonGroup x:Name="editGroup" Header="Edit">
    
                        <ribbon:RibbonSplitButton Label="Button1"
    
                                               LargeImageSource="Images/LargeIcon.png">
    
                            <ribbon:RibbonApplicationMenuItem Header="Copy aaa"/>
    
                            <ribbon:RibbonApplicationMenuItem Header="Copy bbb"
    
                                                              ImageSource="Images\SmallIcon.png"/>
    
                        </ribbon:RibbonSplitButton>
    
                        <ribbon:RibbonButton Label="Button2"
    
                                             SmallImageSource="Images\SmallIcon.png"
    
                                             LargeImageSource="Images\LargeIcon.png"/>
    
                        <ribbon:RibbonButton Label="Button3"
    
                                             SmallImageSource="Images\SmallIcon.png"
    
                                             LargeImageSource="Images\LargeIcon.png"/>
    
                        <ribbon:RibbonButton Label="Button4"
    
                                             SmallImageSource="Images\SmallIcon.png"
    
                                             LargeImageSource="Images\LargeIcon.png"/>
    
                        <ribbon:RibbonButton Label="Button5"
    
                                             SmallImageSource="Images\SmallIcon.png"
    
                                             LargeImageSource="Images\LargeIcon.png"/>
    
                    </ribbon:RibbonGroup>
    
                    <ribbon:RibbonGroup x:Name="tbdGroup1" Header="TBD1">
    
                        <ribbon:RibbonSplitButton Label="Button1"
    
                                               LargeImageSource="Images/LargeIcon.png">
    
                            <ribbon:RibbonApplicationMenuItem Header="Copy to Other Side"/>
    
                            <ribbon:RibbonApplicationMenuItem Header="Copy from"
    
                                                              ImageSource="Images\SmallIcon.png"/>
    
                        </ribbon:RibbonSplitButton>
    
                        <ribbon:RibbonButton Label="Button2"
    
                                             SmallImageSource="Images\SmallIcon.png"
    
                                             LargeImageSource="Images\LargeIcon.png"/>
    
                    </ribbon:RibbonGroup>
    
                    <ribbon:RibbonGroup x:Name="tbdGroup2" Header="TBD2">
    
                        <ribbon:RibbonSplitButton Label="Button1"
    
                                               LargeImageSource="Images/LargeIcon.png">
    
                            <ribbon:RibbonApplicationMenuItem Header="Copy to Other Side"/>
    
                            <ribbon:RibbonApplicationMenuItem Header="Copy from"
    
                                                              ImageSource="Images\SmallIcon.png"/>
    
                        </ribbon:RibbonSplitButton>
    
                        <ribbon:RibbonButton Label="Button2"
    
                                             SmallImageSource="Images\SmallIcon.png"
    
                                             LargeImageSource="Images\LargeIcon.png"/>
    
                    </ribbon:RibbonGroup>
    
                </ribbon:RibbonTab>

    设置单个组内空间的变化顺序。当菜单大小调整时,GroupSizeDefinitions按照下表的关系设置每个组中控件的布局

     

    IsLabelVisible

    Has a large image and up to two lines for a label.

    RibbonImageSize.Large

    true

    Has a small image and one line for a label.

    RibbonImageSize.Small

    true

    Has just a small image and no label.

    RibbonImageSize.Small

    false

      

    Ribbon菜单栏布局和调整大小
    View Code
     <ribbon:RibbonGroup.GroupSizeDefinitions>
    
                            <ribbon:RibbonGroupSizeDefinitionBaseCollection>
    
                            <ribbon:RibbonGroupSizeDefinition>
    
                                <ribbon:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
    
                                <ribbon:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
    
                                <ribbon:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
    
                                    <ribbon:RibbonControlSizeDefinition ImageSize="Large" IsLabelVisible="True" />
    
                                    <ribbon:RibbonControlSizeDefinition ImageSize="Large"  IsLabelVisible="True" />
    
                            </ribbon:RibbonGroupSizeDefinition>
    
                            </ribbon:RibbonGroupSizeDefinitionBaseCollection>
    
                        </ribbon:RibbonGroup.GroupSizeDefinitions>
  • 相关阅读:
    pl/sql可以封装代码的结构(过程,函数, 包)
    pl/sql 块结构
    Oracle 逻辑模型(数据库,用户的关系)
    Oracle 创建用户为什么要加C##
    CentOS8断电后无法正常启动
    Cannot open /var/log/sa/sa26: No such file or directory
    Centos6.6安装sysstat报错/etc/cron.d
    Oracle DBCA工具检测不到ASM磁盘组
    Redis安装
    Mysql模拟故障恢复案例过程
  • 原文地址:https://www.cnblogs.com/flyhigh1860/p/2515370.html
Copyright © 2011-2022 走看看