public AvaloniaView(Context context) : base(context)
 {
     _view = new ViewImpl(context);
     AddView(_view.View);
     _root = new EmbeddableControlRoot(_view);
     _root.Prepare();
 }
 public GtkAvaloniaControlHost()
 {
     _root = new EmbeddableControlRoot(new EmbeddableImpl(this));
     _root.Prepare();
     if (_root.IsFocused)
         Unfocus();
     _root.GotFocus += RootGotFocus;
     CanFocus = true;
 }
Example #3
0
 public AvaloniaView()
 {
     _impl = new EmbeddableImpl();
     AddSubview(_impl);
     BackgroundColor  = UIColor.White;
     AutoresizingMask = UIViewAutoresizing.All;
     _root            = new EmbeddableControlRoot(_impl);
     _root.Prepare();
 }
Example #4
0
 public AvaloniaView()
 {
     _impl = new EmbeddableImpl();
     AddSubview(_impl);
     WantsLayer            = true;
     Layer.BackgroundColor = NSColor.White.CGColor;
     AutoresizingMask      = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable;
     _root = new EmbeddableControlRoot(_impl);
     _root.Prepare();
 }
        internal static TopLevel Initialize <T>(T builder, string fbdev = null) where T : AppBuilderBase <T>, new()
        {
            var platform = new LinuxFramebufferPlatform(fbdev);

            builder.UseSkia().UseWindowingSubsystem(platform.Initialize, "fbdev")
            .SetupWithoutStarting();
            var tl = new EmbeddableControlRoot(TopLevel = new FramebufferToplevelImpl(platform._fb));

            tl.Prepare();
            return(tl);
        }
Example #6
0
        public AvaloniaView()
        {
            _topLevelImpl = new RazorViewTopLevelImpl(this);

            _topLevel = new EmbeddableControlRoot(_topLevelImpl);

            if (Application.Current?.ApplicationLifetime is ISingleViewApplicationLifetime lifetime)
            {
                _topLevel.Content = lifetime.MainView;
            }
        }
Example #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GtkAvaloniaControlHost"/> class.
 /// </summary>
 public GtkAvaloniaControlHost()
 {
     _root = new EmbeddableControlRoot(new EmbeddableImpl(this));
     _root.Prepare();
     if (_root.IsFocused)
     {
         Unfocus();
     }
     _root.GotFocus += RootGotFocus;
     CanFocus        = true;
 }
        public AvaloniaView()
        {
            _topLevelImpl = new TopLevelImpl(this);
            _touches      = new TouchHandler(this, _topLevelImpl);
            _topLevel     = new EmbeddableControlRoot(_topLevelImpl);
            _topLevel.Prepare();

            _topLevel.Renderer.Start();

            var l = (CAEAGLLayer)Layer;

            l.ContentsScale      = UIScreen.MainScreen.Scale;
            l.Opaque             = true;
            l.DrawableProperties = new NSDictionary(
                EAGLDrawableProperty.RetainedBacking, false,
                EAGLDrawableProperty.ColorFormat, EAGLColorFormat.RGBA8
                );
            _topLevelImpl.Surfaces = new[] { new EaglLayerSurface(l) };
            MultipleTouchEnabled   = true;
        }
 internal void Prepare()
 {
     _root = new EmbeddableControlRoot(_view);
     _root.Prepare();
 }
Example #10
0
 public RemoteServer(IAvaloniaRemoteTransportConnection transport)
 {
     _topLevel = new EmbeddableControlRoot(new EmbeddableRemoteServerTopLevelImpl(transport));
     _topLevel.Prepare();
     //TODO: Somehow react on closed connection?
 }