Ejemplo n.º 1
0
 void BackgroundColorSelector_ColorPicked(object sender, ColorChosenEventArgs e)
 {
     if (graphicsLayer != null)
     {
         graphicsLayer.ChangeClusterFlareBackground(e.Color);
     }
 }
 protected virtual void OnColorPicked(ColorChosenEventArgs e)
 {
     if (this.ColorPicked != null)
     {
         this.ColorPicked(this, e);
     }
 }
Ejemplo n.º 3
0
        void OutlineColorSelector_ColorPicked(object sender, ColorChosenEventArgs e)
        {
            FillSymbol fillSymbol = Symbol as FillSymbol;
            LineSymbol lineSymbol = Symbol as LineSymbol;

            FSS.SimpleMarkerSymbol sms = Symbol as FSS.SimpleMarkerSymbol;
            if (sms != null)
            {
                SolidColorBrush brush = sms.OutlineColor as SolidColorBrush;
                if (brush != null)
                {
                    brush.Color = e.Color;
                    onCurrentSymbolChanged();
                }
            }
            else if (fillSymbol != null)
            {
                SolidColorBrush brush = fillSymbol.BorderBrush as SolidColorBrush;
                if (brush != null)
                {
                    brush.Color = e.Color;
                    onCurrentSymbolChanged();
                }
            }
            else if (lineSymbol != null)
            {
                SolidColorBrush brush = lineSymbol.Color as SolidColorBrush;
                if (brush != null)
                {
                    brush.Color = e.Color;
                    onCurrentSymbolChanged();
                }
            }
        }
Ejemplo n.º 4
0
        void AssociatedObject_ColorPicked(object sender, ColorChosenEventArgs e)
        {
            ControlTreeHelper helper = new ControlTreeHelper();
            Popup             popup  = helper.FindParentControl <Popup>(AssociatedObject);

            if (popup == null)
            {
                return;
            }

            DropDownButton dropDownButton = popup.Tag as DropDownButton;

            if (dropDownButton == null)
            {
                return;
            }

            MapTipsConfig mapTipsConfig = helper.FindAncestorOfType <MapTipsConfig>(dropDownButton);

            if (mapTipsConfig != null)
            {
                mapTipsConfig.MapTipBorder = new SolidColorBrush(e.Color);
            }

            dropDownButton.ClosePopup();
        }
Ejemplo n.º 5
0
 protected virtual void OnColorSelected(ColorChosenEventArgs args)
 {
     if (ColorSelected != null)
     {
         ColorSelected(this, args);
     }
 }
        void AssociatedObject_ColorPicked(object sender, ColorChosenEventArgs e)
        {
            if (string.IsNullOrEmpty(PropertyName))
            {
                return;
            }
            ThemeColorProperty property = (ThemeColorProperty)Enum.Parse(typeof(ThemeColorProperty), PropertyName, true);

            ThemeColorHelper.ApplyColorProperty(ApplicationColorSet, e.Color, property);
        }
 void Palette_ColorPicked(object sender, ColorChosenEventArgs e)
 { 
     if (IsSolid)
     {
         BackgroundStart = new SolidColorBrush() { Color = e.Color };
         BackgroundEnd = new SolidColorBrush() { Color = e.Color };
     }
     else
     {
         if (IsStartSelected)
             BackgroundStart = new SolidColorBrush() { Color = e.Color };
         else
             BackgroundEnd = new SolidColorBrush() { Color = e.Color };
     }
 }
 void ColorPalette_ColorPicked(object sender, ColorChosenEventArgs e)
 {
     if (ColorBrush == null)
     {
         ColorBrush = new SolidColorBrush(e.Color);
     }
     else
     {
         ColorBrush.Color = e.Color;
     }
     OnColorPicked(e);
     if (AutoClosePaletteOnColorChosen)
     {
         ClosePopup();
     }
 }
Ejemplo n.º 9
0
        private void onColorButtonColorSelected(object sender, ColorChosenEventArgs args)
        {
            //if (_lastSelectedColorButton != null) // unselect the previous button
            //  _lastSelectedColorButton.IsSelected = false;

            SelectedColorBrush = new SolidColorBrush(args.Color);

            OnColorPicked(args);

            _lastSelectedColorButton = sender as ColorPaletteButton;
            //if (_lastSelectedColorButton != null) // select this button
            //  _lastSelectedColorButton.IsSelected = true;

            if (ColorSelector != null)
            {
                ColorSelector.InitialColor = ColorSelector.Color = args.Color;
            }
        }
        void Palette_ColorPicked(object sender, ColorChosenEventArgs e)
        {
            if (IsSolid)
            {
                BackgroundStart = new SolidColorBrush()
                {
                    Color = e.Color
                };
                BackgroundEnd = new SolidColorBrush()
                {
                    Color = e.Color
                };
            }
            else
            {
                if (IsStartSelected)
                {
                    BackgroundStart = new SolidColorBrush()
                    {
                        Color = e.Color
                    }
                }
                ;
                else
                {
                    BackgroundEnd = new SolidColorBrush()
                    {
                        Color = e.Color
                    }
                };
            }
        }

        void ApplyThemeColors()
        {
            if (ThemeColors != null && Palette != null)
            {
                foreach (Color color in ThemeColors)
                {
                    Palette.ThemeColors.Add(color);
                }
            }
        }
 void ColorPalette_ColorPicked(object sender, ColorChosenEventArgs e)
 {
     if (ColorBrush == null)
         ColorBrush = new SolidColorBrush(e.Color);
     else
         ColorBrush.Color = e.Color;
     OnColorPicked(e);
     if(AutoClosePaletteOnColorChosen)
         ClosePopup();
 }
Ejemplo n.º 12
0
        void FillColorSelector_ColorPicked(object sender, ColorChosenEventArgs e)
        {
            FillSymbol fillSymbol = Symbol as FillSymbol;

            if (fillSymbol != null)
            {
                #region FSS.SFS
                if (fillSymbol is FSS.SimpleFillSymbol)
                {
                    ((FSS.SimpleFillSymbol)fillSymbol).Color = e.Color;
                    onCurrentSymbolChanged();
                }
                #endregion
                #region FSS.PFS
                else if (fillSymbol is FSS.PictureFillSymbol)
                {
                    FSS.PictureFillSymbol pfs   = fillSymbol as FSS.PictureFillSymbol;
                    SolidColorBrush       brush = pfs.Color as SolidColorBrush;
                    if (brush != null)
                    {
                        brush.Color = e.Color;
                        onCurrentSymbolChanged();
                    }
                }
                #endregion
                #region Default
                else
                {
                    SolidColorBrush brush = fillSymbol.Fill as SolidColorBrush;
                    if (brush != null)
                    {
                        brush.Color = e.Color;
                        onCurrentSymbolChanged();
                    }
                }
                #endregion
            }
            else
            {
                #region Mapping Core Marker
                ESRI.ArcGIS.Mapping.Core.Symbols.MarkerSymbol markerSymbol = Symbol as ESRI.ArcGIS.Mapping.Core.Symbols.MarkerSymbol;
                if (markerSymbol != null)
                {
                    SolidColorBrush sb = markerSymbol.Color as SolidColorBrush;
                    if (sb != null)
                    {
                        sb.Color = e.Color;
                        onCurrentSymbolChanged();
                    }
                }
                #endregion
                else
                {
                    #region Client SMS
                    ESRI.ArcGIS.Client.Symbols.SimpleMarkerSymbol simpleMarkerSymbol = Symbol as ESRI.ArcGIS.Client.Symbols.SimpleMarkerSymbol;
                    if (simpleMarkerSymbol != null)
                    {
                        SolidColorBrush sb = simpleMarkerSymbol.Color as SolidColorBrush;
                        if (sb != null)
                        {
                            sb.Color = e.Color;
                            onCurrentSymbolChanged();
                        }
                    }
                    #endregion
                    #region FSS.SMS
                    else
                    {
                        FSS.SimpleMarkerSymbol sms = Symbol as FSS.SimpleMarkerSymbol;
                        if (sms != null)
                        {
                            SolidColorBrush sb = sms.Color as SolidColorBrush;
                            if (sb != null)
                            {
                                sb.Color = e.Color;
                                onCurrentSymbolChanged();
                            }
                        }
                    }
                    #endregion
                }
            }
        }
		void BackgroundColorSelector_ColorPicked(object sender, ColorChosenEventArgs e)
		{
			if (graphicsLayer != null) graphicsLayer.ChangeClusterFlareBackground(e.Color);
		}
Ejemplo n.º 14
0
        private void onColorButtonColorSelected(object sender, ColorChosenEventArgs args)
        {
            //if (_lastSelectedColorButton != null) // unselect the previous button
              //  _lastSelectedColorButton.IsSelected = false;                

            SelectedColorBrush = new SolidColorBrush(args.Color);

            OnColorPicked(args);
           
            _lastSelectedColorButton = sender as ColorPaletteButton;
            //if (_lastSelectedColorButton != null) // select this button
              //  _lastSelectedColorButton.IsSelected = true;

            if (ColorSelector != null)
                ColorSelector.InitialColor = ColorSelector.Color = args.Color;
        }
Ejemplo n.º 15
0
 protected virtual void OnColorSelected(ColorChosenEventArgs args)
 {
     if(ColorSelected != null)
         ColorSelected(this, args);
 }
Ejemplo n.º 16
0
 protected virtual void OnColorPicked(ColorChosenEventArgs e)
 {
     if (this.ColorPicked != null)
         this.ColorPicked(this, e);
 }
        void ColorPalette_ColorPicked(object sender, ColorChosenEventArgs e)
        {
            ListBoxItem selectedItem = ColorOptionComboBox.SelectedItem as ListBoxItem;
            if(selectedItem == null)
                return;
            string colorOption = selectedItem.Tag as string;
            if(string.IsNullOrEmpty(colorOption))
                return;

            ThemeColorProperty property = (ThemeColorProperty)Enum.Parse(typeof(ThemeColorProperty), colorOption, true);
            ThemeColorHelper.ApplyColorProperty(View.Instance.ApplicationColorSet, e.Color, property);
        }
 void OutlineColorSelector_ColorPicked(object sender, ColorChosenEventArgs e)
 {
     FillSymbol fillSymbol = Symbol as FillSymbol;
     LineSymbol lineSymbol = Symbol as LineSymbol;
     FSS.SimpleMarkerSymbol sms = Symbol as FSS.SimpleMarkerSymbol;
     if (sms != null)
     {
         SolidColorBrush brush = sms.OutlineColor as SolidColorBrush;
         if (brush != null)
         {
             brush.Color = e.Color;
             onCurrentSymbolChanged();
         }
     }
     else if (fillSymbol != null)
     {
         SolidColorBrush brush = fillSymbol.BorderBrush as SolidColorBrush;
         if (brush != null)
         {
             brush.Color = e.Color;
             onCurrentSymbolChanged();
         }
     }
     else if (lineSymbol != null)
     {
         SolidColorBrush brush = lineSymbol.Color as SolidColorBrush;
         if (brush != null)
         {
             brush.Color = e.Color;
             onCurrentSymbolChanged();
         }
     }
 }
 void FillColorSelector_ColorPicked(object sender, ColorChosenEventArgs e)
 {            
     FillSymbol fillSymbol = Symbol as FillSymbol;
     if (fillSymbol != null)
     {
         #region FSS.SFS
         if (fillSymbol is FSS.SimpleFillSymbol)
         {
             ((FSS.SimpleFillSymbol)fillSymbol).Color = e.Color;
              onCurrentSymbolChanged();
         }
         #endregion
         #region FSS.PFS
         else if (fillSymbol is FSS.PictureFillSymbol)
         {
             FSS.PictureFillSymbol pfs = fillSymbol as FSS.PictureFillSymbol;
              SolidColorBrush brush = pfs.Color as SolidColorBrush;
              if (brush != null)
              {
                  brush.Color = e.Color;
                  onCurrentSymbolChanged();
              }
         }
         #endregion
         #region Default
         else
         {
             SolidColorBrush brush = fillSymbol.Fill as SolidColorBrush;
             if (brush != null)
             {
                 brush.Color = e.Color;
                 onCurrentSymbolChanged();
             }
         }
         #endregion
     }
     else
     {
         #region Mapping Core Marker
         ESRI.ArcGIS.Mapping.Core.Symbols.MarkerSymbol markerSymbol = Symbol as ESRI.ArcGIS.Mapping.Core.Symbols.MarkerSymbol;
         if (markerSymbol != null)
         {
             SolidColorBrush sb = markerSymbol.Color as SolidColorBrush;
             if (sb != null)
             {
                 sb.Color = e.Color;
                 onCurrentSymbolChanged();
             }
         }
         #endregion 
         else
         {
             #region Client SMS
             ESRI.ArcGIS.Client.Symbols.SimpleMarkerSymbol simpleMarkerSymbol = Symbol as ESRI.ArcGIS.Client.Symbols.SimpleMarkerSymbol;
             if (simpleMarkerSymbol != null)
             {
                 SolidColorBrush sb = simpleMarkerSymbol.Color as SolidColorBrush;
                 if (sb != null)
                 {
                     sb.Color = e.Color;
                     onCurrentSymbolChanged();
                 }
             }
             #endregion
             #region FSS.SMS
             else
             {
                 FSS.SimpleMarkerSymbol sms = Symbol as FSS.SimpleMarkerSymbol;
                 if (sms != null)
                 {
                     SolidColorBrush sb = sms.Color as SolidColorBrush;
                     if (sb != null)
                     {
                         sb.Color = e.Color;
                         onCurrentSymbolChanged();
                     }
                 }
             }
             #endregion
         }
     }
 }
 void AssociatedObject_ColorPicked(object sender, ColorChosenEventArgs e)
 {
     ResetMapTipOnGraphicsLayers();
 }