Beispiel #1
0
 public Marker()
 {
     Style = new PointStyle();
     Style.PropertyChanged += new PropertyChangedEventHandler(Style_PropertyChanged);
 }
Beispiel #2
0
        private void Cascade(PointStyle pointStyle)
		{
            var missing = (pointStyle.Fields | pointStyle.InheritedFields) & ~Fields;
			if (missing == PointStyleFields.None) return;

			foreach (PointStyleFields fields in Enum.GetValues(typeof(PointStyleFields)))
				if (missing.HasFlag(fields))
					switch (fields)
					{
						case PointStyleFields.Angle: 
                            _angle = pointStyle.Angle;
                            OnNotifyPropertyChanged(AnglePropertyName);
                            break;
						case PointStyleFields.ScaleX: 
                            _scaleX = pointStyle.ScaleX;
                            OnNotifyPropertyChanged(ScaleXPropertyName);
                            break;
						case PointStyleFields.ScaleY: 
                            _scaleY = pointStyle.ScaleY;
                            OnNotifyPropertyChanged(ScaleYPropertyName);
                            break;
						case PointStyleFields.Opacity:
                            _opacity = pointStyle.Opacity;
                            OnNotifyPropertyChanged(OpacityPropertyName);
                            break;
						case PointStyleFields.Overlappable: 
                            _overlappable = pointStyle.Overlappable;
                            OnNotifyPropertyChanged(OverlappablePropertyName);
                            break;
						case PointStyleFields.AllowOverlap: 
                            _allowOverlap = pointStyle.AllowOverlap;
                            OnNotifyPropertyChanged(AllowOverlapPropertyName);
                            break;
                        case PointStyleFields.File: 
                            _file = pointStyle.File;
                            OnNotifyPropertyChanged(FilePropertyName);
                            break;
                        case PointStyleFields.Alignment: 
                            _alignment = pointStyle.Alignment;
                            OnNotifyPropertyChanged(AlignmentPropertyName);
                            break;
                        case PointStyleFields.Color: 
                            _color = pointStyle.Color;
                            OnNotifyPropertyChanged(ColorPropertyName);
                            break;
					}
            InheritedFields = missing;
        }