Resize Grid with GridSplitterHow to get controls in WPF to fill available space?WPF: Trigger a content resize with GridSplitterDragging GridSplitter causes cell to grow when using Auto height/widthWpf GridSplitter replaces binding on row.height propertyHow to set initial height of a GridSplitter 'pane'?Gridsplitter: limit row heights to window sizeWPF Grid Row maximum height but resizable via GridSplitterWPF GridSplitter: changing the last column width when first one has a “*” for sizeMinHeight on resizeable ExpanderWPF converter on grid column and row length only works if gridsplitter is not used

Seized engine due to being run without oil

Does the mana ability restriction of Pithing Needle refer to the cost or the effect of an activated ability?

Stack class in Java 8

Why didn't Thor use the All powerful spear instead of Stormbreaker?

Wrathful Smite, and the term 'Creature'

What's the biggest difference between these two photos?

Can board a plane to Cameroon without a Cameroonian visa?

Have there been any countries that voted themselves out of existence?

Should I use my toaster oven for slow roasting?

Is the space of Radon measures a Polish space or at least separable?

How do I preserve the line ordering for two "equal" strings while sorting and ignoring the case?

Is it appropriate for a professor to require students to sign a non-disclosure agreement before being taught?

Is BitLocker useful in the case of stolen laptop?

What is negative current?

Is there a "right" way to interpret a novel? If so, how do we make sure our novel is interpreted correctly?

Job offer without any details but asking me to withdraw other applications - is it normal?

Why is the the worst case for this function O(n^2)?

Is there a star over my head?

What was the first LISP compiler?

Are scroll bars dead in 2019?

What is this next to the kitchen bar sink?

How does Vivi differ from other Black Mages?

How can "life" insurance prevent the cheapening of death?

Does the word “uzi” need to be capitalized?



Resize Grid with GridSplitter


How to get controls in WPF to fill available space?WPF: Trigger a content resize with GridSplitterDragging GridSplitter causes cell to grow when using Auto height/widthWpf GridSplitter replaces binding on row.height propertyHow to set initial height of a GridSplitter 'pane'?Gridsplitter: limit row heights to window sizeWPF Grid Row maximum height but resizable via GridSplitterWPF GridSplitter: changing the last column width when first one has a “*” for sizeMinHeight on resizeable ExpanderWPF converter on grid column and row length only works if gridsplitter is not used






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








2















I have the following Grid where I want to introduce a GridSplitter to resize the content of the Expander if it's expanded:



<Grid Grid.Row="2" Margin="0,5,0,0" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<!-- Menu -->
</Grid>
<Grid Grid.Row="1">
<!-- Main-Content -->
</Grid>
<GridSplitter Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Stretch" Height="3"/>
<Expander Grid.Row="3" Margin="0,10,0,0" VerticalAlignment="Bottom" Header="Details">
<TabControl ItemsSource="Binding DetailsViewModels">
<TabControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="Binding DisplayHeader"/>
</DataTemplate>
</TabControl.ItemTemplate>
</TabControl>
</Expander>
</Grid>


My problem now is the size of the Expander-Content and the resize-behavior when I move the GridSplitter.



If I set the Height of the RowDefinition where the Expander is to *, then it takes way to much space if the expander is expanded.



If I set a MaxHeight at the TabControl then I can make the TabControl smaller if the Expander is expanded. But if the maxheight is reached only the GridSplitter continous moving.



If I don't set any size, the TabControl takes it full heigth, what unfortunately is too much.



How can I achieve that the TabControl takes a certain max amount of heigth but I can increase it using my GridSplitter?










share|improve this question
























  • Is it a way to bind the MaxHeight or MaxWidth of TabControl to the Height or Width of Expander with a some value converter,

    – Rekshino
    Mar 28 at 12:38

















2















I have the following Grid where I want to introduce a GridSplitter to resize the content of the Expander if it's expanded:



<Grid Grid.Row="2" Margin="0,5,0,0" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<!-- Menu -->
</Grid>
<Grid Grid.Row="1">
<!-- Main-Content -->
</Grid>
<GridSplitter Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Stretch" Height="3"/>
<Expander Grid.Row="3" Margin="0,10,0,0" VerticalAlignment="Bottom" Header="Details">
<TabControl ItemsSource="Binding DetailsViewModels">
<TabControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="Binding DisplayHeader"/>
</DataTemplate>
</TabControl.ItemTemplate>
</TabControl>
</Expander>
</Grid>


My problem now is the size of the Expander-Content and the resize-behavior when I move the GridSplitter.



If I set the Height of the RowDefinition where the Expander is to *, then it takes way to much space if the expander is expanded.



If I set a MaxHeight at the TabControl then I can make the TabControl smaller if the Expander is expanded. But if the maxheight is reached only the GridSplitter continous moving.



If I don't set any size, the TabControl takes it full heigth, what unfortunately is too much.



How can I achieve that the TabControl takes a certain max amount of heigth but I can increase it using my GridSplitter?










share|improve this question
























  • Is it a way to bind the MaxHeight or MaxWidth of TabControl to the Height or Width of Expander with a some value converter,

    – Rekshino
    Mar 28 at 12:38













2












2








2


0






I have the following Grid where I want to introduce a GridSplitter to resize the content of the Expander if it's expanded:



<Grid Grid.Row="2" Margin="0,5,0,0" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<!-- Menu -->
</Grid>
<Grid Grid.Row="1">
<!-- Main-Content -->
</Grid>
<GridSplitter Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Stretch" Height="3"/>
<Expander Grid.Row="3" Margin="0,10,0,0" VerticalAlignment="Bottom" Header="Details">
<TabControl ItemsSource="Binding DetailsViewModels">
<TabControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="Binding DisplayHeader"/>
</DataTemplate>
</TabControl.ItemTemplate>
</TabControl>
</Expander>
</Grid>


My problem now is the size of the Expander-Content and the resize-behavior when I move the GridSplitter.



If I set the Height of the RowDefinition where the Expander is to *, then it takes way to much space if the expander is expanded.



If I set a MaxHeight at the TabControl then I can make the TabControl smaller if the Expander is expanded. But if the maxheight is reached only the GridSplitter continous moving.



If I don't set any size, the TabControl takes it full heigth, what unfortunately is too much.



How can I achieve that the TabControl takes a certain max amount of heigth but I can increase it using my GridSplitter?










share|improve this question














I have the following Grid where I want to introduce a GridSplitter to resize the content of the Expander if it's expanded:



<Grid Grid.Row="2" Margin="0,5,0,0" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<!-- Menu -->
</Grid>
<Grid Grid.Row="1">
<!-- Main-Content -->
</Grid>
<GridSplitter Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Stretch" Height="3"/>
<Expander Grid.Row="3" Margin="0,10,0,0" VerticalAlignment="Bottom" Header="Details">
<TabControl ItemsSource="Binding DetailsViewModels">
<TabControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="Binding DisplayHeader"/>
</DataTemplate>
</TabControl.ItemTemplate>
</TabControl>
</Expander>
</Grid>


My problem now is the size of the Expander-Content and the resize-behavior when I move the GridSplitter.



If I set the Height of the RowDefinition where the Expander is to *, then it takes way to much space if the expander is expanded.



If I set a MaxHeight at the TabControl then I can make the TabControl smaller if the Expander is expanded. But if the maxheight is reached only the GridSplitter continous moving.



If I don't set any size, the TabControl takes it full heigth, what unfortunately is too much.



How can I achieve that the TabControl takes a certain max amount of heigth but I can increase it using my GridSplitter?







c# wpf xaml grid gridsplitter






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 28 at 7:16









TomtomTomtom

6,7826 gold badges36 silver badges76 bronze badges




6,7826 gold badges36 silver badges76 bronze badges















  • Is it a way to bind the MaxHeight or MaxWidth of TabControl to the Height or Width of Expander with a some value converter,

    – Rekshino
    Mar 28 at 12:38

















  • Is it a way to bind the MaxHeight or MaxWidth of TabControl to the Height or Width of Expander with a some value converter,

    – Rekshino
    Mar 28 at 12:38
















Is it a way to bind the MaxHeight or MaxWidth of TabControl to the Height or Width of Expander with a some value converter,

– Rekshino
Mar 28 at 12:38





Is it a way to bind the MaxHeight or MaxWidth of TabControl to the Height or Width of Expander with a some value converter,

– Rekshino
Mar 28 at 12:38












1 Answer
1






active

oldest

votes


















0
















Maybe you can catch the event Expanded of the Expander from code behind and set the desired size of the grid yourself ?






share|improve this answer

























  • The problem is not the Expander at the moment of expanded. The problem is that I want to resize the content of the Expander by moving the GridSplitter

    – Tomtom
    Mar 28 at 12:26










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%2f55392023%2fresize-grid-with-gridsplitter%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









0
















Maybe you can catch the event Expanded of the Expander from code behind and set the desired size of the grid yourself ?






share|improve this answer

























  • The problem is not the Expander at the moment of expanded. The problem is that I want to resize the content of the Expander by moving the GridSplitter

    – Tomtom
    Mar 28 at 12:26















0
















Maybe you can catch the event Expanded of the Expander from code behind and set the desired size of the grid yourself ?






share|improve this answer

























  • The problem is not the Expander at the moment of expanded. The problem is that I want to resize the content of the Expander by moving the GridSplitter

    – Tomtom
    Mar 28 at 12:26













0














0










0









Maybe you can catch the event Expanded of the Expander from code behind and set the desired size of the grid yourself ?






share|improve this answer













Maybe you can catch the event Expanded of the Expander from code behind and set the desired size of the grid yourself ?







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 28 at 10:58









ilièsiliès

292 bronze badges




292 bronze badges















  • The problem is not the Expander at the moment of expanded. The problem is that I want to resize the content of the Expander by moving the GridSplitter

    – Tomtom
    Mar 28 at 12:26

















  • The problem is not the Expander at the moment of expanded. The problem is that I want to resize the content of the Expander by moving the GridSplitter

    – Tomtom
    Mar 28 at 12:26
















The problem is not the Expander at the moment of expanded. The problem is that I want to resize the content of the Expander by moving the GridSplitter

– Tomtom
Mar 28 at 12:26





The problem is not the Expander at the moment of expanded. The problem is that I want to resize the content of the Expander by moving the GridSplitter

– Tomtom
Mar 28 at 12:26








Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.




















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%2f55392023%2fresize-grid-with-gridsplitter%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

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript