Using an Expander with a GridSplitter and NChartControl WPF


Author
Message
Fabio Olcese
Fabio Olcese
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)
Group: Forum Members
Posts: 11, Visits: 40
The expander won't work properly. When I try to collapse the expander it will just leave a blank space and as soon as I move the GridSplitter it will properly collapse. When I try to expand it it won't do anything making it necessary to move the GridSplitter to the left so that the NChartControl appear.

I understand the the Expander and GridSplitter don't work well together so I am using the ExpanderGrid taken out from this page: http://www.cenito.se/2014/11/gridsplitter-expander-dont-work-together/ which made it work well with other Charting Components. 

It would seem that normally that the OnChildDesiredSizeChanged of the ExpanderGrid won't trigger when clicking the expander button as it would normally do.

The xaml code its something like this:

<v:ExpanderGrid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
    
    <v:ExpanderGrid.ColumnDefinitions>
      <ColumnDefinition Width="2*"/>
      <ColumnDefinition Width="5"/>
      <ColumnDefinition Width="2*"/>
    </fv:ExpanderGrid.ColumnDefinitions>
    
    <DockPanel Grid.Column="0">
      <UserControl/>
      <UserControl/>
    </DockPanel>
    
    <GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Stretch"/>

    <Expander Grid.Column="2" ExpandDirection="Left" IsExpanded="{Binding Property}">
      <UserControl with NChartControl/>
    </Expander>

   </v:ExpanderGrid>

Thanks in advance.
Tags
Replies
Fabio Olcese
Fabio Olcese
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)
Group: Forum Members
Posts: 11, Visits: 40
Thanks for the response. The small project reproducing the problem. has size of 7.9 MB and I can't actually attach it here. How can i send it you?
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi Fabio,

Just send it to support@nevron.com . Thank you.


Best Regards,
Nevron Support Team


Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi Fabio,
 
The problem is that the chart control does not have preferred width/height. To solve the problem simply assign some width / height to the chart:
 
Plot.Width = 400;
Plot.Height = 300;  

Let us know if you meet any problems or have any questions.


Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search