Esempio n. 1
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            OpacitySlider = GetTemplateChild("OpacitySlider") as Slider;
            if (OpacitySlider != null)
            {
                OpacitySlider.ValueChanged += new RoutedPropertyChangedEventHandler <double>(OpacitySlider_ValueChanged);
            }

            ClusterPanel         = GetTemplateChild("ClusterPanel") as ContentControl;
            RenderAsHeatMapPanel = GetTemplateChild("RenderAsHeatMapPanel") as ContentControl;

            MarkerSymbolSelector = GetTemplateChild("MarkerSymbolSelector") as MarkerSymbolSelector;
            if (MarkerSymbolSelector != null)
            {
                MarkerSymbolSelector.MarkerSymbolConfigFileUrl = MarkerSymbolConfigFileUrl;
                MarkerSymbolSelector.MarkerSymbolDirectory     = MarkerSymbolDirectory;
                MarkerSymbolSelector.SymbolSelected           += new SymbolSelectedEventHandler(MarkerSymbolSelector_SymbolSelected);
                MarkerSymbolSelector.Show();
            }

            CurrentSymbolImage        = GetTemplateChild("CurrentSymbolImage") as Image;
            CurrentSymbolImageOverlay = GetTemplateChild("CurrentSymbolImageOverlay") as Rectangle;

            ClusterFeaturesCheckBox = GetTemplateChild("ClusterFeaturesCheckBox") as CheckBox;
            if (ClusterFeaturesCheckBox != null)
            {
                ClusterFeaturesCheckBox.Checked   += new RoutedEventHandler(ClusterFeaturesCheckBox_Checked);
                ClusterFeaturesCheckBox.Unchecked += new RoutedEventHandler(ClusterFeaturesCheckBox_Unchecked);
            }

            AdvancedClusterPropertiesButton = GetTemplateChild("AdvancedClusterPropertiesButton") as Button;
            if (AdvancedClusterPropertiesButton != null)
            {
                AdvancedClusterPropertiesButton.Click += new RoutedEventHandler(AdvancedClusterProperties_Click);
            }

            RenderAsHeatMapCheckBox = GetTemplateChild("RenderAsHeatMapCheckBox") as CheckBox;
            if (RenderAsHeatMapCheckBox != null)
            {
                RenderAsHeatMapCheckBox.Checked   += new RoutedEventHandler(RenderAsHeatMapCheckBox_Checked);
                RenderAsHeatMapCheckBox.Unchecked += new RoutedEventHandler(RenderAsHeatMapCheckBox_Unchecked);
            }

            AdvancedHeatMapPropertiesButton = GetTemplateChild("AdvancedHeatMapPropertiesButton") as Button;
            if (AdvancedHeatMapPropertiesButton != null)
            {
                AdvancedHeatMapPropertiesButton.Click += new RoutedEventHandler(AdvancedHeatMapProperties_Click);
            }

            Initialize();
            loadPointSymbolConfigControl();
        }
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            OpacitySlider = GetTemplateChild("OpacitySlider") as Slider;
            if (OpacitySlider != null)
                OpacitySlider.ValueChanged += new RoutedPropertyChangedEventHandler<double>(OpacitySlider_ValueChanged);

            ClusterPanel = GetTemplateChild("ClusterPanel") as ContentControl;
            RenderAsHeatMapPanel = GetTemplateChild("RenderAsHeatMapPanel") as ContentControl;
            
            MarkerSymbolSelector = GetTemplateChild("MarkerSymbolSelector") as MarkerSymbolSelector;
            if (MarkerSymbolSelector != null)
            {
                MarkerSymbolSelector.MarkerSymbolConfigFileUrl = MarkerSymbolConfigFileUrl;
                MarkerSymbolSelector.MarkerSymbolDirectory = MarkerSymbolDirectory;
                MarkerSymbolSelector.SymbolSelected += new SymbolSelectedEventHandler(MarkerSymbolSelector_SymbolSelected);
                MarkerSymbolSelector.Show();
            }

            CurrentSymbolImage = GetTemplateChild("CurrentSymbolImage") as Image;
            CurrentSymbolImageOverlay = GetTemplateChild("CurrentSymbolImageOverlay") as Rectangle;

            ClusterFeaturesCheckBox = GetTemplateChild("ClusterFeaturesCheckBox") as CheckBox;
            if (ClusterFeaturesCheckBox != null)
            {
                ClusterFeaturesCheckBox.Checked += new RoutedEventHandler(ClusterFeaturesCheckBox_Checked);
                ClusterFeaturesCheckBox.Unchecked += new RoutedEventHandler(ClusterFeaturesCheckBox_Unchecked);
            }

            AdvancedClusterPropertiesButton = GetTemplateChild("AdvancedClusterPropertiesButton") as Button;
            if (AdvancedClusterPropertiesButton != null)
                AdvancedClusterPropertiesButton.Click += new RoutedEventHandler(AdvancedClusterProperties_Click);

            RenderAsHeatMapCheckBox = GetTemplateChild("RenderAsHeatMapCheckBox") as CheckBox;
            if (RenderAsHeatMapCheckBox != null)
            {
                RenderAsHeatMapCheckBox.Checked += new RoutedEventHandler(RenderAsHeatMapCheckBox_Checked);
                RenderAsHeatMapCheckBox.Unchecked += new RoutedEventHandler(RenderAsHeatMapCheckBox_Unchecked);
            }

            AdvancedHeatMapPropertiesButton = GetTemplateChild("AdvancedHeatMapPropertiesButton") as Button;
            if (AdvancedHeatMapPropertiesButton != null)
                AdvancedHeatMapPropertiesButton.Click += new RoutedEventHandler(AdvancedHeatMapProperties_Click);

            Initialize();
            loadPointSymbolConfigControl();
        }