Make a chart not visible in codebehind

3 posts, 1 answers
  1. Nadine
    Nadine avatar
    7 posts
    Member since:
    Sep 2012

    Posted 29 Apr 2011 Link to this post

    Is there a property that makes the chart not visible in code behind. I've looked at the framework for the chart component and it looks like it will accept "hidden" or "collapsed", but they don't seem to work.
  2. Answer
    Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 04 May 2011 Link to this post

    Hello Nadine,
    You can use the Visibility property of RadChart to do this. For example:
    <Button x:Name="Button1" Click="Button1_Click" Width="100" Height="100">Hide chart</Button>
    <telerik:RadChart x:Name="RadChart1"></telerik:RadChart>

    private void Button1_Click(object sender, RoutedEventArgs e)
    {
        if (RadChart1.Visibility == System.Windows.Visibility.Visible)
            RadChart1.Visibility = System.Windows.Visibility.Collapsed;
        else
            RadChart1.Visibility = System.Windows.Visibility.Visible;
    }

    Greetings,
    Tsvetie
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Nadine
    Nadine avatar
    7 posts
    Member since:
    Sep 2012

    Posted 04 May 2011 Link to this post

    That worked great. Thanks.
Back to Top