UWP arrange Bottom items in vertically(splitview)












0















I am working in UWP, I have a split view for navigation view.
I want to arrange bottom items to vertically when I closing the pane.



This is the UI I have before closing the pane



Split view



I want to arrange items like this



sample ui










share|improve this question

























  • What did you try so far?

    – TheTanic
    Nov 23 '18 at 11:25











  • Post the XAML you currently have

    – Martin Zikmund
    Nov 23 '18 at 11:52
















0















I am working in UWP, I have a split view for navigation view.
I want to arrange bottom items to vertically when I closing the pane.



This is the UI I have before closing the pane



Split view



I want to arrange items like this



sample ui










share|improve this question

























  • What did you try so far?

    – TheTanic
    Nov 23 '18 at 11:25











  • Post the XAML you currently have

    – Martin Zikmund
    Nov 23 '18 at 11:52














0












0








0








I am working in UWP, I have a split view for navigation view.
I want to arrange bottom items to vertically when I closing the pane.



This is the UI I have before closing the pane



Split view



I want to arrange items like this



sample ui










share|improve this question
















I am working in UWP, I have a split view for navigation view.
I want to arrange bottom items to vertically when I closing the pane.



This is the UI I have before closing the pane



Split view



I want to arrange items like this



sample ui







uwp uinavigationbar






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 23 '18 at 13:40









Martin Zikmund

23.8k63460




23.8k63460










asked Nov 23 '18 at 10:54









MathanKumarMathanKumar

157




157













  • What did you try so far?

    – TheTanic
    Nov 23 '18 at 11:25











  • Post the XAML you currently have

    – Martin Zikmund
    Nov 23 '18 at 11:52



















  • What did you try so far?

    – TheTanic
    Nov 23 '18 at 11:25











  • Post the XAML you currently have

    – Martin Zikmund
    Nov 23 '18 at 11:52

















What did you try so far?

– TheTanic
Nov 23 '18 at 11:25





What did you try so far?

– TheTanic
Nov 23 '18 at 11:25













Post the XAML you currently have

– Martin Zikmund
Nov 23 '18 at 11:52





Post the XAML you currently have

– Martin Zikmund
Nov 23 '18 at 11:52












1 Answer
1






active

oldest

votes


















1














I would implement it using a Grid with the following layout:



<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" x:Name="SecondColumn" />
<ColumnDefinition Width="Auto" x:Name="ThirdColumn" />
</Grid.ColumnDefinitions>
...
</Grid>


Now using the PaneClosing and PaneOpening events to just change the Grid.Column and Grid.Row values of the buttons appropriately.



So when pane is open, I would set:





  • Grid.Row to 0 for all three buttons


  • Grid.Column to 0, 1, 2 respectively


  • SecondColumn.Width and ThirdColumn.Width to new GridLength(1, GridUnitType.Star)


And when closed:





  • Grid.Row to 0, 1, 2 respectively


  • Grid.Column to 0 for all three buttons


  • SecondColumn.Width and ThirdColumn.Width to new GridLength(0)


Alternative solution would be to use a StackPanel and just switch its Orientation between Horizontal and Vertical, although that would not put the buttons right next to each other - to add the spaces, you would have to modify the Margin of the buttons too.






share|improve this answer


























  • you have any sample for this

    – MathanKumar
    Nov 23 '18 at 13:29











  • Well, the answer is basically the sample :-D . There is everything you need to do in the code. What are you missing? Could you also please post the current XAML code you have?

    – Martin Zikmund
    Nov 23 '18 at 13:32











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/3.0/"u003ecc by-sa 3.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%2f53445330%2fuwp-arrange-bottom-items-in-verticallysplitview%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














I would implement it using a Grid with the following layout:



<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" x:Name="SecondColumn" />
<ColumnDefinition Width="Auto" x:Name="ThirdColumn" />
</Grid.ColumnDefinitions>
...
</Grid>


Now using the PaneClosing and PaneOpening events to just change the Grid.Column and Grid.Row values of the buttons appropriately.



So when pane is open, I would set:





  • Grid.Row to 0 for all three buttons


  • Grid.Column to 0, 1, 2 respectively


  • SecondColumn.Width and ThirdColumn.Width to new GridLength(1, GridUnitType.Star)


And when closed:





  • Grid.Row to 0, 1, 2 respectively


  • Grid.Column to 0 for all three buttons


  • SecondColumn.Width and ThirdColumn.Width to new GridLength(0)


Alternative solution would be to use a StackPanel and just switch its Orientation between Horizontal and Vertical, although that would not put the buttons right next to each other - to add the spaces, you would have to modify the Margin of the buttons too.






share|improve this answer


























  • you have any sample for this

    – MathanKumar
    Nov 23 '18 at 13:29











  • Well, the answer is basically the sample :-D . There is everything you need to do in the code. What are you missing? Could you also please post the current XAML code you have?

    – Martin Zikmund
    Nov 23 '18 at 13:32
















1














I would implement it using a Grid with the following layout:



<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" x:Name="SecondColumn" />
<ColumnDefinition Width="Auto" x:Name="ThirdColumn" />
</Grid.ColumnDefinitions>
...
</Grid>


Now using the PaneClosing and PaneOpening events to just change the Grid.Column and Grid.Row values of the buttons appropriately.



So when pane is open, I would set:





  • Grid.Row to 0 for all three buttons


  • Grid.Column to 0, 1, 2 respectively


  • SecondColumn.Width and ThirdColumn.Width to new GridLength(1, GridUnitType.Star)


And when closed:





  • Grid.Row to 0, 1, 2 respectively


  • Grid.Column to 0 for all three buttons


  • SecondColumn.Width and ThirdColumn.Width to new GridLength(0)


Alternative solution would be to use a StackPanel and just switch its Orientation between Horizontal and Vertical, although that would not put the buttons right next to each other - to add the spaces, you would have to modify the Margin of the buttons too.






share|improve this answer


























  • you have any sample for this

    – MathanKumar
    Nov 23 '18 at 13:29











  • Well, the answer is basically the sample :-D . There is everything you need to do in the code. What are you missing? Could you also please post the current XAML code you have?

    – Martin Zikmund
    Nov 23 '18 at 13:32














1












1








1







I would implement it using a Grid with the following layout:



<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" x:Name="SecondColumn" />
<ColumnDefinition Width="Auto" x:Name="ThirdColumn" />
</Grid.ColumnDefinitions>
...
</Grid>


Now using the PaneClosing and PaneOpening events to just change the Grid.Column and Grid.Row values of the buttons appropriately.



So when pane is open, I would set:





  • Grid.Row to 0 for all three buttons


  • Grid.Column to 0, 1, 2 respectively


  • SecondColumn.Width and ThirdColumn.Width to new GridLength(1, GridUnitType.Star)


And when closed:





  • Grid.Row to 0, 1, 2 respectively


  • Grid.Column to 0 for all three buttons


  • SecondColumn.Width and ThirdColumn.Width to new GridLength(0)


Alternative solution would be to use a StackPanel and just switch its Orientation between Horizontal and Vertical, although that would not put the buttons right next to each other - to add the spaces, you would have to modify the Margin of the buttons too.






share|improve this answer















I would implement it using a Grid with the following layout:



<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" x:Name="SecondColumn" />
<ColumnDefinition Width="Auto" x:Name="ThirdColumn" />
</Grid.ColumnDefinitions>
...
</Grid>


Now using the PaneClosing and PaneOpening events to just change the Grid.Column and Grid.Row values of the buttons appropriately.



So when pane is open, I would set:





  • Grid.Row to 0 for all three buttons


  • Grid.Column to 0, 1, 2 respectively


  • SecondColumn.Width and ThirdColumn.Width to new GridLength(1, GridUnitType.Star)


And when closed:





  • Grid.Row to 0, 1, 2 respectively


  • Grid.Column to 0 for all three buttons


  • SecondColumn.Width and ThirdColumn.Width to new GridLength(0)


Alternative solution would be to use a StackPanel and just switch its Orientation between Horizontal and Vertical, although that would not put the buttons right next to each other - to add the spaces, you would have to modify the Margin of the buttons too.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 23 '18 at 13:25

























answered Nov 23 '18 at 11:56









Martin ZikmundMartin Zikmund

23.8k63460




23.8k63460













  • you have any sample for this

    – MathanKumar
    Nov 23 '18 at 13:29











  • Well, the answer is basically the sample :-D . There is everything you need to do in the code. What are you missing? Could you also please post the current XAML code you have?

    – Martin Zikmund
    Nov 23 '18 at 13:32



















  • you have any sample for this

    – MathanKumar
    Nov 23 '18 at 13:29











  • Well, the answer is basically the sample :-D . There is everything you need to do in the code. What are you missing? Could you also please post the current XAML code you have?

    – Martin Zikmund
    Nov 23 '18 at 13:32

















you have any sample for this

– MathanKumar
Nov 23 '18 at 13:29





you have any sample for this

– MathanKumar
Nov 23 '18 at 13:29













Well, the answer is basically the sample :-D . There is everything you need to do in the code. What are you missing? Could you also please post the current XAML code you have?

– Martin Zikmund
Nov 23 '18 at 13:32





Well, the answer is basically the sample :-D . There is everything you need to do in the code. What are you missing? Could you also please post the current XAML code you have?

– Martin Zikmund
Nov 23 '18 at 13:32


















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%2f53445330%2fuwp-arrange-bottom-items-in-verticallysplitview%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

Berounka

Fiat S.p.A.

Type 'String' is not a subtype of type 'int' of 'index'