This question has been asked before, but the answers aren't working. Based on what I read here, this should work.
<ResourceDictionary>
<LinearGradientBrush x:Key="emerald" EndPoint="1,0.5" StartPoint="0,0.5">
<GradientStop Color="#FF00FD8A" Offset="0"/>
<GradientStop Color="#FF4DBD65" Offset="1"/>
</LinearGradientBrush>
<StaticResourceExtension x:Key="MainPanelBackground" ResourceKey="emerald"/>
</ResourceDictionary>
followed by
<Frame x:Name="_mainFrame" Background="{StaticResource MainPanelBackground}" />
However, what I get is the XAML previewer complaining
An object of the type "System.Windows.StaticResourceExtension" cannot be
applied to a property that expects the type "System.Windows.Media.Brush".
Running the program just gives a XAML parse error.
As reference, here is another question that purports to have the answer, but this doesn't work for me, and I can't figure out why: Redefine/alias a resource in WPF?