コード例 #1
0
ファイル: Shape.cs プロジェクト: new-feats-code/MediaPortal2
        public override void RenderOverride(RenderContext localRenderContext)
        {
            base.RenderOverride(localRenderContext);
            PerformLayout(localRenderContext);

            Brush fill = Fill;

            if (_fillContext != null && fill != null)
            {
                if (fill.BeginRenderBrush(_fillContext, localRenderContext))
                {
                    _fillContext.Render(0);
                    fill.EndRender();
                }
            }
            Brush stroke = Stroke;

            if (_strokeContext != null && stroke != null)
            {
                if (stroke.BeginRenderBrush(_strokeContext, localRenderContext))
                {
                    _strokeContext.Render(0);
                    stroke.EndRender();
                }
            }
        }
コード例 #2
0
ファイル: Panel.cs プロジェクト: pacificIT/MediaPortal-2
        protected void OnBackgroundPropertyChanged(AbstractProperty property, object oldValue)
        {
            Brush oldBackground = oldValue as Brush;

            if (oldBackground != null)
            {
                oldBackground.ObjectChanged -= OnBrushChanged;
            }
            if (Background != null)
            {
                Background.ObjectChanged += OnBrushChanged;
            }
            _performLayout = true;
        }
コード例 #3
0
ファイル: Border.cs プロジェクト: pacificIT/MediaPortal-2
        void OnBorderBrushPropertyChanged(AbstractProperty property, object oldValue)
        {
            Brush oldBrush = oldValue as Brush;

            if (oldBrush != null)
            {
                oldBrush.ObjectChanged -= OnBorderBrushChanged;
            }
            Brush brush = property.GetValue() as Brush;

            if (brush != null)
            {
                brush.ObjectChanged += OnBorderBrushChanged;
            }
            OnBorderBrushChanged(brush);
        }