Skip to content

Commit 8df63ff

Browse files
committed
feat(SolidColorBrush): ByChangingOpacity
1 parent 1cce4bb commit 8df63ff

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ColorSetKit/SolidColorBrushExtensions.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,13 @@ public static System.Windows.Media.SolidColorBrush ByChangingLightness( this Sys
4545
{
4646
return new System.Windows.Media.SolidColorBrush( self.Color.ByChangingLightness( l ) );
4747
}
48+
49+
public static System.Windows.Media.SolidColorBrush ByChangingOpacity( this System.Windows.Media.SolidColorBrush self, double l )
50+
{
51+
System.Windows.Media.SolidColorBrush copy = self.Clone();
52+
copy.Opacity = l;
53+
54+
return copy;
55+
}
4856
}
4957
}

0 commit comments

Comments
 (0)