'宣言 Public ReadOnly Property HotTrackStyle As ItemHotTrackStyle
public ItemHotTrackStyle HotTrackStyle {get;}
Imports System.Diagnostics Imports Infragistics.Win Imports Infragistics.Win.UltraWinExplorerBar Private Sub Button74_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button74.Click ' Display information about the settings on the first item in the first group. If (Me.ultraExplorerBar1.Groups.Count < 1) Then Return End If If (Me.ultraExplorerBar1.Groups(0).Items.Count < 1) Then Return End If ' Get a reference to the first item in the first group. Dim firstItem As UltraExplorerBarItem = Me.ultraExplorerBar1.Groups(0).Items(0) ' HotTrackStyle If (firstItem.Settings.HotTrackStyle = ItemHotTrackStyle.Default) Then Debug.WriteLine("The first group's HotTrackStyle setting is 'Default'. Its resolved setting is: " + firstItem.SettingsResolved.HotTrackStyle.ToString()) Else Debug.WriteLine("The first group's HotTrackStyle setting is: " + firstItem.Settings.HotTrackStyle.ToString()) End If End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinExplorerBar; private void button74_Click(object sender, System.EventArgs e) { // Display information about the settings on the first item in the first group. if (this.ultraExplorerBar1.Groups.Count < 1) return; if (this.ultraExplorerBar1.Groups[0].Items.Count < 1) return; // Get a reference to the first item in the first group. UltraExplorerBarItem firstItem = this.ultraExplorerBar1.Groups[0].Items[0]; // HotTrackStyle if (firstItem.Settings.HotTrackStyle == ItemHotTrackStyle.Default) Debug.WriteLine("The first group's HotTrackStyle setting is 'Default'. Its resolved setting is: " + firstItem.SettingsResolved.HotTrackStyle.ToString()); else Debug.WriteLine("The first group's HotTrackStyle setting is: " + firstItem.Settings.HotTrackStyle.ToString()); }