I have developed a Windows 10 app and I have List View with ListViewItems, when user clicks on the item, I am navigating it to new page in which details are shown for that ListViewItems. Now, my app needs to be used for desktop app also, so how can I combine these two views into one similar as Split View (left side item List and right side its data). Example Skype Preview app, in that when device is in landscape mode, then it shows, left side contacts list and right side chat details. I want to achieve same in my app. Is there any easy way to achieve this requirement or I need to create new UI for this?
Asked
Active
Viewed 285 times
1 Answers
1
You can refer to the official Master/detail sample. When on PC, it uses ContentPresenter and bind its content to the selected item of ListView
. And when on Mobile, it uses navigation to navigate to the detail page and together pass the selected item as parameter to the detail page.
Is there any easy way to achieve this requirement or I need to create new UI for this?
I think it is needed to modify your layout, and you can use VisualStateManager to make your layout adjust to the window's size.

Grace Feng
- 16,564
- 2
- 22
- 45
-
Thanks.But in MasterDetail example they have used ViewModel, Can we achieve this without using ViewModel? – Kinjan Bhavsar Aug 17 '16 at 04:27
-
@KinjanBhavsar, yes it is definitely possible. – Grace Feng Aug 17 '16 at 05:09
-
Can you share some example link for it? – Kinjan Bhavsar Aug 17 '16 at 05:14
-
@KinjanBhavsar Although it used ViewModel, but it doesn't completely followed the MVVM pattern. If you don't want to use ViewModel, just move the code to the code behind. The content of `ContentPresenter` is bound to the selected ListViewItem, if you correctly bind the data to `ContentPresenter`, you don't need to change your code behind since you've completed the navigation to detail page. – Grace Feng Aug 17 '16 at 05:33
-
Thanks for the help. But how to put different commandBar in both views? – Kinjan Bhavsar Aug 19 '16 at 11:56