Пример #1
0
        protected override void OnCreate()
        {
            base.OnCreate();
            Initialize();
            SetMainPage();

            focusManager = FocusManager.Instance;

            //set user customized focus indicator
            if (!focusManager.FocusIndicator)
            {
                focusManager.FocusIndicator = new View()
                {
                    PositionUsesPivotPoint = true,
                    PivotPoint             = new Position(0, 0, 0),
                    WidthResizePolicy      = ResizePolicyType.FillToParent,
                    HeightResizePolicy     = ResizePolicyType.FillToParent,
                    BorderlineColor        = Color.Orange,
                    BorderlineWidth        = 4.0f,
                    BorderlineOffset       = -1f,
                    BackgroundColor        = new Color(0.2f, 0.2f, 0.2f, 0.2f),
                };
            }

            //enable FocusManger default algorithm
            focusManager.EnableDefaultAlgorithm(true);
        }
Пример #2
0
 public static void EnableAutoFocusable()
 {
     FocusManager = FocusManager.Instance;
     FocusManager.EnableDefaultAlgorithm(true);
     FocusManager.FocusIndicator = new View()
     {
         PositionUsesPivotPoint = true,
         PivotPoint             = new Position(0, 0, 0),
         WidthResizePolicy      = ResizePolicyType.FillToParent,
         HeightResizePolicy     = ResizePolicyType.FillToParent,
         BorderlineColor        = Color.Orange,
         BorderlineWidth        = 4.0f,
         BorderlineOffset       = -1f,
         BackgroundColor        = new Color(0.2f, 0.2f, 0.2f, 0.2f),
     };
 }