void UpdateFocusForwardView() { if (Specific.GetNextFocusForwardView(Element) != null) { SetNextFocusViewInternal(XFocusDirection.Forward); } }
void UpdateFocusBackView() { if (Specific.GetNextFocusBackView(Element) != null) { SetNextFocusViewInternal(XFocusDirection.Back); } }
protected override void UpdateThemeStyle() { var themeStyle = SpecificVE.GetStyle(Element); if (!string.IsNullOrEmpty(themeStyle)) { Control.Style = themeStyle; } }
protected override void UpdateThemeStyle() { var style = Specific.GetStyle(Element); if (!string.IsNullOrEmpty(style)) { (Control as IButton)?.UpdateStyle(style); ((IVisualElementController)Element).NativeSizeChanged(); } }
void UpdateToolTip(bool initialize) { var tooltip = Specific.GetToolTip(Element); if (tooltip != null) { NativeView.SetTooltipText(tooltip); } else if (!initialize) { NativeView.UnsetTooltip(); } }
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); } } }
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); } }
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); } }