Beispiel #1
0
 void UpdateCurrentItem()
 {
     _shellItem?.Dispose();
     if (Element.CurrentItem != null)
     {
         _shellItem = CreateShellItem(Element.CurrentItem);
         _shellItem.Control.SetAlignment(-1, -1);
         _shellItem.Control.SetWeight(1, 1);
         _native.Main = _shellItem.Control;
     }
     else
     {
         _native.Main = null;
     }
 }
Beispiel #2
0
        public ShellMoreToolbar(ShellItemRenderer renderer) : base(System.Maui.Maui.NativeParent)
        {
            _shellItemRenderer = renderer;

            Homogeneous     = true;
            AlignmentX      = -1;
            AlignmentY      = -1;
            WeightX         = 1;
            WeightY         = 1;
            BackgroundColor = ShellRenderer.DefaultBackgroundColor.ToNative();
            ItemSelected   += OnItemSelected;
            _defaultClass   = new GenItemClass("full")
            {
                GetContentHandler = GetContent,
            };
        }