Thank you for the quick response. I am currently dealing with 3 XAML files (App, MainPage, and a Custom control). I am initiating a global variable on the App.xaml, setting the global variable on the Custom Control xaml, and would like to use that global variable on the MainPage.xaml to change the color of my drawn graphics.App.xaml.cs public static class GlobalVariables
{
public static SolidColorBrush markerSymbolColor;
public static SolidColorBrush lineSymbolColor;
public static SolidColorBrush fillSymbolColor;
}
ColorPickerControl.xaml.cs private void Color_Click(object sender, RoutedEventArgs e)
{
Button btn = sender as Button;
this.SelectedColor = btn.Background as SolidColorBrush;
silverlightRedliningTools.App.GlobalVariables.markerSymbolColor = this.SelectedColor;
silverlightRedliningTools.App.GlobalVariables.lineSymbolColor = this.SelectedColor;
silverlightRedliningTools.App.GlobalVariables.fillSymbolColor = this.SelectedColor;
popUp.IsOpen = false;
}
MainPage.xaml <Grid.Resources>
<esri:SimpleLineSymbol x:Key="DrawLineSymbol" Color="Green" Width="4" />
<esri:SimpleFillSymbol x:Key="DrawFillSymbol" Fill="#3300FF00" BorderBrush="Green" BorderThickness="2" />
<!--<esri:SimpleMarkerSymbol x:Key="DefaultMarkerSymbol" Color="Red" Size="12" Style="Circle" />-->
<esri:SimpleMarkerSymbol x:Key="DefaultMarkerSymbol" Color="{Binding Source={StaticResource markerSymbolColor}, Path=Color}" Size="12" Style="Circle" />
<esri:SimpleLineSymbol x:Key="DefaultLineSymbol" Color="Red" Width="4" />
<esri:SimpleFillSymbol x:Key="DefaultFillSymbol" Fill="#33FF0000" BorderBrush="Red" BorderThickness="2" />
</Grid.Resources>
I have implemented the code that you supplied before and am getting the following error:The resource "markerSymbolColor" could not be resolved.
I will continue to research and will update if anything changes on my end.Thanks again for the help!