'宣言 Public Function ExecuteCommand( _ ByVal command As RoutedCommand _ ) As Boolean
public bool ExecuteCommand( RoutedCommand command )
Private Sub Button_Click(sender As Object, e As RoutedEventArgs) Dim gr As New OutlookBarGroup() xamOutlookBar1.Groups.Add(gr) Dim xob As XamOutlookBar = XamOutlookBar.GetOutlookBar(gr) Dim cmd As RoutedCommand = OutlookBarCommands.ShowFewerButtonsCommand xob.ExecuteCommand(cmd) End Sub
private void Button_Click(object sender, RoutedEventArgs e) { OutlookBarGroup gr = new OutlookBarGroup(); xamOutlookBar1.Groups.Add(gr); XamOutlookBar xob = XamOutlookBar.GetOutlookBar(gr); RoutedCommand cmd = OutlookBarCommands.ShowFewerButtonsCommand; xob.ExecuteCommand(cmd); }