Пример #1
0
        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            TemplateSettings = new HamburgerMenuTemplateSettings(CompactPaneLength, OpenPaneLength);

            UpdateDisplayMode(DisplayMode, IsPaneOpen);

            LightDismissLayer = (Rectangle)GetTemplateChild(LightDismissLayerPart);
            PanArea           = (Rectangle)GetTemplateChild(PanAreaPart);
            _contentFrame     = (Frame)GetTemplateChild(ContentFramePart);

            if (_contentFrame != null)
            {
                _navigationService = BootStrapper.Current.NavigationServiceFactory(BootStrapper.BackButton.Attach, BootStrapper.ExistingContent.Exclude, _contentFrame);
                FrameFacade        = _navigationService.FrameFacade;

                if (DefaultPageType != null)
                {
                    _navigationService.Navigate(DefaultPageType);
                }
            }
        }
Пример #2
0
 private void OnCompactPaneLengthChanged(double newValue) => TemplateSettings = new HamburgerMenuTemplateSettings(newValue, OpenPaneLength);