Exemple #1
0
        public WpfTopLevelImpl()
        {
            PresentationSource.AddSourceChangedHandler(this, OnSourceChanged);
            _hook     = WndProc;
            _ttl      = this;
            _surfaces = new object[] { new WritableBitmapSurface(this), new Direct2DImageSurface(this) };
            _mouse    = new WpfMouseDevice(this);
            _keyboard = AvaloniaLocator.Current.GetService <IKeyboardDevice>();

            ControlRoot         = new CustomControlRoot(this);
            SnapsToDevicePixels = true;
            Focusable           = true;
            DataContextChanged += delegate
            {
                ControlRoot.DataContext = DataContext;
            };
        }
Exemple #2
0
 public EmbeddableControlRoot(IEmbeddableWindowImpl impl) : base(impl)
 {
 }
 public EmbeddableControlRoot(IEmbeddableWindowImpl impl) : base(impl)
 {
     PlatformImpl.Show();
 }