Private Sub Button_Click(sender As Object, e As RoutedEventArgs) For Each group As OutlookBarGroup In xamOutlookBar1.Groups If Not group.HasLargeImage AndAlso Not group.IsSelected Then group.LargeImage = New BitmapImage(New Uri("pack://application:,,,/32x32.png")) End If Next End Sub Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs) Dim group As New OutlookBarGroup() group.Header = "New Group" If group.OutlookBar IsNot Nothing Then System.Diagnostics.Debug.WriteLine("OutlookBar: " + group.OutlookBar.Name) Else System.Diagnostics.Debug.WriteLine("OutlookBar is null") End If xamOutlookBar1.Groups.Add(group) If group.OutlookBar IsNot Nothing Then System.Diagnostics.Debug.WriteLine("OutlookBar: " + group.OutlookBar.Name) Else System.Diagnostics.Debug.WriteLine("OutlookBar is null") End If group.IsSelected = True End Sub
private void Button_Click(object sender, RoutedEventArgs e) { foreach (OutlookBarGroup group in xamOutlookBar1.Groups) { if (!group.HasLargeImage && !group.IsSelected) group.LargeImage = new BitmapImage(new Uri("pack://application:,,,/32x32.png")); } } private void Button_Click_1(object sender, RoutedEventArgs e) { OutlookBarGroup group = new OutlookBarGroup(); group.Header = "New Group"; if (group.OutlookBar != null) System.Diagnostics.Debug.WriteLine("OutlookBar: " + group.OutlookBar.Name); else System.Diagnostics.Debug.WriteLine("OutlookBar is null"); xamOutlookBar1.Groups.Add(group); if (group.OutlookBar != null) System.Diagnostics.Debug.WriteLine("OutlookBar: " + group.OutlookBar.Name); else System.Diagnostics.Debug.WriteLine("OutlookBar is null"); group.IsSelected = true; }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2