RibbonMenuButton.SmallImageSource 属性

获取或设置当图像大小设置为 Small 时,在控件上显示的图像。

命名空间:  Microsoft.Windows.Controls.Ribbon
程序集:  RibbonControlsLibrary(在 RibbonControlsLibrary.dll 中)

语法

声明
Public Property SmallImageSource As ImageSource
    Get
    Set
public ImageSource SmallImageSource { get; set; }
public:
property ImageSource^ SmallImageSource {
    ImageSource^ get ();
    void set (ImageSource^ value);
}
member SmallImageSource : ImageSource with get, set
function get SmallImageSource () : ImageSource
function set SmallImageSource (value : ImageSource)

属性值

类型:System.Windows.Media.ImageSource
要在控件上显示的图像。注册的默认值为 nullnull 引用(在 Visual Basic 中为 Nothing)。有关可以影响值的因素的更多信息,请参见 依赖项属性值优先级

依赖项属性信息

标识符字段

SmallImageSourceProperty

设置为 true 的元数据属性

备注

设置在 ControlSizeDefinition 上控制 SmallImageSource的可见性的 ImageSize 属性。

示例

以下示例显示创建菜单按钮的标记,有三个可用项。

<ribbon:RibbonMenuButton Label="Color 1" 
                         SmallImageSource="Images/RightArrowShort_Green16.png" 
                         LargeImageSource="Images/RightArrowShort_Green32.png" >
    <ribbon:RibbonGallery SelectedValue="Green"
                          SelectedValuePath="Content"
                          MaxColumnCount="1">
        <ribbon:RibbonGalleryCategory>
            <ribbon:RibbonGalleryItem Content="Green" Foreground="Green" />
            <ribbon:RibbonGalleryItem Content="Blue" Foreground="Blue" />
            <ribbon:RibbonGalleryItem Content="Orange" Foreground="Orange" />
        </ribbon:RibbonGalleryCategory>
    </ribbon:RibbonGallery>
</ribbon:RibbonMenuButton>

.NET Framework 安全性

请参见

参考

RibbonMenuButton 类

Microsoft.Windows.Controls.Ribbon 命名空间

其他资源

功能区布局和大小调整