'宣言 Public Shared ReadOnly MinimizeToggleButtonStyleKey As ResourceKey
public static readonly ResourceKey MinimizeToggleButtonStyleKey
Private Sub XOBinit() Dim optionsStyle As Style = New Style(GetType(NavigationPaneOptionsControl)) optionsStyle.Setters.Add(New Setter(BackgroundProperty, New SolidColorBrush(Colors.LightGreen))) xamOutlookBar1.NavigationPaneOptionsControlStyle = optionsStyle Dim popupButtonStyle As Style = New Style(GetType(ToggleButton)) popupButtonStyle.Setters.Add(New Setter(ContentProperty, "Show popup")) Me.Resources.Add(XamOutlookBar.NavigationPaneToggleButtonStyleKey, popupButtonStyle) End Sub
public IG_XamOutlookBar_Properties() { InitializeComponent(); Style optionsStyle = new Style(typeof(NavigationPaneOptionsControl)); optionsStyle.Setters.Add(new Setter(BackgroundProperty, new SolidColorBrush(Colors.LightGreen))); xamOutlookBar1.NavigationPaneOptionsControlStyle = optionsStyle; Style popupButtonStyle = new Style(typeof(ToggleButton)); popupButtonStyle.Setters.Add(new Setter(ContentProperty, "Show popup")); this.Resources.Add(XamOutlookBar.NavigationPaneToggleButtonStyleKey, popupButtonStyle); }