Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hi Team

                                    I have BarManager in the Mainwindow.xaml. I am trying to use MVVM pattern to load the BarManager with the Menu in the "ViewModel" and simple Bind it to the "View" (MainWindow) using the BarSource property. Please let me know if this achievable. Please note i saw sample on the DevExpress site and it is confusing. I dont see any Menu item displayed.

                                    Thanks
                                    Jai

                                    xaml Page
                                    <dxb:BarManager BarsSource="{Binding EmployeeVM.Source}"> </dxb:BarManager> <dxd:DockLayoutManager Name="dockLayoutManager" ClosingBehavior="ImmediatelyRemove"> <dxd:LayoutGroup Orientation="Horizontal"> <dxd:DocumentGroup x:Name="MdiContainer" DestroyOnClosingChildren="True" MDIStyle="MDI" AllowFloat="False" AllowHide="False" AllowDock="False" AllowActivate="True" AllowExpand="False" ClosePageButtonShowMode="NoWhere"> </dxd:DocumentGroup> </dxd:LayoutGroup> </dxd:DockLayoutManager>





                                    ViewModel code
                                    public BarManager Source { get { BarManager obj = new BarManager();
                                    BarButtonItem menuFileRow = new BarButtonItem(); menuFileRow.Content = "File"; menuFileRow.Command = new DelegateCommand<object>(this.FileNew);
                                    BarSubItemLink newlink = new BarSubItemLink(); newlink.ItemLinks.Add(menuFileRow);
                                    Bar MainMenu = new Bar(); MainMenu.ItemLinks.Add(newlink); obj.Bars.Add(MainMenu); return obj;
                                    } }

                                You must  log in  or  register  to leave comments

                                1 Solution

                                0

                                Hello Jai,
                                You can find a simple sample showing how to implement a menu with an MVVM pattern in the Q432419: MVVM Bar Menu examples thread. Please try it and let me know if it is helpful.
                                I look forward to hearing from you.

                                You must  log in  or  register  to leave comments

                                To start a chat you should create a support ticket


                                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