示例#1
0
 /// <summary>
 /// Color property
 /// </summary>
 protected void GetChartElementColorProperty()
 {
     propertyStroke = new ChartElementColorProperty("Border Stroke Color");
     propertyStroke.ValuePresenter.Value = Stroke;
     propertyStroke.SetChartElementPropertyValue
         += presenter =>
         {
         Stroke = (SolidColorBrush)presenter.Value;
         SetStroke();
         };
 }
示例#2
0
        /// <summary>
        /// Fill Propeerty
        /// </summary>
        protected void GetChartElementFillProperty()
        {
            if (!(this is IShapeAble))
            {
                return;
            }

            IShapeAble shapeAble = (IShapeAble)this;

            propertyFill = new ChartElementColorProperty("Fill Color");
            if (shapeAble.Fill is SolidColorBrush)
            {
                propertyFill.ValuePresenter.Value = shapeAble.Fill;
            }
            propertyFill.SetChartElementPropertyValue
                += presenter =>
                {
                shapeAble.Fill = (SolidColorBrush)presenter.Value;
                };
        }