Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hi, How can i write following code behind the Xaml ? If you help me about that i ll happy. Thankx

                                     <dxn:NavBarControl Name="MasterNavBarControl">
                                                <dxn:NavBarControl.View>
                                                    <dxn:NavigationPaneView />
                                                </dxn:NavBarControl.View>
                                                <dxn:NavBarControl.Groups>
                                                    <dxn:NavBarGroup Header="Mail" DisplaySource="Content" ImageSource="/SLDockingSample;component/Images/NavigationPaneOptionsDemo/Mail_25.png">
                                                        <dxn:NavBarGroup.Content>
                                                            <dxn:NavBarControl VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="1,0">
                                                                <dxn:NavBarControl.View>
                                                                    <dxn:ExplorerBarView>
                                                                        <dxn:ExplorerBarView.GroupHeaderTemplate>
                                                                            <ControlTemplate TargetType="dxn:NavBarGroupHeader">
                                                                                <Border Background="#FFCBCBCB" Padding="0,0,0,1">
                                                                                    <Border Background="#FFE5E5E5">
                                                                                        <Button xpfCore:RoutedCommand.Command="{StaticResource ChangeGroupExpandedCommandProvider}" xpfCore:RoutedCommand.CommandParameter="{Binding}">
                                                                                            <Button.Template>
                                                                                                <ControlTemplate>
                                                                                                    <Border Background="Transparent">
                                                                                                        <dxn:ImageAndTextContentPresenter ImageFallbackSize="24" x:Name="groupHeaderLabel" Grid.Column="0" Content="{Binding}"
                                                                                                                Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource TemplatedParent}}"
                                                                                                                ContentTemplateSelector="{Binding Path=ActualHeaderTemplateSelector}" />
                                                                                                    </Border>
                                                                                                </ControlTemplate>
                                                                                            </Button.Template>
                                                                                        </Button>
                                                                                    </Border>
                                                                                </Border>
                                                                            </ControlTemplate>
                                                                        </dxn:ExplorerBarView.GroupHeaderTemplate>
                                                                    </dxn:ExplorerBarView>
                                                                </dxn:NavBarControl.View>
                                                                <dxn:NavBarControl.Groups>
                                                                    <dxn:NavBarGroup Header="Favorite Folders">
                                                                        <dxn:NavBarGroup.Items>
                                                                            <dxn:NavBarItem ImageSource="/SLDockingSample;component/Images/NavigationPaneOptionsDemo/Inbox_17.png" Content="Inbox" />
                                                                            <dxn:NavBarItem ImageSource="/SLDockingSample;component/Images/NavigationPaneOptionsDemo/Sent-Items_17.png" Content="Sent Items" />
                                                                        </dxn:NavBarGroup.Items>
                                                                    </dxn:NavBarGroup>
                                                                </dxn:NavBarControl.Groups>
                                                            </dxn:NavBarControl>
                                                        </dxn:NavBarGroup.Content>
                                                    </dxn:NavBarGroup>
                                                </dxn:NavBarControl.Groups>
                                            </dxn:NavBarControl>

                                0

                                Hi Erhan,

                                I'm afraid that your task is not quite clear to me.

                                What part of this xaml definition should be implemented using code behind? Could you please clarify why the xaml definition does not suit your needs? Please describe your task in greater detail and we will do our best to find an appropriate solution.

                                We are looking forward to hearing from you.

                                Thanks,
                                Dmitry

                                0

                                I want to create navigation bar for incoming data at runtime from database. And I want to get image of the example ( Demo Center /NavBarDemoWeb/#Navigation_Pane)

                                0

                                ...

                                0

                                Hi Erhan,

                                Thank you for your update.

                                You can create a NavBarControl from code-behind and place it into the application's visual tree:

                                [C#]
                                void MainPage_Loaded(object sender, System.Windows.RoutedEventArgs e) { NavBarControl navBar = new NavBarControl(); navBar.View = new ExplorerBarView(); NavBarGroup group = new NavBarGroup() { Header = "Test Group" }; group.Items.Add(new NavBarItem() { Content = "test Item" }); navBar.Groups.Add(group); this.layoutRoot.Children.Add(navBar); }

                                Here the layoutRoot is a Grid control placed within the UserControl:

                                [XAML]
                                <UserControl x:Class="DXSLSample.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"> <Grid x:Name="layoutRoot"> </Grid> </UserControl>

                                I have attached a small sample project that illustrates this approach in action.

                                However it still seems to me that there is a more suitable approach than creating the entire NavBarControl from code behind. Therefore it would be great if you clarify what exactly depends on data that is obtained from the DB. Does this data define a group/items set of the NavBar control? Does it also describe some additional information?

                                I'm looking forward to your feedback.

                                Thanks,
                                Dmitry

                                0

                                Hi, I wrote with my C # code below, but I can not remember the Button Control is part of the following could you help?
                                (<Button xpfCore:RoutedCommand.Command="{StaticResourceChangeGroupExpandedCommandProvider}"xpfCore:RoutedCommand.CommandParameter="{Binding}">)

                                [C#]

                                 NavBarControl MasterNavBarControl = new NavBarControl();
                                            MasterNavBarControl.Name = "MasterNavBarControl";

                                            NavigationPaneView MasterNavigationPanelView = new NavigationPaneView();

                                            NavBarGroup MasterBarGroup = new NavBarGroup();
                                            MasterBarGroup.Header = "Mail";
                                            MasterBarGroup.DisplaySource = DisplaySource.Content;
                                            BitmapImage BitmapImageMasterBarGroup = new BitmapImage(new Uri(@"/SLDockingSample;component/Images/NavigationPaneOptionsDemo/Mail_25.png", UriKind.RelativeOrAbsolute));
                                            MasterBarGroup.ImageSource = BitmapImageMasterBarGroup;

                                            NavBarControl ChildNavBarControl = new NavBarControl();
                                            ChildNavBarControl.VerticalAlignment = VerticalAlignment.Stretch;
                                            ChildNavBarControl.HorizontalAlignment = HorizontalAlignment.Stretch;

                                            ExplorerBarView ChildExplorerBarView = new ExplorerBarView();
                                            ControlTemplate ChildControlTemplate = new ControlTemplate();
                                            ChildControlTemplate = (ControlTemplate)Resources["ChildNavBarGroupHeader"];

                                            Border MasterBorder = new Border();
                                            MasterBorder.Background = new SolidColorBrush(Color.FromArgb(225, 203, 203, 203));
                                            MasterBorder.Margin = new Thickness(0, 0, 0, 1);

                                            Border ChildBorder = new Border();
                                            ChildBorder.Background = new SolidColorBrush(Color.FromArgb(225, 229, 229, 229));
                                            Button ChildButton = new Button();
                                          
                                            //ChildButton.Command = ?

                                            NavBarGroup ChildNavBarGroup = new NavBarGroup();
                                            ChildNavBarGroup.Header = "Favorite Folders";

                                            BitmapImage BitmapImageInbox = new BitmapImage(new Uri(@"/SLDockingSample;component/Images/NavigationPaneOptionsDemo/Mail_25.png", UriKind.RelativeOrAbsolute));
                                            NavBarItem NavBarItemInbox = new NavBarItem();
                                            NavBarItemInbox.Content = "Inbox";
                                            NavBarItemInbox.ImageSource = BitmapImageInbox;
                                            ChildNavBarGroup.Items.Add(NavBarItemInbox);

                                            BitmapImage BitmapImageSentItems = new BitmapImage(new Uri(@"/SLDockingSample;component/Images/NavigationPaneOptionsDemo/Mail_25.png", UriKind.RelativeOrAbsolute));
                                            NavBarItem NavBarItemSentItems = new NavBarItem();
                                            NavBarItemSentItems.Content = "Sent Items";
                                            NavBarItemSentItems.ImageSource = BitmapImageSentItems;
                                            ChildNavBarGroup.Items.Add(NavBarItemSentItems);

                                            ChildExplorerBarView.GroupHeaderTemplate = ChildControlTemplate;
                                            ChildNavBarControl.View = ChildExplorerBarView;
                                            MasterNavBarControl.Groups.Add(MasterBarGroup);
                                            MasterNavBarControl.View = MasterNavigationPanelView;
                                            LayoutRoot.Children.Add(MasterNavBarControl);

                                [XAML]

                                <dxn:NavBarControl Name="MasterNavBarControl">
                                            <dxn:NavBarControl.View>
                                                <dxn:NavigationPaneView />
                                            </dxn:NavBarControl.View>
                                            <dxn:NavBarControl.Groups>
                                                <dxn:NavBarGroup Header="Mail" DisplaySource="Content" ImageSource="/SLDockingSample;component/Images/NavigationPaneOptionsDemo/Mail_25.png">
                                                    <dxn:NavBarGroup.Content>
                                                        <dxn:NavBarControl VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="1,0">
                                                            <dxn:NavBarControl.View>
                                                                <dxn:ExplorerBarView>
                                                                    <dxn:ExplorerBarView.GroupHeaderTemplate>
                                                                        <ControlTemplate TargetType="dxn:NavBarGroupHeader">
                                                                            <Border Background="#FFCBCBCB" Padding="0,0,0,1">
                                                                                <Border Background="#FFE5E5E5">
                                                                                    <Button xpfCore:RoutedCommand.Command="{StaticResource ChangeGroupExpandedCommandProvider}" xpfCore:RoutedCommand.CommandParameter="{Binding}">
                                                                                        <Button.Template>
                                                                                            <ControlTemplate>
                                                                                                <Border Background="Transparent">
                                                                                                    <dxn:ImageAndTextContentPresenter ImageFallbackSize="24" x:Name="groupHeaderLabel" Grid.Column="0" Content="{Binding}"
                                                                                                            Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource TemplatedParent}}"
                                                                                                            ContentTemplateSelector="{Binding Path=ActualHeaderTemplateSelector}" />
                                                                                                </Border>
                                                                                            </ControlTemplate>
                                                                                        </Button.Template>
                                                                                    </Button>
                                                                                </Border>
                                                                            </Border>
                                                                        </ControlTemplate>
                                                                    </dxn:ExplorerBarView.GroupHeaderTemplate>
                                                                </dxn:ExplorerBarView>
                                                            </dxn:NavBarControl.View>
                                                            <dxn:NavBarControl.Groups>
                                                                <dxn:NavBarGroup Header="Favorite Folders">
                                                                    <dxn:NavBarGroup.Items>
                                                                        <dxn:NavBarItem ImageSource="/SLDockingSample;component/Images/NavigationPaneOptionsDemo/Inbox_17.png" Content="Inbox" />
                                                                        <dxn:NavBarItem ImageSource="/SLDockingSample;component/Images/NavigationPaneOptionsDemo/Sent-Items_17.png" Content="Sent Items" />
                                                                    </dxn:NavBarGroup.Items>
                                                                </dxn:NavBarGroup>
                                                            </dxn:NavBarControl.Groups>
                                                        </dxn:NavBarControl>
                                                    </dxn:NavBarGroup.Content>
                                                </dxn:NavBarGroup>
                                            </dxn:NavBarControl.Groups>
                                        </dxn:NavBarControl>

                                0

                                Hi ,

                                If my understanding of your task is correct, you need to use the SetValue method to assign values for RoutedCommand attached properties:

                                [C#]
                                Button ChildButton = new Button(); ChildButton.SetValue(DevExpress.Xpf.Core.WPFCompatibility.RoutedCommand.CommandProperty, this.Resources["ChangeGroupExpandedCommandProvider"]); ChildButton.SetValue(DevExpress.Xpf.Core.WPFCompatibility.RoutedCommand.CommandParameterProperty, new Binding());

                                Thanks,
                                Dmitry

                                0

                                Hi, Thank you, you give the correct answer in part, below me and I write a letter that I wrote code in C #

                                <dxn:ExplorerBarView.GroupHeaderTemplate>
                                                                        <ControlTemplate TargetType="dxn:NavBarGroupHeader">
                                                                            <Border Background="#FFCBCBCB" Padding="0,0,0,1">
                                                                                <Border Background="#FFE5E5E5">
                                                                                    <Button xpfCore:RoutedCommand.Command="{StaticResource ChangeGroupExpandedCommandProvider}" xpfCore:RoutedCommand.CommandParameter="{Binding}">
                                                                                        <Button.Template>
                                                                                            <ControlTemplate>
                                                                                                <Border Background="Transparent">
                                                                                                    <dxn:ImageAndTextContentPresenter ImageFallbackSize="24" x:Name="groupHeaderLabel" Grid.Column="0" Content="{Binding}"
                                                                                                            Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource TemplatedParent}}"
                                                                                                            ContentTemplateSelector="{Binding Path=ActualHeaderTemplateSelector}" />
                                                                                                </Border>
                                                                                            </ControlTemplate>
                                                                                        </Button.Template>
                                                                                    </Button>
                                                                                </Border>
                                                                            </Border>
                                                                        </ControlTemplate>
                                                                    </dxn:ExplorerBarView.GroupHeaderTemplate>

                                0

                                Hi, I want to ask me exactly how to write the following post code in c #.

                                <local:NavBarDemoModule x:Class="NavBarDemo.NavigationPaneOptions"
                                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                                    xmlns:sys="clr-namespace:System;assembly=mscorlib"
                                    xmlns:local="clr-namespace:NavBarDemo"
                                    xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/core"
                                    xmlns:dxn="http://schemas.devexpress.com/winfx/2008/xaml/navbar"
                                    xmlns:dxdb="http://schemas.devexpress.com/winfx/2008/xaml/demobase"
                                    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
                                    xmlns:xpfCore="clr-namespace:DevExpress.Xpf.Core.WPFCompatibility;assembly=DevExpress.Xpf.Core.v11.2">
                                    <local:NavBarDemoModule.Resources>
                                        <ResourceDictionary>
                                            <dxn:ChangeGroupExpandedCommandProvider x:Key="ChangeGroupExpandedCommandProvider" />
                                        </ResourceDictionary>
                                    </local:NavBarDemoModule.Resources>
                                    <dxdb:DemoModuleControl x:Name="nbDemoModuleControl">
                                        <dxdb:DemoModuleControl.OptionsContent>
                                            <StackPanel MinWidth="200">
                                                <dxc:GroupFrame Header="Max Visible Group Count" Margin="0,0,0,12">
                                                    <StackPanel Orientation="Vertical">
                                                        <dxe:TextEdit Margin="0,0,0,2" IsReadOnly="True" Text="{Binding ElementName=tbeMaxVisibleGroupCount, Path=Value, Mode=TwoWay}" />
                                                        <dxe:TrackBarEdit x:Name="tbeMaxVisibleGroupCount" Minimum="0" Maximum="4" SmallStep="1" LargeStep="1"
                                                                          Value="{Binding Path=View.MaxVisibleGroupCount, Mode=TwoWay}" />
                                                    </StackPanel>
                                                </dxc:GroupFrame>
                                                <dxc:GroupFrame Header="Active Group Min Height" Margin="0,0,0,12">
                                                    <StackPanel Orientation="Vertical">
                                                        <dxe:TextEdit Margin="0,0,0,2" IsReadOnly="True" Text="{Binding ElementName=tbeActiveGroupMinHeight, Path=Value, Mode=TwoWay}" />
                                                        <dxe:TrackBarEdit x:Name="tbeActiveGroupMinHeight" Minimum="50" Maximum="500" SmallStep="50" LargeStep="50"
                                                                          Value="{Binding Path=View.ActiveGroupMinHeight, Mode=TwoWay}" />
                                                    </StackPanel>
                                                </dxc:GroupFrame>
                                                <StackPanel Orientation="Vertical" Margin="12,0,0,0">
                                                    <dxe:CheckEdit Margin="0,0,0,4" Content="Expanded" IsChecked="{Binding Path=View.IsExpanded, Mode=TwoWay}" />
                                                    <dxe:CheckEdit Margin="0,0,0,4" x:Name="ShowExpandButton" Content="Show Expand Button" IsChecked="{Binding Path=View.IsExpandButtonVisible, Mode=TwoWay}" />
                                                    <dxe:CheckEdit Margin="0,0,0,4" Content="Show Overflow Panel" IsChecked="{Binding Path=View.IsOverflowPanelVisible, Mode=TwoWay}" />
                                                    <dxe:CheckEdit Content="Show Splitter" IsChecked="{Binding Path=View.IsSplitterVisible, Mode=TwoWay}" />
                                                </StackPanel>
                                            </StackPanel>
                                        </dxdb:DemoModuleControl.OptionsContent>
                                        <local:NavBarDemoGridControl>
                                            <dxn:NavBarControl x:Name="navBar">
                                                <dxn:NavBarControl.View>
                                                    <dxn:NavigationPaneView />
                                                </dxn:NavBarControl.View>
                                                <dxn:NavBarControl.Groups>
                                                    <dxn:NavBarGroup Header="Mail" DisplaySource="Content" ImageSource="/NavBarDemo;component/Images/NavigationPaneOptionsDemo/Mail_25.png">
                                                        <dxn:NavBarGroup.Content>
                                                            <dxn:NavBarControl VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="1,0">
                                                                <dxn:NavBarControl.View>
                                                                    <dxn:ExplorerBarView>
                                                                        <dxn:ExplorerBarView.GroupHeaderTemplate>
                                                                            <ControlTemplate TargetType="dxn:NavBarGroupHeader">
                                                                                <Border Background="#FFCBCBCB" Padding="0,0,0,1">
                                                                                    <Border Background="#FFE5E5E5">
                                                                                        <Button xpfCore:RoutedCommand.Command="{StaticResource ChangeGroupExpandedCommandProvider}" xpfCore:RoutedCommand.CommandParameter="{Binding}">
                                                                                            <Button.Template>
                                                                                                <ControlTemplate>
                                                                                                    <Border Background="Transparent">
                                                                                                        <dxn:ImageAndTextContentPresenter ImageFallbackSize="24" x:Name="groupHeaderLabel" Grid.Column="0" Content="{Binding}"
                                                                                                            Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource TemplatedParent}}"
                                                                                                            ContentTemplateSelector="{Binding Path=ActualHeaderTemplateSelector}" />
                                                                                                    </Border>
                                                                                                </ControlTemplate>
                                                                                            </Button.Template>
                                                                                        </Button>
                                                                                    </Border>
                                                                                </Border>
                                                                            </ControlTemplate>
                                                                        </dxn:ExplorerBarView.GroupHeaderTemplate>
                                                                    </dxn:ExplorerBarView>
                                                                </dxn:NavBarControl.View>
                                                                <dxn:NavBarControl.Groups>
                                                                    <dxn:NavBarGroup Header="Favorite Folders">
                                                                        <dxn:NavBarGroup.Items>
                                                                            <dxn:NavBarItem ImageSource="/NavBarDemo;component/Images/NavigationPaneOptionsDemo/Inbox_17.png" Content="Inbox" />
                                                                            <dxn:NavBarItem ImageSource="/NavBarDemo;component/Images/NavigationPaneOptionsDemo/Sent-Items_17.png" Content="Sent Items" />
                                                                        </dxn:NavBarGroup.Items>
                                                                    </dxn:NavBarGroup>
                                                                    <dxn:NavBarGroup Header="Mail Folders">
                                                                        <dxn:NavBarGroup.Items>
                                                                            <dxn:NavBarItem Content="Deleted Items" ImageSource="/NavBarDemo;component/Images/NavigationPaneOptionsDemo/Deleted-Items_17.png" />
                                                                            <dxn:NavBarItem Content="Drafts" ImageSource="/NavBarDemo;component/Images/NavigationPaneOptionsDemo/Drafts_17.png" />
                                                                            <dxn:NavBarItem Content="Junk E-mail" ImageSource="/NavBarDemo;component/Images/NavigationPaneOptionsDemo/Junk-E-mail_17.png" />
                                                                            <dxn:NavBarItem Content="Outbox" ImageSource="/NavBarDemo;component/Images/NavigationPaneOptionsDemo/Outbox_17.png" />
                                                                            <dxn:NavBarItem Content="RSS Feeds" ImageSource="/NavBarDemo;component/Images/NavigationPaneOptionsDemo/RSS-Feeds_17.png" />
                                                                            <dxn:NavBarItem Content="Sent Items" ImageSource="/NavBarDemo;component/Images/NavigationPaneOptionsDemo/Sent-Items_17.png" />
                                                                            <dxn:NavBarItem Content="Search Folders" ImageSource="/NavBarDemo;component/Images/NavigationPaneOptionsDemo/Search-Folders_17.png" />
                                                                        </dxn:NavBarGroup.Items>
                                                                    </dxn:NavBarGroup>
                                                                </dxn:NavBarControl.Groups>
                                                            </dxn:NavBarControl>
                                                        </dxn:NavBarGroup.Content>
                                                    </dxn:NavBarGroup>
                                                    <dxn:NavBarGroup Header="Calendar" DisplaySource="Content" ImageSource="/NavBarDemo;component/Images/NavigationPaneOptionsDemo/Calendar_25.png">
                                                        <dxn:NavBarGroup.Content>
                                                            <dxe:DateEditCalendar x:Name="calendar" DateTime="Today" ShowClearButton="False" />
                                                        </dxn:NavBarGroup.Content>
                                                    </dxn:NavBarGroup>
                                                    <dxn:NavBarGroup Header="Contacts" DisplaySource="Content" ImageSource="/NavBarDemo;component/Images/NavigationPaneOptionsDemo/Contacts_25.png">
                                                        <dxn:NavBarGroup.Content>
                                                            <dxn:NavBarControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,0">
                                                                <dxn:NavBarControl.Resources>
                                                                    <ControlTemplate x:Key="CommonElementsThemeKey_GroupItemsContainerTemplate" TargetType="dxn:GroupItemsContainer">
                                                                        <ContentPresenter Margin="1,1,1,0" x:Name="content" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                                                                    </ControlTemplate>
                                                                    <Style TargetType="dxn:GroupItemsContainer">
                                                                        <Style.Setters>
                                                                            <Setter Property="Template" Value="{StaticResource CommonElementsThemeKey_GroupItemsContainerTemplate}" />
                                                                        </Style.Setters>
                                                                    </Style>
                                                                </dxn:NavBarControl.Resources>
                                                                <dxn:NavBarControl.View>
                                                                    <dxn:ExplorerBarView>
                                                                        <dxn:ExplorerBarView.GroupHeaderTemplate>
                                                                            <ControlTemplate TargetType="dxn:NavBarGroupHeader">
                                                                                <Border Background="#FFCBCBCB" Padding="0,0,0,1">
                                                                                    <Border Background="#FFE5E5E5">
                                                                                        <Button xpfCore:RoutedCommand.Command="{StaticResource ChangeGroupExpandedCommandProvider}" xpfCore:RoutedCommand.CommandParameter="{Binding}">
                                                                                            <Button.Template>
                                                                                                <ControlTemplate>
                                                                                                    <Border Background="Transparent">
                                                                                                        <dxn:ImageAndTextContentPresenter ImageFallbackSize="24" x:Name="groupHeaderLabel" Grid.Column="0" Content="{Binding}"
                                                                                                            Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource TemplatedParent}}"
                                                                                                            ContentTemplateSelector="{Binding Path=ActualHeaderTemplateSelector}" />
                                                                                                    </Border>
                                                                                                </ControlTemplate>
                                                                                            </Button.Template>
                                                                                        </Button>
                                                                                    </Border>
                                                                                </Border>
                                                                            </ControlTemplate>
                                                                        </dxn:ExplorerBarView.GroupHeaderTemplate>
                                                                    </dxn:ExplorerBarView>
                                                                </dxn:NavBarControl.View>
                                                                <dxn:NavBarControl.Groups>
                                                                    <dxn:NavBarGroup Header="My Contacts">
                                                                        <dxn:NavBarGroup.Items>
                                                                            <dxn:NavBarItem Content="Contacts" ImageSource="/NavBarDemo;component/Images/NavigationPaneOptionsDemo/Contacts_17.png" />
                                                                        </dxn:NavBarGroup.Items>
                                                                    </dxn:NavBarGroup>
                                                                    <dxn:NavBarGroup Header="Current View" DisplaySource="Content">
                                                                        <dxn:NavBarGroup.Content>
                                                                            <StackPanel>
                                                                                <RadioButton>Business Card</RadioButton>
                                                                                <RadioButton>Address Card</RadioButton>
                                                                                <RadioButton>Detailed Address Card</RadioButton>
                                                                                <RadioButton>Phone List</RadioButton>
                                                                                <RadioButton>By Category</RadioButton>
                                                                                <RadioButton>By Company</RadioButton>
                                                                                <RadioButton>By Location</RadioButton>
                                                                                <RadioButton>Outlook Data Files</RadioButton>
                                                                            </StackPanel>
                                                                        </dxn:NavBarGroup.Content>
                                                                    </dxn:NavBarGroup>
                                                                </dxn:NavBarControl.Groups>
                                                            </dxn:NavBarControl>
                                                        </dxn:NavBarGroup.Content>
                                                    </dxn:NavBarGroup>
                                                    <dxn:NavBarGroup Header="Tasks" DisplaySource="Content" ImageSource="/NavBarDemo;component/Images/NavigationPaneOptionsDemo/Tasks_25.png">
                                                        <dxn:NavBarGroup.Content>
                                                            <dxn:NavBarControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="1,0">
                                                                <dxn:NavBarControl.Resources>
                                                                    <ControlTemplate x:Key="CommonElementsThemeKey_GroupItemsContainerTemplate" TargetType="dxn:GroupItemsContainer">
                                                                        <ContentPresenter Margin="1,1,1,0" x:Name="content" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                                                                    </ControlTemplate>
                                                                    <Style TargetType="dxn:GroupItemsContainer">
                                                                        <Style.Setters>
                                                                            <Setter Property="Template" Value="{StaticResource CommonElementsThemeKey_GroupItemsContainerTemplate}" />
                                                                        </Style.Setters>
                                                                    </Style>
                                                                </dxn:NavBarControl.Resources>
                                                                <dxn:NavBarControl.View>
                                                                    <dxn:ExplorerBarView>
                                                                        <dxn:ExplorerBarView.GroupHeaderTemplate>
                                                                            <ControlTemplate TargetType="dxn:NavBarGroupHeader">
                                                                                <Border Background="#FFCBCBCB" Padding="0,0,0,1">
                                                                                    <Border Background="#FFE5E5E5">
                                                                                        <Button xpfCore:RoutedCommand.Command="{StaticResource ChangeGroupExpandedCommandProvider}" xpfCore:RoutedCommand.CommandParameter="{Binding}">
                                                                                            <Button.Template>
                                                                                                <ControlTemplate>
                                                                                                    <Border Background="Transparent">
                                                                                                        <dxn:ImageAndTextContentPresenter ImageFallbackSize="24" x:Name="groupHeaderLabel" Grid.Column="0" Content="{Binding}"
                                                                                                            Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource TemplatedParent}}"
                                                                                                            ContentTemplateSelector="{Binding Path=ActualHeaderTemplateSelector}" />
                                                                                                    </Border>
                                                                                                </ControlTemplate>
                                                                                            </Button.Template>
                                                                                        </Button>
                                                                                    </Border>
                                                                                </Border>
                                                                            </ControlTemplate>
                                                                        </dxn:ExplorerBarView.GroupHeaderTemplate>
                                                                    </dxn:ExplorerBarView>
                                                                </dxn:NavBarControl.View>
                                                                <dxn:NavBarControl.Groups>
                                                                    <dxn:NavBarGroup Header="My Tasks">
                                                                        <dxn:NavBarGroup.Items>
                                                                            <dxn:NavBarItem Content="To-Do List" ImageSource="/NavBarDemo;component/Images/NavigationPaneOptionsDemo/To-Do-List_17.png" />
                                                                            <dxn:NavBarItem Content="Tasks" ImageSource="/NavBarDemo;component/Images/NavigationPaneOptionsDemo/Tasks_17.png" />
                                                                        </dxn:NavBarGroup.Items>
                                                                    </dxn:NavBarGroup>
                                                                    <dxn:NavBarGroup Header="Current View" DisplaySource="Content">
                                                                        <dxn:NavBarGroup.Content>
                                                                            <StackPanel>
                                                                                <RadioButton>Simple List</RadioButton>
                                                                                <RadioButton>Detailed List</RadioButton>
                                                                                <RadioButton>Active Tasks</RadioButton>
                                                                                <RadioButton>Next Seven Days</RadioButton>
                                                                                <RadioButton>Overdue Tasks</RadioButton>
                                                                                <RadioButton>By Category</RadioButton>
                                                                                <RadioButton>Assignment</RadioButton>
                                                                                <RadioButton>By Person Responsible</RadioButton>
                                                                                <RadioButton>Completed Tasks</RadioButton>
                                                                                <RadioButton>Task Timeline</RadioButton>
                                                                                <RadioButton>Server Tasks</RadioButton>
                                                                                <RadioButton>Outlook Data Files</RadioButton>
                                                                                <RadioButton>To-Do List</RadioButton>
                                                                            </StackPanel>
                                                                        </dxn:NavBarGroup.Content>
                                                                    </dxn:NavBarGroup>
                                                                </dxn:NavBarControl.Groups>
                                                            </dxn:NavBarControl>
                                                        </dxn:NavBarGroup.Content>
                                                    </dxn:NavBarGroup>
                                                </dxn:NavBarControl.Groups>
                                            </dxn:NavBarControl>
                                        </local:NavBarDemoGridControl>
                                    </dxdb:DemoModuleControl>
                                </local:NavBarDemoModule>

                                0

                                Hi Erhan,

                                I'm afraid that currently I cannot provide you with complete C# code that creates the provided control, since this task requires a lot of work. Please do not hesitate to contact us if you encounter any difficulty while accomplishing your task.

                                I should also say that I still do not understand the necessity to create such controls from code behind. This approach seems rather odd, and I believe that we can find a more suitable solution if you describe your task in greater detail. We look forward to your feedback.

                                Thanks,
                                Dmitry

                                0

                                Hi Dmitry,

                                 I think you're right, thank you for your interest.
                                 Figured out my problem as follows:

                                [XAML]

                                <navigation:Page x:Class="SLNavigationSample.NavigationPage"
                                               xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                                               xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                                               xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                                               xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                                               xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
                                               xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
                                               xmlns:dxre="http://schemas.devexpress.com/winfx/2008/xaml/richedit"
                                               xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon"
                                               xmlns:dxd="http://schemas.devexpress.com/winfx/2008/xaml/docking"
                                               xmlns:xpfCore="clr-namespace:DevExpress.Xpf.Core.WPFCompatibility;assembly=DevExpress.Xpf.Core.v11.2"
                                               mc:Ignorable="d" xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
                                               xmlns:dxn="http://schemas.devexpress.com/winfx/2008/xaml/navbar"
                                           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
                                           d:DesignWidth="640" d:DesignHeight="480"
                                           Title="Navigation Page">
                                    <UserControl.Resources>
                                        <ResourceDictionary>
                                            <dxn:ChangeGroupExpandedCommandProvider x:Key="ChangeGroupExpandedCommandProvider" />
                                            <ControlTemplate TargetType="dxn:NavBarGroupHeader" x:Key="ChildNavBarGroupHeader">
                                                <Border Background="#FFCBCBCB" Padding="0,0,0,1">
                                                    <Border Background="#FFE5E5E5">
                                                        <Button xpfCore:RoutedCommand.Command="{StaticResource ChangeGroupExpandedCommandProvider}" xpfCore:RoutedCommand.CommandParameter="{Binding}">
                                                            <Button.Template>
                                                                <ControlTemplate>
                                                                    <Border Background="Transparent">
                                                                        <dxn:ImageAndTextContentPresenter ImageFallbackSize="24" x:Name="groupHeaderLabel" Grid.Column="0" Content="{Binding}"
                                                                                                            Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource TemplatedParent}}"
                                                                                                            ContentTemplateSelector="{Binding Path=ActualHeaderTemplateSelector}" />
                                                                    </Border>
                                                                </ControlTemplate>
                                                            </Button.Template>
                                                        </Button>
                                                    </Border>
                                                </Border>
                                            </ControlTemplate>
                                        </ResourceDictionary>
                                    </UserControl.Resources>
                                    <Grid x:Name="LayoutRoot">
                                        
                                    </Grid>
                                </navigation:Page>

                                [C#]

                                NavBarControl MainNavBarControl = new NavBarControl();
                                            MainNavBarControl.Name = "MainNavBarControl";
                                            NavigationPaneView MainNavigationPaneView = new NavigationPaneView();

                                            NavBarGroup MailNavBarGroup = new NavBarGroup();
                                            MailNavBarGroup.Name = "MailNavBarGroup";
                                            MailNavBarGroup.Header = "Mail";
                                            MailNavBarGroup.DisplaySource = DisplaySource.Content;
                                            BitmapImage BitmapImageMailNavBarGroup = new BitmapImage(new Uri(@"/SLDockingSample;component/Images/NavigationPaneOptionsDemo/Mail_25.png", UriKind.RelativeOrAbsolute));
                                            MailNavBarGroup.ImageSource = BitmapImageMailNavBarGroup;

                                            NavBarControl SubNavBarControl = new NavBarControl();
                                            SubNavBarControl.Name = "SubNavBarControl";
                                            SubNavBarControl.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;
                                            SubNavBarControl.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
                                            SubNavBarControl.Margin = new Thickness(1, 0, 0, 0);

                                            ExplorerBarView SubExplorerBarView = new ExplorerBarView();
                                            SubExplorerBarView.Name = "SubExplorerBarView";

                                            ControlTemplate SubControlTemplate = new ControlTemplate();
                                            SubControlTemplate = (ControlTemplate)Resources["ChildNavBarGroupHeader"];

                                            NavBarGroup ChildNavBarGroup = new NavBarGroup();
                                            ChildNavBarGroup.Name = "ChildNavBarGroup";
                                            ChildNavBarGroup.Header = "Favorite Folders";

                                            BitmapImage BitmapImageInbox = new BitmapImage(new Uri(@"/SLDockingSample;component/Images/NavigationPaneOptionsDemo/Mail_25.png", UriKind.RelativeOrAbsolute));
                                            NavBarItem NavBarItemInbox = new NavBarItem();
                                            NavBarItemInbox.Content = "Inbox";
                                            NavBarItemInbox.ImageSource = BitmapImageInbox;

                                            ChildNavBarGroup.Items.Add(NavBarItemInbox);
                                            SubNavBarControl.Groups.Add(ChildNavBarGroup);
                                            SubExplorerBarView.GroupHeaderTemplate = SubControlTemplate;
                                            SubNavBarControl.View = SubExplorerBarView;
                                            MailNavBarGroup.Content = SubNavBarControl;
                                            MainNavBarControl.Groups.Add(MailNavBarGroup);
                                            MainNavBarControl.View = MainNavigationPaneView;
                                            LayoutRoot.Children.Add(MainNavBarControl);
                                Thanks,
                                 Erhan

                                0

                                Thanks

                                0

                                You are welcome Erhan. I'm glad to hear that the problem is now solved. Feel free to contact us if you need any further assistance.

                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners