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>
  • 相关阅读:
    IOS的系统手机 宽度无法自适应 解决办法
    iframe 设置背景透明
    thinkphp5 常用的2个方法
    thinkphp引入后台模板文件的路径怎么写?
    html的confirm()
    php 如何往数组里添加数据
    thinkphp51 重定向 redirect()
    【Oracle 触发器】(4)触发器应用场景--数据的确认
    【Oracle 触发器】(3)触发器应用场景--复杂的安全性检查
    【Oracle 触发器】(2)触发器的分类(语句级/行级)
  • 原文地址:https://www.cnblogs.com/flyhigh1860/p/2515370.html
Copyright © 2011-2022 走看看