private void updateSymbolConfigControlIfCurrentSelectedSymbol()
        {
            if (SymbolConfigControl == null || RendererSymbolSetContainerControl == null)
            {
                return;
            }

            ClassBreaksRendererSymbolsConfigControl symbolsConfigControl = RendererSymbolSetContainerControl.Content as ClassBreaksRendererSymbolsConfigControl;

            if (symbolsConfigControl != null)
            {
                Control selectedControl = symbolsConfigControl.GetCurrentSelectedConfigControl();
                ClassBreakConfigControl classBreaksConfigControl = selectedControl as ClassBreakConfigControl;
                if (classBreaksConfigControl != null)
                {
                    if (classBreaksConfigControl.ClassBreak != null)
                    {
                        SymbolConfigControl.Symbol = classBreaksConfigControl.ClassBreak.Symbol;
                    }
                }
                else
                {
                    DefaultSymbolConfigControl defaultConfigControl = selectedControl as DefaultSymbolConfigControl;
                    if (defaultConfigControl != null)
                    {
                        SymbolConfigControl.Symbol = defaultConfigControl.Symbol;
                    }
                }
            }
            else
            {
                UniqueValueRendererSymbolsConfigControl uniqueValueRendererConfigControl = RendererSymbolSetContainerControl.Content as UniqueValueRendererSymbolsConfigControl;
                if (uniqueValueRendererConfigControl != null)
                {
                    Control selectedControl = uniqueValueRendererConfigControl.GetCurrentSelectedConfigControl();
                    UniqueValueConfigControl uniqueValueConfigControl = selectedControl as UniqueValueConfigControl;
                    if (uniqueValueConfigControl != null)
                    {
                        if (uniqueValueConfigControl.UniqueValue != null)
                        {
                            SymbolConfigControl.Symbol = uniqueValueConfigControl.UniqueValue.Symbol;
                        }
                    }
                    else
                    {
                        DefaultSymbolConfigControl defaultConfigControl = selectedControl as DefaultSymbolConfigControl;
                        if (defaultConfigControl != null)
                        {
                            SymbolConfigControl.Symbol = defaultConfigControl.Symbol;
                        }
                    }
                }
            }
        }
        void optionsConfigControl_RendererColorSchemeChanged(object sender, GradientBrushChangedEventArgs e)
        {
            GraphicsLayer graphicsLayer = Layer as GraphicsLayer;

            if (graphicsLayer == null)
            {
                return;
            }

            graphicsLayer.ApplyColorRampGradientBrushToRenderer(e.GradientBrush);

            ClassBreaksRendererOptionsConfigControl rendererOptions = sender as ClassBreaksRendererOptionsConfigControl;

            if (rendererOptions != null) // refresh the renderer on the config control
            {
                rendererOptions.ClassBreaksRenderer = graphicsLayer.Renderer as ClassBreaksRenderer;
            }
            else
            {
                UniqueValueRendererOptionsConfigControl uniqueValueRendererOptions = sender as UniqueValueRendererOptionsConfigControl;
                if (uniqueValueRendererOptions != null)
                {
                    uniqueValueRendererOptions.UniqueValueRenderer = graphicsLayer.Renderer as UniqueValueRenderer;
                }
            }

            if (RendererSymbolSetContainerControl != null)
            {
                ClassBreaksRendererSymbolsConfigControl rendererSymbols = RendererSymbolSetContainerControl.Content as ClassBreaksRendererSymbolsConfigControl;
                if (rendererSymbols != null)
                {
                    rendererSymbols.RefreshSymbols();
                }
                else
                {
                    UniqueValueRendererSymbolsConfigControl uniqueSymbols = RendererSymbolSetContainerControl.Content as UniqueValueRendererSymbolsConfigControl;
                    if (uniqueSymbols != null)
                    {
                        uniqueSymbols.RefreshSymbols();
                    }
                }
            }
        }
        private void createClassBreaksRendererSymbolsConfigControl(ClassBreaksRenderer classBreaksRenderer)
        {
            if (RendererSymbolSetContainerControl != null)
            {
                ClassBreaksRendererSymbolsConfigControl symbolsConfigControl = new ClassBreaksRendererSymbolsConfigControl()
                {
                    ClassBreaksRenderer  = classBreaksRenderer,
                    SymbolConfigProvider = SymbolConfigProvider,
                    GeometryType         = GeometryType,
                };

                Binding b = new Binding("Foreground")
                {
                    Source = this
                };
                symbolsConfigControl.SetBinding(ClassBreaksRendererSymbolsConfigControl.ForegroundProperty, b);

                symbolsConfigControl.ClassBreakRendererModified       += new EventHandler <SelectedClassBreakModificationEventArgs>(symbolsConfigControl_ClassBreakRendererModified);
                symbolsConfigControl.CurrentClassBreakChanged         += new EventHandler <CurrentClassBreakChangedEventArgs>(symbolsConfigControl_CurrentClassBreakChanged);
                symbolsConfigControl.DefaultClassBreakBeingConfigured += new EventHandler <DefaultClassBreakBeingConfiguredEventArgs>(symbolsConfigControl_DefaultClassBreakBeingConfigured);
                RendererSymbolSetContainerControl.Content              = symbolsConfigControl;
            }
        }
        private void createClassBreaksRendererSymbolsConfigControl(ClassBreaksRenderer classBreaksRenderer)
        {
            if (RendererSymbolSetContainerControl != null)
            {
                ClassBreaksRendererSymbolsConfigControl symbolsConfigControl = new ClassBreaksRendererSymbolsConfigControl()
                {
                    ClassBreaksRenderer = classBreaksRenderer,
                    SymbolConfigProvider = SymbolConfigProvider,
                    GeometryType = GeometryType,
                };

                Binding b = new Binding("Foreground") { Source = this };
                symbolsConfigControl.SetBinding(ClassBreaksRendererSymbolsConfigControl.ForegroundProperty, b);

                symbolsConfigControl.ClassBreakRendererModified += new EventHandler<SelectedClassBreakModificationEventArgs>(symbolsConfigControl_ClassBreakRendererModified);
                symbolsConfigControl.CurrentClassBreakChanged += new EventHandler<CurrentClassBreakChangedEventArgs>(symbolsConfigControl_CurrentClassBreakChanged);
                symbolsConfigControl.DefaultClassBreakBeingConfigured += new EventHandler<DefaultClassBreakBeingConfiguredEventArgs>(symbolsConfigControl_DefaultClassBreakBeingConfigured);
                RendererSymbolSetContainerControl.Content = symbolsConfigControl;
            }
        }