Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Add Item to XamWebOutlookBar via c#
posted

Hi,

I need to add a control, like a XamWebTree, into a XamWebOutlookBar  Group via C#.

So my code should be:

            XamWebTree myTree = new XamWebTree();
            myTree.Items.Add(item1);
            myTree.Items.Add(item2);

Now, how I could to insert this tree into outlookbar group 2 for example?

thks
Alberto Acerbis

Parents
No Data
Reply
  • 4666
    Suggested Answer
    posted

    Hi Alberto,

    You can add XamWebTree like a content of the some of OutlookBarGroup:

    You can have XamWebOutlookBar with groups:

            <igOB:XamWebOutlookBar x:Name="xamOB" Grid.Column="1" Width="150" MinimizedWidth="70" ShowToolTips="True" IsMinimized="True"
                   ToolTipService.ToolTip="OBTooltip" HorizontalAlignment="Left">
                <igOB:OutlookBarGroup x:Name="Gr1" Key="Group1" >
                    <Button Content="Button1" ToolTipService.ToolTip="AAA"/>
                </igOB:OutlookBarGroup>
                <igOB:OutlookBarGroup x:Name="Gr2" Key="Group2" ToolTip="Group2ToolTip">
                    <Controls:XamWebTree x:Name="xamWebTree" Width="200" Height="350" Grid.Column="0">
                        <Controls:XamWebTreeItem x:Name="ItemX" Header="Item X" MouseLeftButtonDown="Item_MouseLeftButtonDown"/>
                    </Controls:XamWebTree>
                </igOB:OutlookBarGroup>
                <igOB:OutlookBarGroup x:Name="Gr3" Key="Group3" >
                    <Grid></Grid>
                </igOB:OutlookBarGroup>
            </igOB:XamWebOutlookBar>

    It is possible to add XamWebTree as a content of OutlookBarGroup in XAML or

    create and add it like a content of any OutlookBarGroup:

             XamWebTree sampleTree = new XamWebTree();

                XamWebTreeItem itemA = new XamWebTreeItem
                {
                    Name = "itemA",
                    Header = "Item A"
                };
                sampleTree.Items.Add(itemA);
                XamWebTreeItem itemB = new XamWebTreeItem
                {
                    Name = "itemB",
                    Header = "Item B"
                };
                sampleTree.Items.Add(itemB);
                XamWebTreeItem itemC = new XamWebTreeItem
                {
                    Name = "itemC",
                    Header = "Item C"
                };
                sampleTree.Items.Add(itemC);

                this.xamOB.Groups["Group3"].Content = sampleTree;

    I hope this can help :-)

    Best Wishes!

    Mihail

Children
No Data