Updating MarkedZone

2 posts, 0 answers
  1. Qwerty
    Qwerty avatar
    1 posts
    Member since:
    Apr 2012

    Posted 17 Apr 2012 Link to this post

    I was trying to move a MarkedZone on my chart by changing its StartY and EndY in my code behind, but the MarkedZone disappears instead of moving to the new position unless I reload the silverlight app or refreshing the userControl. Is there anyway that I can make it update dynamically?

  2. Nikolay
    Nikolay avatar
    395 posts

    Posted 23 Apr 2012 Link to this post


    We have tested your scenario by updating the marked zone on a button click and it works as expected on our side.Please, consider the following code snippet :
    private void button_Click(object sender, RoutedEventArgs e)
                MarkedZone markedzone = this.radChart.DefaultView.ChartArea.Annotations[0] as MarkedZone;
                markedzone.StartY = 0;
                markedzone.EndY = 1.5;
                markedzone.Background = new SolidColorBrush(Color.FromArgb(255, 248, 109, 90));

    Alternatively, you can clear all annotations on button click and set new ones if needed.

    Hope this helps.

    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Back to Top