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;
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
add a comment |
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
Is it a way to bind theMaxHeight
orMaxWidth
ofTabControl
to theHeight
orWidth
ofExpander
with a some value converter,
– Rekshino
Mar 28 at 12:38
add a comment |
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
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
c# wpf xaml grid gridsplitter
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 theMaxHeight
orMaxWidth
ofTabControl
to theHeight
orWidth
ofExpander
with a some value converter,
– Rekshino
Mar 28 at 12:38
add a comment |
Is it a way to bind theMaxHeight
orMaxWidth
ofTabControl
to theHeight
orWidth
ofExpander
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
add a comment |
1 Answer
1
active
oldest
votes
Maybe you can catch the event Expanded of the Expander from code behind and set the desired size of the grid yourself ?
The problem is not theExpander
at the moment of expanded. The problem is that I want to resize the content of theExpander
by moving theGridSplitter
– Tomtom
Mar 28 at 12:26
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Maybe you can catch the event Expanded of the Expander from code behind and set the desired size of the grid yourself ?
The problem is not theExpander
at the moment of expanded. The problem is that I want to resize the content of theExpander
by moving theGridSplitter
– Tomtom
Mar 28 at 12:26
add a comment |
Maybe you can catch the event Expanded of the Expander from code behind and set the desired size of the grid yourself ?
The problem is not theExpander
at the moment of expanded. The problem is that I want to resize the content of theExpander
by moving theGridSplitter
– Tomtom
Mar 28 at 12:26
add a comment |
Maybe you can catch the event Expanded of the Expander from code behind and set the desired size of the grid yourself ?
Maybe you can catch the event Expanded of the Expander from code behind and set the desired size of the grid yourself ?
answered Mar 28 at 10:58
ilièsiliès
292 bronze badges
292 bronze badges
The problem is not theExpander
at the moment of expanded. The problem is that I want to resize the content of theExpander
by moving theGridSplitter
– Tomtom
Mar 28 at 12:26
add a comment |
The problem is not theExpander
at the moment of expanded. The problem is that I want to resize the content of theExpander
by moving theGridSplitter
– 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
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Is it a way to bind the
MaxHeight
orMaxWidth
ofTabControl
to theHeight
orWidth
ofExpander
with a some value converter,– Rekshino
Mar 28 at 12:38