protected override void OnRender(System.Windows.Media.DrawingContext drawingContext) { MFD mfd = Visual as MFD; if (mfd != null) { drawingContext.DrawRectangle(_bezel, null, _bezelRectangle); } }
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; } }