/// <summary> /// Override themable colors. /// </summary> private void SetColorTheme() { // Set the emphasis outline color for selected shapes. ClassStyleSet.OverridePenColor(DiagramPens.EmphasisOutline, ConfigurationElementShape.EmphasisShapeOutlineColor); // SourceEndDisplayText and TargetEndDisplayText use this brush, and we need them to be distinguisable in the background. ClassStyleSet.OverrideBrushColor( DiagramBrushes.ShapeText, VSColorTheme.GetThemedColor(EnvironmentColors.ToolWindowTextColorKey)); // Shouldn't need to do this unless user changes theme. IsColorThemeSet = true; }
/// <summary> /// Override themable colors. /// </summary> private void SetColorTheme() { // Set the emphasis outline color for selected shapes. ClassStyleSet.OverridePenColor(DiagramPens.EmphasisOutline, EntityTypeShape.EmphasisShapeOutlineColor); // SourceEndDisplayText and TargetEndDisplayText use this brush, and we need them to be distinguisable in the background. // If we are drawing shapes for ExportAsImage we'll need to override the theme to make the text (i.e. cardinalities) visible. var shapeTextColor = ForceDrawOnWhiteBackground ? Color.Black : VSColorTheme.GetThemedColor(EnvironmentColors.ToolWindowTextColorKey); ClassStyleSet.OverrideBrushColor(DiagramBrushes.ShapeText, shapeTextColor); // Shouldn't need to do this unless user changes theme or we had been drawing on white background for ExportAsImage. IsColorThemeSet = true; }
private void SetColorTheme() { ClassStyleSet.OverridePenColor(DiagramPens.EmphasisOutline, EmphasisShapeOutlineColor); // We shouldn't need to do this again uless the user changes the theme. IsColorThemeSet = true; }