Page 1 of 1

WPF Pointer Styles and Effects

Posted: Mon Nov 10, 2008 11:34 pm
by 9644809
How customizable are elements in the WPF version ? For instance, is it possible to apply a WPF glow effect to individual Pointers in the GetPointerStyle ?

Posted: Tue Nov 11, 2008 11:20 am
by narcis
Hi n8soft,

We have just implemented this feature for next maintenance release.

Re: WPF Pointer Styles and Effects

Posted: Tue Nov 11, 2008 3:28 pm
by Chris
n8soft,
n8soft wrote:How customizable are elements in the WPF version ? For instance, is it possible to apply a WPF glow effect to individual Pointers in the GetPointerStyle ?
FYI. In the next maintenance release, due out in week 51, code such as the following:

Code: Select all

   public Window1()
    {
      InitializeComponent();
      InitializeChart();
    }

    private Steema.TeeChart.WPF.Styles.Line series1;
    private System.Windows.Media.Effects.OuterGlowBitmapEffect effect1;
    private System.Windows.Media.Effects.BlurBitmapEffect effect2;

    private void InitializeChart()
    {
      effect1 = new System.Windows.Media.Effects.OuterGlowBitmapEffect();
      effect1.GlowColor = Colors.Red;

      effect2 = new System.Windows.Media.Effects.BlurBitmapEffect();
      effect2.Radius = 2;

      tChart1.Aspect.View3D = false;
      tChart1.Aspect.UseGuidelines = true;

      tChart1.Series.Add(series1 = new Steema.TeeChart.WPF.Styles.Line());
      series1.Pointer.Visible = true;
      series1.Pointer.BitmapEffects.Children.Add(effect2);
      series1.GetPointerStyle += new CustomPoint.GetPointerStyleEventHandler(series1_GetPointerStyle);
      series1.FillSampleValues();
    }

    void series1_GetPointerStyle(CustomPoint series, GetPointerStyleEventArgs e)
    {
      if (e.ValueIndex % 2 == 0)
      {
        e.Style = PointerStyles.Rectangle;
        e.BitmapEffects.Children.Add(effect1);
      }
    }
will give you the results in this image:
Image

Obviously as many effects as you like can be added to the BitmapEffects collection.