public void OnSoftkeyServiceVisibleEvent(object sender, Shell.SoftkeyVisibleState state)
 {
     Shell.SoftkeyService obj = (Shell.SoftkeyService)sender;
     textSoftkeyServiceVisible.Text = $"Visible: {state}";
     if (state == Shell.SoftkeyVisibleState.Shown)
     {
         obj.Show();
     }
     else
     {
         obj.Hide();
     }
 }
        private void BtnSoftkeyService_ClickEvent(object sender, Button.ClickEventArgs e)
        {
            Window window = NUIApplication.GetDefaultWindow();

            window.WindowSize     = new Size(500, 500);
            window.WindowPosition = new Position(0, 700);

            window.Remove(BtnService);
            window.Remove(BtnClient);
            window.Remove(BtnSoftkeyService);
            window.Remove(BtnSoftkeyClient);
            softkeyService = new Shell.SoftkeyService(tzShell, window);

            textSoftkeyServiceVisible                     = new TextLabel($"Visible: None");
            textSoftkeyServiceVisible.Position            = new Position(0, -100);
            textSoftkeyServiceVisible.HorizontalAlignment = HorizontalAlignment.Center;
            textSoftkeyServiceVisible.VerticalAlignment   = VerticalAlignment.Center;
            textSoftkeyServiceVisible.TextColor           = Color.Blue;
            textSoftkeyServiceVisible.PointSize           = 12.0f;
            textSoftkeyServiceVisible.HeightResizePolicy  = ResizePolicyType.FillToParent;
            textSoftkeyServiceVisible.WidthResizePolicy   = ResizePolicyType.FillToParent;
            window.Add(textSoftkeyServiceVisible);

            textSoftkeyServiceExpand                     = new TextLabel($"Expand: None");
            textSoftkeyServiceExpand.Position            = new Position(0, 0);
            textSoftkeyServiceExpand.HorizontalAlignment = HorizontalAlignment.Center;
            textSoftkeyServiceExpand.VerticalAlignment   = VerticalAlignment.Center;
            textSoftkeyServiceExpand.TextColor           = Color.Blue;
            textSoftkeyServiceExpand.PointSize           = 12.0f;
            textSoftkeyServiceExpand.HeightResizePolicy  = ResizePolicyType.FillToParent;
            textSoftkeyServiceExpand.WidthResizePolicy   = ResizePolicyType.FillToParent;
            window.Add(textSoftkeyServiceExpand);

            textSoftkeyServiceOpacity                     = new TextLabel($"Opacity: None");
            textSoftkeyServiceOpacity.Position            = new Position(0, 100);
            textSoftkeyServiceOpacity.HorizontalAlignment = HorizontalAlignment.Center;
            textSoftkeyServiceOpacity.VerticalAlignment   = VerticalAlignment.Center;
            textSoftkeyServiceOpacity.TextColor           = Color.Blue;
            textSoftkeyServiceOpacity.PointSize           = 12.0f;
            textSoftkeyServiceOpacity.HeightResizePolicy  = ResizePolicyType.FillToParent;
            textSoftkeyServiceOpacity.WidthResizePolicy   = ResizePolicyType.FillToParent;
            window.Add(textSoftkeyServiceOpacity);

            Button BtnShow = new Button()
            {
                Text     = "Show",
                Size     = new Size(200, 100),
                Position = new Position(50, 800),
                Margin   = 10,
            };
            Button BtnHide = new Button()
            {
                Text     = "Hide",
                Size     = new Size(200, 100),
                Position = new Position(410, 800),
                Margin   = 10,
            };

            window.Add(BtnShow);
            window.Add(BtnHide);

            BtnShow.ClickEvent += BtnSoftkeyServiceShow_ClickEvent;
            BtnHide.ClickEvent += BtnSoftkeyServiceHide_ClickEvent;

            softkeyService.VisibleChanged += OnSoftkeyServiceVisibleEvent;
            softkeyService.ExpandChanged  += OnSoftkeyServiceExpandEvent;
            softkeyService.OpacityChanged += OnSoftkeyServiceOpacityEvent;
        }