Ejemplo n.º 1
0
 static InputManager()
 {
     Current = new InputManager();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Register's the services needed by Avalonia.
        /// </summary>
        public virtual void RegisterServices()
        {
            AvaloniaSynchronizationContext.InstallIfNeeded();
            FocusManager = new FocusManager();
            InputManager = new InputManager();

            AvaloniaLocator.CurrentMutable
                .Bind<IAccessKeyHandler>().ToTransient<AccessKeyHandler>()
                .Bind<IGlobalDataTemplates>().ToConstant(this)
                .Bind<IGlobalStyles>().ToConstant(this)
                .Bind<IFocusManager>().ToConstant(FocusManager)
                .Bind<IInputManager>().ToConstant(InputManager)
                .Bind<IKeyboardNavigationHandler>().ToTransient<KeyboardNavigationHandler>()
                .Bind<IStyler>().ToConstant(_styler)
                .Bind<ILayoutManager>().ToSingleton<LayoutManager>()
                .Bind<IRenderQueueManager>().ToTransient<RenderQueueManager>()
                .Bind<IApplicationLifecycle>().ToConstant(this);
        }
Ejemplo n.º 3
0
 public TextComposition(InputManager inputManager, IInputElement source, string resultText)
 {
     this.Text = resultText;
 }