protected virtual void CreateCommandButton(GridViewCommandColumnCustomButton button)
        {
            var eventArgs = new ASPxGridViewCustomButtonEventArgs(button, VisibleIndex, CellType, IsRowEditing);

            Grid.RaiseCustomButtonInitialize_Internal(eventArgs);

            switch (eventArgs.Visible)
            {
            case DefaultBoolean.False:
                return;

            case DefaultBoolean.Default:
                if (button._IsVisible(CellType, IsRowEditing))
                {
                    break;
                }

                return;
            }

            CreateCommandButtonSpacerIfNeeded();

            ControlsContainer.Add(
                new GridViewCommandColumnButtonControl(eventArgs, Grid, Scripts.GetCustomButtonFuncArgs, true)
                );
        }
 private void _timer_Tick(object sender, object e)
 {
     _timer.Stop();
     ControlsContainer.Fade(0, 1000).Start();
     ControlsContainer.IsHitTestVisible = false;
     _navVisible = false;
 }
        private void SlideshowPage_KeyDown(object sender, KeyRoutedEventArgs e)
        {
            if (e.Key == Windows.System.VirtualKey.GamepadRightShoulder)
            {
                Next();
                e.Handled = true;
            }
            else if (e.Key == Windows.System.VirtualKey.GamepadLeftShoulder)
            {
                Previous();
                e.Handled = true;
            }
            else if (!_navVisible)
            {
                _navVisible = true;
                e.Handled   = true;
                if (App.IsXbox())
                {
                    NextButton.Focus(FocusState.Keyboard);
                }

                ControlsContainer.IsHitTestVisible = true;
                ControlsContainer.Fade(1, 200).Start();
            }

            _timer.Start();
        }
        public T Add <T>(T control) where T : WebControl
        {
            ControlsContainer.Add(control);

            InternalControlsList.Add(control);

            return(control);
        }
        protected virtual void CreateCommandButton(GridViewCommandColumnButtonControl buttonControl)
        {
            if (buttonControl == null)
            {
                return;
            }

            CreateCommandButtonSpacerIfNeeded();

            ControlsContainer.Add(buttonControl);
        }
        private void SlideshowPage_PointerMoved(object sender, PointerRoutedEventArgs e)
        {
            if (!_navVisible)
            {
                _navVisible = true;
                ControlsContainer.IsHitTestVisible = true;
                ControlsContainer.Fade(1, 200).Start();
            }

            _timer.Start();
        }
        protected virtual void CreateCommandButtonSpacerIfNeeded()
        {
            if (ControlsContainer.IsNotEmpty)
            {
                var spacing = RenderHelper.GetCommandColumnStyle(Column).Spacing;

                if (spacing.IsEmpty)
                {
                    spacing = GetDefaultCommandColumnSpacing();
                }

                if (spacing.IsEmpty == false)
                {
                    ControlsContainer.Add(
                        new GridViewCommandColumnSpacer(spacing)
                        );
                }
            }
        }
예제 #8
0
        public static void CreateButtonInContainer(string text, ControlsContainer container, InnerMethod innerMethod)
        {
            Button newButton = new Button()
            {
                Text = text,
                Size = new Size(30)
            };

            newButton.OnMouseButton += (sender, args) =>
            {
                if (args.IsPressed && args.Button == Duality.Input.MouseButton.Left)
                {
                    innerMethod.Invoke();
                }
            };
            container.Add(new Separator()
            {
                Size = new Size(5)
            });
            container.Add(newButton);
        }