Hi- I am trying to symbolize a graphic that I am drawing. I can't seem to use the the resource I created. Am I missing something?<UserControl x:Class="PolicyQuerySpatial.AddIns.QueryDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:esri="http://schemas.esri.com/arcgis/client/2009" mc:Ignorable="d" d:DesignHeight="160" d:DesignWidth="325" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" Opacity="1"> <Grid x:Name="LayoutRoot" Background="Transparent" Height="160" Width="325" Opacity="1" HorizontalAlignment="Right"> <Button Height="32" HorizontalAlignment="Left" Margin="91,44,0,0" Name="btnLine" VerticalAlignment="Top" Width="32" Click="btnDrawLine_Click"> <Button.Content> <Image Source="/PolicyQuerySpatial.AddIns;component/Images/EditingEditLine32.png" /> </Button.Content> </Button> <Button Height="32" HorizontalAlignment="Left" Margin="143,44,0,0" Name="btnPolygon" VerticalAlignment="Top" Width="32" Click="btnDrawPolygon_Click" > <Button.Content> <Image Source ="/PolicyQuerySpatial.AddIns;component/Images/EditingEditShape32.png" /> </Button.Content> </Button> <CheckBox Content="Include Policies within a distance of:" Height="16" HorizontalAlignment="Left" Margin="12,95,0,0" Name="chkBuffer" VerticalAlignment="Top" /> <TextBlock Height="23" HorizontalAlignment="Left" Margin="116,122,0,0" Name="txtMiles" Text="Mile(s)" VerticalAlignment="Top" /> <toolkit:NumericUpDown Height="22" HorizontalAlignment="Left" Margin="38,120,0,0" Name="numBuffer" VerticalAlignment="Top" Width="56" Maximum="500" /> </Grid> <UserControl.Resources> <ResourceDictionary> <esri:SimpleMarkerSymbol x:Key="GreenMarkerSymbol" Color="Green" Size="12" Style="Circle" /> <esri:SimpleLineSymbol x:Key="RedLineSymbol" Color="Green" Width="4" Style="Solid" /> <esri:SimpleFillSymbol x:Key="RedFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" /> </ResourceDictionary> </UserControl.Resources> </UserControl>
private void btnDrawPoint_Click(object sender, RoutedEventArgs e) { drawObject.DrawMode = DrawMode.Point; _activeSymbol = LayoutRoot.Resources["GreenMarkerSymbol"] as Symbol; drawObject.IsEnabled = (drawObject.DrawMode != DrawMode.None); }