I have a number of XAML `Brush` objects defined in my project. Some are relatively detailed. Right now they're all located in Application.xaml, like so:
<Application.Resources>
<ResourceDictionary>
<LinearGradientBrush x:Key="FiveColorGradient" >
...with five gradient stops
</LinearGradientBrush>
<LinearGradientBrush x:Key="TwentyFourColorGradient" >
...with 24 gradient stops
</LinearGradientBrush>
<LinearGradientBrush x:Key="RedYellowGradient" >
...etc
</LinearGradientBrush>
<SolidColorBrush x:Key="TransparentReportBrush" Color="#40222222"/>
<SolidColorBrush x:Key="CuttingPlaneTempBrush" Color="Black" />
<SolidColorBrush x:Key="RedBrush" Color="Red" />
<SolidColorBrush x:Key="GreenBrush" Color="Green" />
<SolidColorBrush x:Key="BlueBrush" Color="Blue" />
</ResourceDictionary>
</Application.Resources>
The question is, how do I get those items loaded into an `ItemsList` control, such as a `ComboBox`?
(I've tried looking up several ideas, but none are supported by any documentation that isn't thoroughly buried in content aggregation or years of dust...)
<Application.Resources>
<ResourceDictionary>
<LinearGradientBrush x:Key="FiveColorGradient" >
...with five gradient stops
</LinearGradientBrush>
<LinearGradientBrush x:Key="TwentyFourColorGradient" >
...with 24 gradient stops
</LinearGradientBrush>
<LinearGradientBrush x:Key="RedYellowGradient" >
...etc
</LinearGradientBrush>
<SolidColorBrush x:Key="TransparentReportBrush" Color="#40222222"/>
<SolidColorBrush x:Key="CuttingPlaneTempBrush" Color="Black" />
<SolidColorBrush x:Key="RedBrush" Color="Red" />
<SolidColorBrush x:Key="GreenBrush" Color="Green" />
<SolidColorBrush x:Key="BlueBrush" Color="Blue" />
</ResourceDictionary>
</Application.Resources>
The question is, how do I get those items loaded into an `ItemsList` control, such as a `ComboBox`?
(I've tried looking up several ideas, but none are supported by any documentation that isn't thoroughly buried in content aggregation or years of dust...)
-- Rob