Пример #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);
            }
        }
Пример #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);
                }
            }
        }
Пример #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);
            }
        }
Пример #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);
                }
            }
        }