'宣言 Public ReadOnly Property AppearancesLarge As ToolAppearances
public ToolAppearances AppearancesLarge {get;}
大きい画像が表示される場合、最初に AppearancesLarge が適用され、AppearancesSmall 設定がデフォルトとして使用されます。
Imports System.Diagnostics Imports Infragistics.Win Imports Infragistics.Win.UltraWinToolbars Private Sub Button23_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button23.Click ' Set the default backcolor and forecolor for all tool appearances. Dim tool As ToolBase For Each tool In Me.UltraToolbarsManager1.Tools tool.SharedProps.AppearancesSmall.Appearance.BackColor = Color.LightBlue tool.SharedProps.AppearancesSmall.Appearance.ForeColor = Color.DarkBlue tool.SharedProps.AppearancesLarge.Appearance.BackColor = Color.LightBlue tool.SharedProps.AppearancesLarge.Appearance.ForeColor = Color.DarkBlue ' NOTE: You can also set defaults for the other appearances off of the ' AppearancesLarge and AppearancesSmall properties, i.e.: ' AppearanceOnMenu ' AppearanceOnToolbar ' HotTrackAppearance ' HotTrackAppearanceOnMenu ' HotTrackAppearanceOnToolbar ' PressedAppearance ' PressedAppearanceOnMenu ' PressedAppearanceOnToolbar Next ' Override the default backcolor and forecolor settings for all instances of the ' tool with the key of 'AlignLeft'. For Each tool In Me.UltraToolbarsManager1.Tools If tool.Key = "AlignLeft" Then Dim toolInstance As ToolBase For Each toolInstance In tool.SharedProps.ToolInstances toolInstance.InstanceProps.AppearancesSmall.Appearance.BackColor = Color.LightGreen toolInstance.InstanceProps.AppearancesSmall.Appearance.ForeColor = Color.DarkGreen toolInstance.InstanceProps.AppearancesLarge.Appearance.BackColor = Color.LightGreen toolInstance.InstanceProps.AppearancesLarge.Appearance.ForeColor = Color.DarkGreen ' NOTE: You can also override defaults for the other appearances off of the ' AppearancesLarge and AppearancesSmall properties, i.e.: ' AppearanceOnMenu ' AppearanceOnToolbar ' HotTrackAppearance ' HotTrackAppearanceOnMenu ' HotTrackAppearanceOnToolbar ' PressedAppearance ' PressedAppearanceOnMenu ' PressedAppearanceOnToolbar Next Exit For End If Next End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinToolbars; private void button23_Click(object sender, System.EventArgs e) { // Set the default backcolor and forecolor for all tool appearances. foreach(ToolBase tool in this.ultraToolbarsManager1.Tools) { tool.SharedProps.AppearancesSmall.Appearance.BackColor = Color.LightBlue; tool.SharedProps.AppearancesSmall.Appearance.ForeColor = Color.DarkBlue; tool.SharedProps.AppearancesLarge.Appearance.BackColor = Color.LightBlue; tool.SharedProps.AppearancesLarge.Appearance.ForeColor = Color.DarkBlue; // NOTE: You can also set defaults for the other appearances off of the // AppearancesLarge and AppearancesSmall properties, i.e.: // AppearanceOnMenu // AppearanceOnToolbar // HotTrackAppearance // HotTrackAppearanceOnMenu // HotTrackAppearanceOnToolbar // PressedAppearance // PressedAppearanceOnMenu // PressedAppearanceOnToolbar } // Override the default backcolor and forecolor settings for all instances of the // tool with the key of 'AlignLeft'. foreach(ToolBase tool in this.ultraToolbarsManager1.Tools) { if (tool.Key == "AlignLeft") { foreach(ToolBase toolInstance in tool.SharedProps.ToolInstances) { toolInstance.InstanceProps.AppearancesSmall.Appearance.BackColor = Color.LightGreen; toolInstance.InstanceProps.AppearancesSmall.Appearance.ForeColor = Color.DarkGreen; toolInstance.InstanceProps.AppearancesLarge.Appearance.BackColor = Color.LightGreen; toolInstance.InstanceProps.AppearancesLarge.Appearance.ForeColor = Color.DarkGreen; // NOTE: You can also override defaults for the other appearances off of the // AppearancesLarge and AppearancesSmall properties, i.e.: // AppearanceOnMenu // AppearanceOnToolbar // HotTrackAppearance // HotTrackAppearanceOnMenu // HotTrackAppearanceOnToolbar // PressedAppearance // PressedAppearanceOnMenu // PressedAppearanceOnToolbar } break; } } }