internal XamlRenderer GetCachedXamlRenderer(GaugeGraphics g) { if (xamlRenderer != null) { return(xamlRenderer); } BackFrameStyle backFrameStyle = FrameStyle; if (backFrameStyle == BackFrameStyle.None) { backFrameStyle = BackFrameStyle.Edged; } xamlRenderer = new XamlRenderer(FrameShape.ToString() + "." + backFrameStyle.ToString() + ".xaml"); xamlRenderer.AllowPathGradientTransform = false; RectangleF frameRectangle = GetFrameRectangle(g); Color[] layerHues = new Color[2] { FrameColor, BackColor }; xamlRenderer.ParseXaml(frameRectangle, layerHues); return(xamlRenderer); }
public XamlRenderer GetCachedXamlRenderer(GaugeGraphics g) { if (this.xamlRenderer != null) { return(this.xamlRenderer); } BackFrameStyle backFrameStyle = this.FrameStyle; if (backFrameStyle == BackFrameStyle.None) { backFrameStyle = BackFrameStyle.Edged; } this.xamlRenderer = new XamlRenderer(this.FrameShape.ToString() + "." + backFrameStyle.ToString() + ".xaml"); this.xamlRenderer.AllowPathGradientTransform = false; RectangleF frameRectangle = this.GetFrameRectangle(g); Color[] layerHues = new Color[2] { this.FrameColor, this.BackColor }; this.xamlRenderer.ParseXaml(frameRectangle, layerHues, null); return(this.xamlRenderer); }