Ejemplo n.º 1
0
        private void InitializeGraphicsDevice()
        {
            if (_graphicsDeviceService == null)
            {
                _graphicsDeviceService = new DXGraphicsDeviceService();

                // create the image source
                _imageSource = new DXImageSource(
                    GraphicsDevice, (int)ActualWidth, (int)ActualHeight);
                rootImage.Source = _imageSource.WriteableBitmap;

                Services.AddService(typeof(IGraphicsDeviceService), _graphicsDeviceService);
            }
        }
Ejemplo n.º 2
0
        private void DoResize()
        {
            if (_imageSource != null)
            {
                _imageSource.Dispose();
                _imageSource = new DXImageSource(
                    GraphicsDevice, (int)ActualWidth, (int)ActualHeight);
                _imageSourcePresenter = new RenderTargetGraphicsPresenter(GraphicsDevice, _imageSource.RenderTarget);

                rootImage.Source = _imageSource.WriteableBitmap;
                if (Resized != null)
                {
                    Resized(this, EventArgs.Empty);
                }
            }
        }
Ejemplo n.º 3
0
        private void InitializeGraphicsDevice()
        {
            if (_graphicsDeviceService == null)
            {
                _graphicsDeviceService = new DXGraphicsDeviceService();

                // create the image source
                _imageSource = new DXImageSource(
                    GraphicsDevice, (int)ActualWidth, (int)ActualHeight);
                rootImage.Source = _imageSource.WriteableBitmap;

                Services.AddService(typeof(IGraphicsDeviceService), _graphicsDeviceService);
            }
        }
Ejemplo n.º 4
0
        private void DoResize()
        {
            if (_imageSource != null)
            {
                _imageSource.Dispose();
                _imageSource = new DXImageSource(
                    GraphicsDevice, (int)ActualWidth, (int)ActualHeight);
                _imageSourcePresenter = new RenderTargetGraphicsPresenter(GraphicsDevice, _imageSource.RenderTarget);

                rootImage.Source = _imageSource.WriteableBitmap;
                if (Resized != null)
                {
                    Resized(this, EventArgs.Empty);
                }
            }
        }