I know the WPF brush class has an Opacity property. We have a need to use a system-defined brush but with half the opacity. We'd like to do something like this (this is obviously fake code)...
<Border Background="{DynamicResource {x:Static SystemColors.HighlightBrushKey}, Opacity=0.5}" />
We of course can't change the opacity on a system-defined brush directly because that would mess up everywhere it's used.
What we'd like to do is to somehow define a converter which we take one brush and returns a copy of it with the opacity changed, but since this isn't a binding, we don't know where/how to apply a converter. Plus, if it's a dynamic resource, we need to make sure it tracks changes.
We also can't simply set the opacity on the Border directly either as then all of its children also have the same reduced opacity.
Our current work-around is instead of putting the content directly in the border, we put the border and its contents as siblings in a grid, then we do set the opacity on the border. Since the content is now on top of, instead of inside the border, it isn't affected by the opacity. It just means we've added extra stuff into the visual tree which is annoying, but it does work. It would be much better if we could simply adjust the opacity of a (copy of a) system brush right in the XAML.