static InputManager() { Current = new InputManager(); }
/// <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); }
public TextComposition(InputManager inputManager, IInputElement source, string resultText) { this.Text = resultText; }