バージョン

Location プロパティ (OutlookBarGroup)

グループの現在の位置を返します(読み取り専用)。これは依存プロパティです。
シンタックス
'宣言
 
Public ReadOnly Property Location As OutlookBarGroupLocation
public OutlookBarGroupLocation Location {get;}
使用例
Private Sub Button_Click(sender As Object, e As RoutedEventArgs) 
    Dim group As OutlookBarGroup = xamOutlookBar1.Groups("Group1") 
    If group IsNot Nothing Then 
        group.IsSelected = True 
    End If 
End Sub 

Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs) 
    Dim group As New OutlookBarGroup() 
    group.SmallImage = New BitmapImage(New Uri("pack://application:,,,/32x32.png")) 
    
    group.Header = "New Group" 
    System.Diagnostics.Debug.WriteLine(group.Header + ".Location is " + group.Location) 
    xamOutlookBar1.Groups.Add(group) 
    System.Diagnostics.Debug.WriteLine(group.Header + ".Location is " + group.Location) 
End Sub
private void Button_Click(object sender, RoutedEventArgs e)
{
    OutlookBarGroup group= xamOutlookBar1.Groups["Group1"];
    if (group != null)
    {
        group.IsSelected = true;
    }
}

private void Button_Click_1(object sender, RoutedEventArgs e)
{
    OutlookBarGroup group = new OutlookBarGroup();
    group.SmallImage= new BitmapImage(new Uri("pack://application:,,,/32x32.png"));

    group.Header = "New Group";
    System.Diagnostics.Debug.WriteLine(group.Header + ".Location is " + group.Location);
    xamOutlookBar1.Groups.Add(group);
    System.Diagnostics.Debug.WriteLine(group.Header + ".Location is " + group.Location);
}
<Window x:Class="XamOutlookBarApp.IG_XamOutlookBar_OutlookGroupBarProperties_2"
    
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    
xmlns:igOutlookBar="http://infragistics.com/OutlookBar"
    
Title="IG_XamOutlookBar_OutlookGroupBarProperties_2" Height="300" Width="300">
    
<StackPanel Orientation="Horizontal">
        
<igOutlookBar:XamOutlookBar x:Name="xamOutlookBar1">
            
<igOutlookBar:OutlookBarGroup Key="Group1" Header="Group 1" Content="Group 1"
                                          
SmallImage="/XamOutlookBarApp;component/32x32.png"/>
            
<igOutlookBar:OutlookBarGroup Key="Group2" Header="Group2" Content="Group 2"/>
        
</igOutlookBar:XamOutlookBar>
        
<StackPanel>
            
<Image Name="image1" Width="32" Height="32" 
                   
Source="{Binding ElementName=xamOutlookBar1, Path=SelectedGroup.SmallImageResolved}"/>
            
<TextBlock Text="{Binding ElementName=xamOutlookBar1, Path=SelectedGroup.Location}"/>
            
<TextBlock Text="{Binding ElementName=xamOutlookBar1, Path=Groups[Group2].Content}"/>
            
<Button Click="Button_Click">Select Group 1</Button>
            
<Button Content="Add Group" Click="Button_Click_1" />
        
</StackPanel>
    
</StackPanel>
</Window>
参照