示例#1
0
        protected override void OnRender(System.Windows.Media.DrawingContext drawingContext)
        {
            MFD mfd = Visual as MFD;

            if (mfd != null)
            {
                drawingContext.DrawRectangle(_bezel, null, _bezelRectangle);
            }
        }
示例#2
0
        protected override void OnRefresh()
        {
            MFD mfd = Visual as MFD;

            if (mfd != null)
            {
                _bezelRectangle = new Rect(0, 0, mfd.Width, mfd.Height);

                _bezel = CreateImageBrush(mfd.BezelImage);
            }
            else
            {
                _bezel = null;
            }
        }