public override void LoadView()
 {
     View = new AvaloniaView()
     {
         Content = Content, BackgroundColor = _statusBarColor.ToUiColor()
     };
     UIApplication.Notifications.ObserveDidChangeStatusBarOrientation(delegate { AutoFit(); });
     UIApplication.Notifications.ObserveDidChangeStatusBarFrame(delegate { AutoFit(); });
     AutoFit();
 }
        public void UpdateKeyboard(IInputElement focusedElement)
        {
            if (_oldView?.IsFirstResponder == true)
            {
                _oldView?.ResignFirstResponder();
            }
            _oldView = null;

            //TODO: Raise a routed event to determine if any control wants to become the text input handler
            if (focusedElement is TextBox)
            {
                var view = ((focusedElement.VisualRoot as TopLevel)?.PlatformImpl as AvaloniaView.TopLevelImpl)?.View;
                view?.BecomeFirstResponder();
            }
        }
        public bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            var builder = AppBuilder.Configure <TApp>();

            CustomizeAppBuilder(builder);
            var lifetime = new Lifetime();

            builder.AfterSetup(_ =>
            {
                Window                    = new UIWindow();
                var view                  = new AvaloniaView();
                lifetime.View             = view;
                Window.RootViewController = new UIViewController
                {
                    View = view
                };
            });

            builder.SetupWithLifetime(lifetime);

            Window.Hidden = false;
            return(true);
        }
示例#4
0
 public AvaloniaViewController(UIWindow window)
 {
     AvaloniaView = new AvaloniaView(window, this);
 }
 public TopLevelImpl(AvaloniaView view)
 {
     _view             = view;
     NativeControlHost = new NativeControlHostImpl(_view);
 }
示例#6
0
 public TopLevelImpl(AvaloniaView view)
 {
     _view = view;
 }
示例#7
0
 public AvaloniaViewController(UIWindow window)
 {
     AvaloniaView = new AvaloniaView(window, this);
 }
示例#8
0
 public TouchHandler(AvaloniaView view, ITopLevelImpl tl)
 {
     _view = view;
     _tl   = tl;
 }
示例#9
0
 public TopLevelImpl(AvaloniaView view)
 {
     _view             = view;
     NativeControlHost = new NativeControlHostImpl(_view);
     StorageProvider   = new IOSStorageProvider(view);
 }
示例#10
0
 public NativeControlHostImpl(AvaloniaView avaloniaView)
 {
     _avaloniaView = avaloniaView;
 }