Exemple #1
0
 void UpdateFocusForwardView()
 {
     if (Specific.GetNextFocusForwardView(Element) != null)
     {
         SetNextFocusViewInternal(XFocusDirection.Forward);
     }
 }
Exemple #2
0
 void UpdateFocusBackView()
 {
     if (Specific.GetNextFocusBackView(Element) != null)
     {
         SetNextFocusViewInternal(XFocusDirection.Back);
     }
 }
Exemple #3
0
        protected override void UpdateThemeStyle()
        {
            var themeStyle = SpecificVE.GetStyle(Element);

            if (!string.IsNullOrEmpty(themeStyle))
            {
                Control.Style = themeStyle;
                UpdateBackgroundColor(false);
                UpdateProgressColor(false);
            }
        }
Exemple #4
0
        protected override void UpdateThemeStyle()
        {
            var style = Specific.GetStyle(Element);

            if (!string.IsNullOrEmpty(style))
            {
                (Control as IButton)?.UpdateStyle(style);
                ((IVisualElementController)Element).NativeSizeChanged();
                UpdateBackgroundColor(false);
            }
        }
Exemple #5
0
        void UpdateToolTip(bool initialize)
        {
            var tooltip = Specific.GetToolTip(Element);

            if (tooltip != null)
            {
                NativeView.SetTooltipText(tooltip);
            }
            else if (!initialize)
            {
                NativeView.UnsetTooltip();
            }
        }
Exemple #6
0
        void UpdateFocusDirection(bool initialize)
        {
            var direction = Specific.GetNextFocusDirection(Element);

            if (!initialize && direction != XFocusDirection.None)
            {
                var widget = NativeView as Widget;
                if (widget != null)
                {
                    widget.FocusNext(ConvertToNativeFocusDirection(direction));
                }
                else
                {
                    Log.Warn("{0} uses {1} which does not support Focus management", this, NativeView);
                }
            }
        }
Exemple #7
0
        void UpdateFocusAllowed(bool initialize)
        {
            bool?isFocusAllowed = Specific.IsFocusAllowed(Element);

            if (initialize && isFocusAllowed == null)
            {
                return;
            }

            var widget = NativeView as Widget;

            if (widget != null && isFocusAllowed != null)
            {
                widget.AllowFocus((bool)Specific.IsFocusAllowed(Element));
            }
            else
            {
                Log.Warn("{0} uses {1} which does not support Focus management", this, NativeView);
            }
        }
Exemple #8
0
        void SetNextFocusViewInternal(string direction)
        {
            var widget = NativeView as Widget;

            if (widget != null)
            {
                switch (direction)
                {
                case XFocusDirection.Back:
                    _customFocusManager.Value.NextBackward = Specific.GetNextFocusBackView(Element);
                    break;

                case XFocusDirection.Forward:
                    _customFocusManager.Value.NextForward = Specific.GetNextFocusForwardView(Element);
                    break;

                case XFocusDirection.Up:
                    _customFocusManager.Value.NextUp = Specific.GetNextFocusUpView(Element);
                    break;

                case XFocusDirection.Down:
                    _customFocusManager.Value.NextDown = Specific.GetNextFocusDownView(Element);
                    break;

                case XFocusDirection.Right:
                    _customFocusManager.Value.NextRight = Specific.GetNextFocusRightView(Element);
                    break;

                case XFocusDirection.Left:
                    _customFocusManager.Value.NextLeft = Specific.GetNextFocusLeftView(Element);
                    break;

                default:
                    break;
                }
            }
            else
            {
                Log.Warn("{0} uses {1} which does not support Focus management", this, NativeView);
            }
        }