WPF Pointer Styles and Effects

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
n8soft
Newbie
Newbie
Posts: 5
Joined: Thu Apr 12, 2007 12:00 am

WPF Pointer Styles and Effects

Post by n8soft » Mon Nov 10, 2008 11:34 pm

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 ?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Nov 11, 2008 11:20 am

Hi n8soft,

We have just implemented this feature for next maintenance release.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Re: WPF Pointer Styles and Effects

Post by Christopher » Tue Nov 11, 2008 3:28 pm

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.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply