예제 #1
0
 public static int GetTvFocusedButtonHeight(this INavigationDrawer drawer)
 {
     if (s_defaultDrawerItemHeight > 0)
     {
         return(s_defaultDrawerItemHeight);
     }
     return(s_defaultDrawerItemHeight = ThemeConstants.Shell.Resources.DefaultDrawerItemHeight);
 }
예제 #2
0
 public NavigationService(IActivityLifeTimeMonitor activityLifeTimeMonitor,
                          ITransitionService transitionService,
                          INavigationDrawer navigationDrawer,
                          IParamsHolder paramsHolder,
                          Dictionary <Type, Tuple <Type, int> > customMappings)
 {
     _activityLifeTimeMonitor = activityLifeTimeMonitor;
     _transitionService       = transitionService;
     _navigationDrawer        = navigationDrawer;
     _paramsHolder            = paramsHolder;
     _customMappings          = customMappings;
     InitPagesMappings();
 }
예제 #3
0
        protected override void OnElementChanged(ElementChangedEventArgs <Shell> e)
        {
            if (_native == null)
            {
                _native                = CreateNavigationDrawer();
                _navigationView        = CreateNavigationView();
                _native.NavigationView = _navigationView as ElmSharp.EvasObject;
                _native.Toggled       += OnFlyoutIsPresentedChanged;
                SetNativeView(_native as ElmSharp.EvasObject);

                InitializeFlyout();
            }
            base.OnElementChanged(e);
        }
예제 #4
0
        protected override void OnElementChanged(ElementChangedEventArgs <Shell> e)
        {
            if (_drawer == null)
            {
                _drawer                = CreateNavigationDrawer();
                _navigationView        = CreateNavigationView();
                _drawer.NavigationView = _navigationView.NativeView;
                _drawer.Toggled       += OnFlyoutIsPresentedChanged;
                SetNativeView(_drawer.TargetView);

                InitializeFlyout();
            }
            base.OnElementChanged(e);
            UpdateFlyoutHeader(false);
        }
예제 #5
0
        public ShellView(EvasObject parent) : base(parent)
        {
            NativeParent                   = parent;
            _navigationDrawer              = CreateNavigationDrawer();
            _navigationView                = CreateNavigationView();
            _navigationView.LayoutUpdated += OnNavigationViewLayoutUpdated;
            _navigationView.Content        = _itemsView = CreateItemsView();

            _navigationDrawer.NavigationView = _navigationView.TargetView;
            _navigationDrawer.Toggled       += OnDrawerToggled;

            _navigationDrawer.TargetView.SetAlignment(-1.0, -1.0);
            _navigationDrawer.TargetView.SetWeight(1.0, 1.0);
            _navigationDrawer.TargetView.Show();
            PackEnd(_navigationDrawer.TargetView);
        }
예제 #6
0
파일: ShellView.cs 프로젝트: Glepooek/maui
        public ShellView(EvasObject parent) : base(parent)
        {
            PlatformParent                 = parent;
            _navigationDrawer              = CreateNavigationDrawer();
            _navigationView                = CreateNavigationView();
            _navigationView.LayoutUpdated += OnNavigationViewLayoutUpdated;
            _navigationView.Content        = _itemsView = CreateItemsView();
            _navigationDrawer.DrawerWidth  = ThemeConstants.Shell.Resources.DefaultFlyoutItemWidth;

            _navigationDrawer.NavigationView = _navigationView.TargetView;
            _navigationDrawer.Toggled       += OnDrawerToggled;

            _navigationDrawer.TargetView.SetAlignment(-1.0, -1.0);
            _navigationDrawer.TargetView.SetWeight(1.0, 1.0);
            _navigationDrawer.TargetView.Show();

            Show();
            PackEnd(_navigationDrawer.TargetView);
        }
예제 #7
0
 public static double GetFlyoutCollapseRatio(this INavigationDrawer drawer)
 {
     return(0.05);
 }
예제 #8
0
 public static double GetFlyoutRatio(this INavigationDrawer drawer, int width, int height)
 {
     return(s_navigationDrawerRatio = (width > height) ? 0.4 : 0.83);
 }
예제 #9
0
 public static double GetTvDrawerCloseRatio(this INavigationDrawer drawer)
 {
     return(ThemeConstants.Shell.Resources.TV.DefaultDrawerCloseRatio);
 }
예제 #10
0
 public static double GetTvDrawerRatio(this INavigationDrawer drawer, int width, int height)
 {
     return(s_navigationDrawerRatio = (width > height) ? ThemeConstants.Shell.Resources.TV.DefaultDrawerRatio : ThemeConstants.Shell.Resources.DefaultDrawerRatio);
 }