Esempio n. 1
0
        public UiDxControl()
        {
            Control = new RenderControl();

            SwapChainDescription swapChainDescription = CreateSwapChainDescription();
            RenderContainer = new RenderContainer(swapChainDescription, Control);

            VerticalAlignment = VerticalAlignment.Stretch;
            HorizontalAlignment = HorizontalAlignment.Stretch;

            Child = Control;
            Control.Paint += OnRenderControlPaint;
        }
Esempio n. 2
0
        public UiDxControl()
        {
            Control = new RenderControl();

            SwapChainDescription swapChainDescription = CreateSwapChainDescription();

            RenderContainer = new RenderContainer(swapChainDescription, Control);

            VerticalAlignment   = VerticalAlignment.Stretch;
            HorizontalAlignment = HorizontalAlignment.Stretch;

            Child          = Control;
            Control.Paint += OnRenderControlPaint;
        }
Esempio n. 3
0
        private void ResetBurshes(RenderContainer renderContainer)
        {
            _selectedColorBrush?.Dispose();
            _spacingColorBrush?.Dispose();
            _notMappedColorBrush?.Dispose();
            _gridColorBrush?.Dispose();

            RenderTarget target2D = renderContainer.BackBuffer.Target2D;
            _selectedColorBrush = new SolidColorBrush(target2D, SelectedColor.ToColor4(), null);
            _spacingColorBrush = new SolidColorBrush(target2D, SpacingColor.ToColor4(), null);
            _notMappedColorBrush = new SolidColorBrush(target2D, NotMappedColor.ToColor4(), null);
            _gridColorBrush = new SolidColorBrush(target2D, GridColor.ToColor4(), null);
        }