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

            Window.Appearance      = NSAppearance.GetAppearance(NSAppearance.NameVibrantDark);
            Window.TitleVisibility = NSWindowTitleVisibility.Hidden;

            SetupStatusDisplayTextField();

            _ = NotificationCenter.AddObserver(ToggleCollapsed.Name, notification =>
            {
                NSNumber?collapsed    = (NSNumber)notification.UserInfo.ObjectForKey(IsCollapsed.NSString());
                NSNumber?segmentIndex = (NSNumber)notification.UserInfo.ObjectForKey(SegmentIndex.NSString());
                ToggleSidebarSegmentedControl.SetSelected(!collapsed.BoolValue, segmentIndex.NIntValue);
            });
        }
        void ReleaseDesignerOutlets()
        {
            if (ToggleSidebarSegmentedControl != null)
            {
                ToggleSidebarSegmentedControl.Dispose();
                ToggleSidebarSegmentedControl = null;
            }

            if (StatusDisplayTextField != null)
            {
                StatusDisplayTextField.Dispose();
                StatusDisplayTextField = null;
            }

            if (Toolbar != null)
            {
                Toolbar.Dispose();
                Toolbar = null;
            }
        }