Pre loader

How To minimize All Child Panes by Default In Multi-Pane Chart

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

Guys I m trying to minimize all child pane in multi-pane charts by default i am not able to do that please help me
i want same like in image attached below.
please reply as soon as possible.

Images
  • You must to post comments
1
0

Hi there,

Unfortunately there is no built in way to do this with current implementation of SciChartGroup. But you could use custom SciChartGroup which provides desired behavior:

public class MinimizedSciChartGroup : SciChartGroup
{
    private StackPanel _stackPanel;

    public MinimizedSciChartGroup()
    {
        Loaded+=OnLoaded;
    }

    private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
    {
        foreach (var pane in _stackPanel.Children.OfType<SciChartGroupPane>().ToList())
        {
            var itemPane = pane.DataContext as ItemPane;
            if (itemPane != null)
            {
                itemPane.ChangeOrientationCommand.Execute(null);
            }
        }

        Loaded -= OnLoaded;
    }

    public override void OnApplyTemplate()
    {
        base.OnApplyTemplate();

        _stackPanel = GetTemplateChild("PART_StackedContent") as StackPanel;
    }
}

Hope it helps!

  • You must to post comments
0
0

thanks a lot YURA for replying
sorry i am not able to understand that how to use the above code can you explain it .

  • Yura Khariton
    You just need to replace usage of SciChartGroup control on MinimizedSciChartGroup in XAML and this should do the trick.
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies