Ejemplo n.º 1
0
        private void UpdateTitleLinks()
        {
            var value = AppAppearanceManager.Instance.DownloadsInSeparatePage;

            DownloadsEntry.IsAvailable = value;
            BrowserLinkGroup.GroupKey  = value ? @"downloads" : @"content";
            TitleLinks.OfType <TitleLink>().Where(x => x.GroupKey != null)
            .ForEach(x => x.IsShown = AppAppearanceManager.Instance.IsTitleLinkVisible(x.GroupKey) != false);
            AppAppearanceManager.Instance.TitleLinkEntries.ForEach(x => x.PropertyChanged += OnTitleLinkEnabledChanged);
        }
Ejemplo n.º 2
0
        private void OnTitleLinkEnabledChanged(object o, PropertyChangedEventArgs args)
        {
            var entry = (TitleLinkEnabledEntry)o;
            var link  = TitleLinks.OfType <TitleLink>().FirstOrDefault(x => x.GroupKey == entry.Id);

            if (link != null)
            {
                link.IsShown = entry.IsEnabled && entry.IsAvailable;
            }
        }
Ejemplo n.º 3
0
        private void OnFrameNavigated(object sender, NavigationEventArgs navigationEventArgs)
        {
            FrameNavigated?.Invoke(this, navigationEventArgs);

            var activeKey = _menu?.SelectedLinkGroup?.GroupKey;

            foreach (var link in TitleLinks.OfType <TitleLink>())
            {
                link.IsActive = link.GroupKey == activeKey;
            }
        }