This project is read-only.

How to bind links to TitleLinks using viewModel

Aug 23, 2014 at 11:32 AM
Edited Aug 23, 2014 at 11:37 AM
How can we bind link group to TitleLinks in modern ui
        MenuLinkGroups="{Binding MenuLinkGroups}"
        TitleLinks="{Binding TitleLinkGroup}">
and view model contains
private LinkGroupCollection _menuLinkGroups;
        public LinkGroupCollection MenuLinkGroups
            get { return _menuLinkGroups; }
            private set
                _menuLinkGroups = value;

        private LinkGroup _titleLinkGroup;
        public LinkGroup TitleLinkGroup
            get { return _titleLinkGroup; }
                _titleLinkGroup = value;
and i am setting menu items dynamically after logged in successfully.
LinkGroup salesGroup = new LinkGroup { GroupName = "SalesGroup", DisplayName = "Sales" };
Link cacheRegister = new Link { DisplayName = "Cache Register", Source = new Uri(@"/Pages/Sales/Sales.xaml", UriKind.Relative) };

Link settings = new Link { DisplayName = "Settings", Source = new Uri(@"/Pages/Settings.xaml", UriKind.Relative) };
Menu link group is binding correctly but Title Links are blank area.
Did i do something wrong... it's great someone can help.
Aug 23, 2014 at 2:39 PM
ModernWindow.TitleLinks is of type LinkCollection, not LinkGroup
Aug 23, 2014 at 6:32 PM
yeah it worked thanks very much.
Feb 20, 2015 at 3:06 PM
Any guidance on how to bind from POCOs, by chance? It would be nice to provide a datatemplate of some sort that converts a POCO/model to a Link.