Problem with getting the LinkGroups (Only the first linkgroup is visible)

Oct 30, 2013 at 1:24 AM
Here's the code for testing.
public partial class MainWindow
{
    public MainWindow()
    {
        InitializeComponent();

        //foreach (var item in new ApplicationController().GetMenu()) {
        //    MenuLinkGroups.li
        //}

        MenuLinkGroups = BuildMenu();
    }


    public LinkGroupCollection BuildMenu() {
        var linkGroups = new LinkGroupCollection();

        #region * General Group *
        var general = new LinkGroup() {
            DisplayName = "General",
            GroupName = "General"
        };
        //new Uri("/Content/" + content + ".xaml", UriKind.RelativeOrAbsolute);
        general.Links.Add(new Link() {
            DisplayName = "home",
            Source = new Uri(@"/Pages/Home.xaml", UriKind.RelativeOrAbsolute),
        });
        general.Links.Add(new Link() {
            DisplayName = "Dashboard",
            Source = new Uri(@"/Pages/Home.xaml", UriKind.RelativeOrAbsolute),
        });
        #endregion

        #region * Setup Group *
        var setup = new LinkGroup() {
            DisplayName = "Setup",
            GroupName = "Setup"
        };
        setup.Links.Add(new Link() {
            DisplayName = "Users",
            Source = new Uri(@"/Pages/UserSetupPage.xaml", UriKind.RelativeOrAbsolute),
        });
        setup.Links.Add(new Link() {
            DisplayName = "Access Groups",
            Source = new Uri(@"/Pages/AccessGroupSetupPage.xaml", UriKind.RelativeOrAbsolute),
        });
        setup.Links.Add(new Link() {
            DisplayName = "Products",
            Source = new Uri(@"/Pages/ProductSetupPage.xaml", UriKind.RelativeOrAbsolute),
        });
        setup.Links.Add(new Link() {
            DisplayName = "Product Cateogories",
            Source = new Uri(@"/Pages/ProductCategorySetupPage.xaml", UriKind.RelativeOrAbsolute),
        });
        setup.Links.Add(new Link() {
            DisplayName = "Vendors",
            Source = new Uri(@"/Pages/VendorSetupPage.xaml", UriKind.RelativeOrAbsolute),
        });
        setup.Links.Add(new Link() {
            DisplayName = "Agents",
            Source = new Uri(@"/Pages/AgentSetupPage.xaml", UriKind.RelativeOrAbsolute),
        });
        setup.Links.Add(new Link() {
            DisplayName = "Payment Types",
            Source = new Uri(@"/Pages/PaymentTypeSetupPage.xaml", UriKind.RelativeOrAbsolute),
        });
        setup.Links.Add(new Link() {
            DisplayName = "System Logs",
            Source = new Uri(@"/Pages/SystemLogSetupPage.xaml", UriKind.RelativeOrAbsolute),
        });
        setup.Links.Add(new Link() {
            DisplayName = "System Parameters",
            Source = new Uri(@"/Pages/SystemParemterSetupPage.xaml", UriKind.RelativeOrAbsolute),
        });
        setup.Links.Add(new Link() {
            DisplayName = "Discounts",
            Source = new Uri(@"/Pages/DiscountSetupPage.xaml", UriKind.RelativeOrAbsolute),
        });



        #endregion

        var transaction = new LinkGroup() {
            DisplayName = "General",
            GroupName = "General"
        };

        linkGroups.Add(general);
        //linkGroups.Add(transaction);
        linkGroups.Add(setup);


        return linkGroups;
    }
}
Coordinator
Oct 30, 2013 at 1:31 AM
Remove the GroupName assignments from your LinkGroup instances. GroupName uniquely identifies a group of link groups to be displayed at a single time. I'm aware that the term 'GroupName' is a bit misleading, this might change in a future release.
Oct 30, 2013 at 1:39 AM
Great, it works..! Thanks Kozw. MUI is really cool, I'm excited with the next realease