src/Dsl/CustomCode/Utils/StyleSetExtension.cs
/// <summary>
///     Overrides brush colors in one step.
/// </summary>
/// <param name="styleSet"></param>
/// <param name="resourceId"></param>
/// <param name="color"></param>
Overrides brush colors in one step.
Overrides brush colors in one step .
public static void OverrideBrushColor(this StyleSet styleSet, StyleSetResourceId resourceId, Color color)
        {
            var settings = styleSet.GetOverriddenBrushSettings(resourceId) ?? new BrushSettings();
            settings.Color = color;
            styleSet.OverrideBrush(resourceId, settings);
        }
public static void OverrideBrushColor ( this StyleSet styleSet , StyleSetResourceId resourceId , Color color ) { var settings = styleSet . GetOverriddenBrushSettings ( resourceId ) ?? new BrushSettings ( ) ; settings . Color = color ; styleSet . OverrideBrush ( resourceId , settings ) ; }
Overrides brush colors in one step.
Overrides brush colors in one step .
StyleSet
this
resourceId
StyleSetResourceId
None
color
Color
None
styleSet
None