How to make WPF Toolkit charts expand with to fit content?Can't create xmlns reference to other project in XAMLCould not load type 'System.Windows.Controls.Primitives.MultiSelector' from assembly PresentationFrameworkWPF chart controlsDoes my code demonstrate good WPF practice?Text orientationHow to define 'Attached property' as 'SelectedValuePath' in ComboBox?combo box inside a user control disappears when style is applied in wpfHow to remove the default border around a group of subitems?WPF to powershell errorsNavigate to other page IocContainers and MVVM light

TFT RGB LCD construction and

What do you do if you have developments on your paper during the long peer review process?

What can a pilot do if an air traffic controller is incapacitated?

If an object moving in a circle experiences centripetal force, then doesn't it also experience centrifugal force, because of Newton's third law?

A high quality contribution but an annoying error is present in my published article

Is there a way to hide HTML source code yet keeping it effective?

Where are they calling from?

What exactly did this mechanic sabotage on the American Airlines 737, and how dangerous was it?

Is the mass of paint relevant in rocket design?

Examples of "unsuccessful" theories with afterlives

What causes the traces to wrinkle like this and should I be worried

Replace HP Smart Array RAID Controller with newer generation controller (e.g. 410 -> 420)

How can an attacker use robots.txt?

Organisational search option

What is the meaning of "heutig" in this sentence?

Cut a cake into 3 equal portions with only a knife

Could Apollo astronauts see city lights from the moon?

Why does this image of Jupiter look so strange?

How do pilots align the HUD with their eyeballs?

Is it impolite to ask for halal food when traveling to and in Thailand?

Is it really necessary to have a four hour meeting in Sprint planning?

Late 1970's and 6502 chip facilities for operating systems

Painting a 4x6 grid with 2 colours

Guitar tuning (EADGBE), "perfect" fourths?



How to make WPF Toolkit charts expand with to fit content?


Can't create xmlns reference to other project in XAMLCould not load type 'System.Windows.Controls.Primitives.MultiSelector' from assembly PresentationFrameworkWPF chart controlsDoes my code demonstrate good WPF practice?Text orientationHow to define 'Attached property' as 'SelectedValuePath' in ComboBox?combo box inside a user control disappears when style is applied in wpfHow to remove the default border around a group of subitems?WPF to powershell errorsNavigate to other page IocContainers and MVVM light






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm trying to create some bar charts from DotNetProjects.Wpf.Toolkit that display some data totals, though the data can change at run time. The problem is that I cannot get the chart to fit the size of the content - I always have to provide a fixed value (and setting Height="Auto" doesn't work), but I don't know what the size will need to be while running. What can I do to make my chart fit the content rather than the other way around?



My XAML code looks like this:



<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Movie_Vault"
xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Layout.Toolkit" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" x:Class="Movie_Vault.frmStatistics"
mc:Ignorable="d"
Title="frmStatistics" Style="StaticResource RoundedFormStyle" WindowStartupLocation="CenterOwner">
<Border Style="StaticResource WindowBorderStyle">
<DockPanel x:Name="OuterPanel" >
<Border Style="StaticResource PanelBorderStyle" DockPanel.Dock="Top">
<DockPanel x:Name="TopPanel" HorizontalAlignment="Stretch" VerticalAlignment="Top">
<Image Height="16" Margin="8,4,8,4" Source="Images/process.png"/>
<TextBlock Style="StaticResource MediumFont"><Run Text="Statistics"/></TextBlock>
<DockPanel DockPanel.Dock="Right" HorizontalAlignment="Right" VerticalAlignment="Center">
<Button x:Name="btnClose" Content="X" Style="StaticResource MicroButtonStyle" Margin="0,0,8,0" Click="btnClose_Click"/>
</DockPanel>
</DockPanel>
</Border>
<Border Style="StaticResource PanelBorderStyle" DockPanel.Dock="Left" Margin="0,8,0,0">
<DockPanel VerticalAlignment="Top" >
<ScrollViewer VerticalScrollBarVisibility="Auto" Height="400" Width="500">
<Grid Name="panelTopGenres">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<toolkit:Chart Name="chartTopGenres" Title="Top Genres" VerticalAlignment="Top"
Margin="16,16,16,8" Padding="8" Background="White" >
<toolkit:BarSeries DependentValuePath="Value" IndependentValuePath="Key"
ItemsSource="Binding"
IsSelectionEnabled="False" Background="White"/>
</toolkit:Chart>
<Button Grid.Row="1" x:Name="btnTopGenresToggle" Style="StaticResource SmallButtonStyle"
Content="Show All Genres" Width="120"
Margin="16,0,4,4" HorizontalAlignment="Left" Click="btnToggle_Click" />
</Grid>
</ScrollViewer>
</DockPanel>
</Border>
</DockPanel>
</Border>
</Window>









share|improve this question
































    0















    I'm trying to create some bar charts from DotNetProjects.Wpf.Toolkit that display some data totals, though the data can change at run time. The problem is that I cannot get the chart to fit the size of the content - I always have to provide a fixed value (and setting Height="Auto" doesn't work), but I don't know what the size will need to be while running. What can I do to make my chart fit the content rather than the other way around?



    My XAML code looks like this:



    <Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:Movie_Vault"
    xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Layout.Toolkit" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" x:Class="Movie_Vault.frmStatistics"
    mc:Ignorable="d"
    Title="frmStatistics" Style="StaticResource RoundedFormStyle" WindowStartupLocation="CenterOwner">
    <Border Style="StaticResource WindowBorderStyle">
    <DockPanel x:Name="OuterPanel" >
    <Border Style="StaticResource PanelBorderStyle" DockPanel.Dock="Top">
    <DockPanel x:Name="TopPanel" HorizontalAlignment="Stretch" VerticalAlignment="Top">
    <Image Height="16" Margin="8,4,8,4" Source="Images/process.png"/>
    <TextBlock Style="StaticResource MediumFont"><Run Text="Statistics"/></TextBlock>
    <DockPanel DockPanel.Dock="Right" HorizontalAlignment="Right" VerticalAlignment="Center">
    <Button x:Name="btnClose" Content="X" Style="StaticResource MicroButtonStyle" Margin="0,0,8,0" Click="btnClose_Click"/>
    </DockPanel>
    </DockPanel>
    </Border>
    <Border Style="StaticResource PanelBorderStyle" DockPanel.Dock="Left" Margin="0,8,0,0">
    <DockPanel VerticalAlignment="Top" >
    <ScrollViewer VerticalScrollBarVisibility="Auto" Height="400" Width="500">
    <Grid Name="panelTopGenres">
    <Grid.RowDefinitions>
    <RowDefinition Height="*" />
    <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>
    <toolkit:Chart Name="chartTopGenres" Title="Top Genres" VerticalAlignment="Top"
    Margin="16,16,16,8" Padding="8" Background="White" >
    <toolkit:BarSeries DependentValuePath="Value" IndependentValuePath="Key"
    ItemsSource="Binding"
    IsSelectionEnabled="False" Background="White"/>
    </toolkit:Chart>
    <Button Grid.Row="1" x:Name="btnTopGenresToggle" Style="StaticResource SmallButtonStyle"
    Content="Show All Genres" Width="120"
    Margin="16,0,4,4" HorizontalAlignment="Left" Click="btnToggle_Click" />
    </Grid>
    </ScrollViewer>
    </DockPanel>
    </Border>
    </DockPanel>
    </Border>
    </Window>









    share|improve this question




























      0












      0








      0








      I'm trying to create some bar charts from DotNetProjects.Wpf.Toolkit that display some data totals, though the data can change at run time. The problem is that I cannot get the chart to fit the size of the content - I always have to provide a fixed value (and setting Height="Auto" doesn't work), but I don't know what the size will need to be while running. What can I do to make my chart fit the content rather than the other way around?



      My XAML code looks like this:



      <Window
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:local="clr-namespace:Movie_Vault"
      xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Layout.Toolkit" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" x:Class="Movie_Vault.frmStatistics"
      mc:Ignorable="d"
      Title="frmStatistics" Style="StaticResource RoundedFormStyle" WindowStartupLocation="CenterOwner">
      <Border Style="StaticResource WindowBorderStyle">
      <DockPanel x:Name="OuterPanel" >
      <Border Style="StaticResource PanelBorderStyle" DockPanel.Dock="Top">
      <DockPanel x:Name="TopPanel" HorizontalAlignment="Stretch" VerticalAlignment="Top">
      <Image Height="16" Margin="8,4,8,4" Source="Images/process.png"/>
      <TextBlock Style="StaticResource MediumFont"><Run Text="Statistics"/></TextBlock>
      <DockPanel DockPanel.Dock="Right" HorizontalAlignment="Right" VerticalAlignment="Center">
      <Button x:Name="btnClose" Content="X" Style="StaticResource MicroButtonStyle" Margin="0,0,8,0" Click="btnClose_Click"/>
      </DockPanel>
      </DockPanel>
      </Border>
      <Border Style="StaticResource PanelBorderStyle" DockPanel.Dock="Left" Margin="0,8,0,0">
      <DockPanel VerticalAlignment="Top" >
      <ScrollViewer VerticalScrollBarVisibility="Auto" Height="400" Width="500">
      <Grid Name="panelTopGenres">
      <Grid.RowDefinitions>
      <RowDefinition Height="*" />
      <RowDefinition Height="Auto" />
      </Grid.RowDefinitions>
      <toolkit:Chart Name="chartTopGenres" Title="Top Genres" VerticalAlignment="Top"
      Margin="16,16,16,8" Padding="8" Background="White" >
      <toolkit:BarSeries DependentValuePath="Value" IndependentValuePath="Key"
      ItemsSource="Binding"
      IsSelectionEnabled="False" Background="White"/>
      </toolkit:Chart>
      <Button Grid.Row="1" x:Name="btnTopGenresToggle" Style="StaticResource SmallButtonStyle"
      Content="Show All Genres" Width="120"
      Margin="16,0,4,4" HorizontalAlignment="Left" Click="btnToggle_Click" />
      </Grid>
      </ScrollViewer>
      </DockPanel>
      </Border>
      </DockPanel>
      </Border>
      </Window>









      share|improve this question
















      I'm trying to create some bar charts from DotNetProjects.Wpf.Toolkit that display some data totals, though the data can change at run time. The problem is that I cannot get the chart to fit the size of the content - I always have to provide a fixed value (and setting Height="Auto" doesn't work), but I don't know what the size will need to be while running. What can I do to make my chart fit the content rather than the other way around?



      My XAML code looks like this:



      <Window
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:local="clr-namespace:Movie_Vault"
      xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Layout.Toolkit" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" x:Class="Movie_Vault.frmStatistics"
      mc:Ignorable="d"
      Title="frmStatistics" Style="StaticResource RoundedFormStyle" WindowStartupLocation="CenterOwner">
      <Border Style="StaticResource WindowBorderStyle">
      <DockPanel x:Name="OuterPanel" >
      <Border Style="StaticResource PanelBorderStyle" DockPanel.Dock="Top">
      <DockPanel x:Name="TopPanel" HorizontalAlignment="Stretch" VerticalAlignment="Top">
      <Image Height="16" Margin="8,4,8,4" Source="Images/process.png"/>
      <TextBlock Style="StaticResource MediumFont"><Run Text="Statistics"/></TextBlock>
      <DockPanel DockPanel.Dock="Right" HorizontalAlignment="Right" VerticalAlignment="Center">
      <Button x:Name="btnClose" Content="X" Style="StaticResource MicroButtonStyle" Margin="0,0,8,0" Click="btnClose_Click"/>
      </DockPanel>
      </DockPanel>
      </Border>
      <Border Style="StaticResource PanelBorderStyle" DockPanel.Dock="Left" Margin="0,8,0,0">
      <DockPanel VerticalAlignment="Top" >
      <ScrollViewer VerticalScrollBarVisibility="Auto" Height="400" Width="500">
      <Grid Name="panelTopGenres">
      <Grid.RowDefinitions>
      <RowDefinition Height="*" />
      <RowDefinition Height="Auto" />
      </Grid.RowDefinitions>
      <toolkit:Chart Name="chartTopGenres" Title="Top Genres" VerticalAlignment="Top"
      Margin="16,16,16,8" Padding="8" Background="White" >
      <toolkit:BarSeries DependentValuePath="Value" IndependentValuePath="Key"
      ItemsSource="Binding"
      IsSelectionEnabled="False" Background="White"/>
      </toolkit:Chart>
      <Button Grid.Row="1" x:Name="btnTopGenresToggle" Style="StaticResource SmallButtonStyle"
      Content="Show All Genres" Width="120"
      Margin="16,0,4,4" HorizontalAlignment="Left" Click="btnToggle_Click" />
      </Grid>
      </ScrollViewer>
      </DockPanel>
      </Border>
      </DockPanel>
      </Border>
      </Window>






      c# wpf charts wpftoolkit






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 1 at 9:03







      ChrisUK

















      asked Mar 28 at 16:40









      ChrisUKChrisUK

      621 silver badge12 bronze badges




      621 silver badge12 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          1

















          What can I do to make my chart fit the content rather than the other way around?




          Get rid of any StackPanels:



          <Grid Name="panelTopGenres">
          <Grid.RowDefinitions>
          <RowDefinition Height="*" />
          <RowDefinition Height="Auto" />
          </Grid.RowDefinitions>
          <toolkit:Chart Name="chartTopGenres" Title="Top Genres" VerticalAlignment="Top"
          Margin="16,16,16,8" Padding="8" Background="White" >
          <toolkit:BarSeries DependentValuePath="Value" IndependentValuePath="Key"
          ItemsSource="Binding"
          IsSelectionEnabled="False" Background="White"/>
          </toolkit:Chart>
          <Button Grid.Row="1" x:Name="btnTopGenresToggle" Style="StaticResource SmallButtonStyle"
          Content="Show All Genres" Width="120"
          Margin="16,0,4,4" HorizontalAlignment="Left" Click="btnToggle_Click" />
          </Grid>


          A StackPanel doesn't resize its children.






          share|improve this answer

























          • Didn't work for me, it still crushes all data into the default height without expanding.

            – ChrisUK
            Mar 30 at 10:11











          • What's the parent panel of the Grid? Please remember to always include a MCVE when asking a question.

            – mm8
            Apr 1 at 7:39












          • OK, I've updated my original post to show the code for the whole window. But however I structure my code I still can't seem to get the Chart to size properly. Maybe I need a custom DataTemplate, but the examples I've seen look complex and I wouldn't know what bits to change.

            – ChrisUK
            Apr 1 at 9:09














          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );














          draft saved

          draft discarded
















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55402822%2fhow-to-make-wpf-toolkit-charts-expand-with-to-fit-content%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1

















          What can I do to make my chart fit the content rather than the other way around?




          Get rid of any StackPanels:



          <Grid Name="panelTopGenres">
          <Grid.RowDefinitions>
          <RowDefinition Height="*" />
          <RowDefinition Height="Auto" />
          </Grid.RowDefinitions>
          <toolkit:Chart Name="chartTopGenres" Title="Top Genres" VerticalAlignment="Top"
          Margin="16,16,16,8" Padding="8" Background="White" >
          <toolkit:BarSeries DependentValuePath="Value" IndependentValuePath="Key"
          ItemsSource="Binding"
          IsSelectionEnabled="False" Background="White"/>
          </toolkit:Chart>
          <Button Grid.Row="1" x:Name="btnTopGenresToggle" Style="StaticResource SmallButtonStyle"
          Content="Show All Genres" Width="120"
          Margin="16,0,4,4" HorizontalAlignment="Left" Click="btnToggle_Click" />
          </Grid>


          A StackPanel doesn't resize its children.






          share|improve this answer

























          • Didn't work for me, it still crushes all data into the default height without expanding.

            – ChrisUK
            Mar 30 at 10:11











          • What's the parent panel of the Grid? Please remember to always include a MCVE when asking a question.

            – mm8
            Apr 1 at 7:39












          • OK, I've updated my original post to show the code for the whole window. But however I structure my code I still can't seem to get the Chart to size properly. Maybe I need a custom DataTemplate, but the examples I've seen look complex and I wouldn't know what bits to change.

            – ChrisUK
            Apr 1 at 9:09
















          1

















          What can I do to make my chart fit the content rather than the other way around?




          Get rid of any StackPanels:



          <Grid Name="panelTopGenres">
          <Grid.RowDefinitions>
          <RowDefinition Height="*" />
          <RowDefinition Height="Auto" />
          </Grid.RowDefinitions>
          <toolkit:Chart Name="chartTopGenres" Title="Top Genres" VerticalAlignment="Top"
          Margin="16,16,16,8" Padding="8" Background="White" >
          <toolkit:BarSeries DependentValuePath="Value" IndependentValuePath="Key"
          ItemsSource="Binding"
          IsSelectionEnabled="False" Background="White"/>
          </toolkit:Chart>
          <Button Grid.Row="1" x:Name="btnTopGenresToggle" Style="StaticResource SmallButtonStyle"
          Content="Show All Genres" Width="120"
          Margin="16,0,4,4" HorizontalAlignment="Left" Click="btnToggle_Click" />
          </Grid>


          A StackPanel doesn't resize its children.






          share|improve this answer

























          • Didn't work for me, it still crushes all data into the default height without expanding.

            – ChrisUK
            Mar 30 at 10:11











          • What's the parent panel of the Grid? Please remember to always include a MCVE when asking a question.

            – mm8
            Apr 1 at 7:39












          • OK, I've updated my original post to show the code for the whole window. But however I structure my code I still can't seem to get the Chart to size properly. Maybe I need a custom DataTemplate, but the examples I've seen look complex and I wouldn't know what bits to change.

            – ChrisUK
            Apr 1 at 9:09














          1














          1










          1










          What can I do to make my chart fit the content rather than the other way around?




          Get rid of any StackPanels:



          <Grid Name="panelTopGenres">
          <Grid.RowDefinitions>
          <RowDefinition Height="*" />
          <RowDefinition Height="Auto" />
          </Grid.RowDefinitions>
          <toolkit:Chart Name="chartTopGenres" Title="Top Genres" VerticalAlignment="Top"
          Margin="16,16,16,8" Padding="8" Background="White" >
          <toolkit:BarSeries DependentValuePath="Value" IndependentValuePath="Key"
          ItemsSource="Binding"
          IsSelectionEnabled="False" Background="White"/>
          </toolkit:Chart>
          <Button Grid.Row="1" x:Name="btnTopGenresToggle" Style="StaticResource SmallButtonStyle"
          Content="Show All Genres" Width="120"
          Margin="16,0,4,4" HorizontalAlignment="Left" Click="btnToggle_Click" />
          </Grid>


          A StackPanel doesn't resize its children.






          share|improve this answer














          What can I do to make my chart fit the content rather than the other way around?




          Get rid of any StackPanels:



          <Grid Name="panelTopGenres">
          <Grid.RowDefinitions>
          <RowDefinition Height="*" />
          <RowDefinition Height="Auto" />
          </Grid.RowDefinitions>
          <toolkit:Chart Name="chartTopGenres" Title="Top Genres" VerticalAlignment="Top"
          Margin="16,16,16,8" Padding="8" Background="White" >
          <toolkit:BarSeries DependentValuePath="Value" IndependentValuePath="Key"
          ItemsSource="Binding"
          IsSelectionEnabled="False" Background="White"/>
          </toolkit:Chart>
          <Button Grid.Row="1" x:Name="btnTopGenresToggle" Style="StaticResource SmallButtonStyle"
          Content="Show All Genres" Width="120"
          Margin="16,0,4,4" HorizontalAlignment="Left" Click="btnToggle_Click" />
          </Grid>


          A StackPanel doesn't resize its children.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 29 at 13:36









          mm8mm8

          102k9 gold badges20 silver badges34 bronze badges




          102k9 gold badges20 silver badges34 bronze badges















          • Didn't work for me, it still crushes all data into the default height without expanding.

            – ChrisUK
            Mar 30 at 10:11











          • What's the parent panel of the Grid? Please remember to always include a MCVE when asking a question.

            – mm8
            Apr 1 at 7:39












          • OK, I've updated my original post to show the code for the whole window. But however I structure my code I still can't seem to get the Chart to size properly. Maybe I need a custom DataTemplate, but the examples I've seen look complex and I wouldn't know what bits to change.

            – ChrisUK
            Apr 1 at 9:09


















          • Didn't work for me, it still crushes all data into the default height without expanding.

            – ChrisUK
            Mar 30 at 10:11











          • What's the parent panel of the Grid? Please remember to always include a MCVE when asking a question.

            – mm8
            Apr 1 at 7:39












          • OK, I've updated my original post to show the code for the whole window. But however I structure my code I still can't seem to get the Chart to size properly. Maybe I need a custom DataTemplate, but the examples I've seen look complex and I wouldn't know what bits to change.

            – ChrisUK
            Apr 1 at 9:09

















          Didn't work for me, it still crushes all data into the default height without expanding.

          – ChrisUK
          Mar 30 at 10:11





          Didn't work for me, it still crushes all data into the default height without expanding.

          – ChrisUK
          Mar 30 at 10:11













          What's the parent panel of the Grid? Please remember to always include a MCVE when asking a question.

          – mm8
          Apr 1 at 7:39






          What's the parent panel of the Grid? Please remember to always include a MCVE when asking a question.

          – mm8
          Apr 1 at 7:39














          OK, I've updated my original post to show the code for the whole window. But however I structure my code I still can't seem to get the Chart to size properly. Maybe I need a custom DataTemplate, but the examples I've seen look complex and I wouldn't know what bits to change.

          – ChrisUK
          Apr 1 at 9:09






          OK, I've updated my original post to show the code for the whole window. But however I structure my code I still can't seem to get the Chart to size properly. Maybe I need a custom DataTemplate, but the examples I've seen look complex and I wouldn't know what bits to change.

          – ChrisUK
          Apr 1 at 9:09





















          draft saved

          draft discarded















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55402822%2fhow-to-make-wpf-toolkit-charts-expand-with-to-fit-content%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해