예제 #1
0
 void UpdateFocusRightView()
 {
     if (Specific.GetNextFocusRightView(Element) != null)
     {
         SetNextFocusViewInternal(XFocusDirection.Right);
     }
 }
예제 #2
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);
            }
        }