Adaptive Layout of Master/Detail View in Windows 10 UWP - c#

I looked around for several days now to find an example on how to create a master/detail view for a Windows 10 UWP app which targets a Windows tablet as well as a Windows phone. The current view already contains a SplitView, which displays the menu on the left hand side. I would like to show the master/detail in the detail view of that SplitView so that on the left hand side there is a ListView/ListBox with all selectable items and a detail view with the details of the currently selected item.
Is there a best practice? I'm using Caliburn Micro for my MVVM pattern.

Template 10 is a complete package but its done almost entirely with the built-ins that Jerry and Co. have come up with over the last few months putting it together. They do have an example of MVVMLight usage with T10. But I understand the draw of using CM.
CM is just now getting to the point where Master/Detail with UWP/ SplitView is possible with some of the bugs that came up during the release to 3.0.x sooner or later.
There are some gotchas just keep an eye on the examples. I will probably be posting a PR for a Master/Detail shortly but I have a project to complete first.
CM with Template 10, there is a huge amount of overlap that would need to be combed over before the would work nicely between each other. Would nice to see it; unfortunately it would be a massive undertaking to get the overlap gap closed.

Related

Xamarin Forms carousel with menu/tabs

I want do create something like TabbedPage but as a View with scrollable "menu" ( I will have about 8 tabs). How can I achive this? I was thinking about doing CarouselView and somehow to make a tabbed header, but I dont know how to make it good. Or maybe there is a plugin for TabbedView ( I spent few hours and I didn't find anything). Thanks in advance.
James Montemagno made a a brilliant blog on how to implement this a couple of years ago.
That sorts out the Carousel View. Now to write the tabbed header I wrote 1 of these a couple of years back. What you need to do is make a stacklayout with orientation horizontal, make the width bigger than the screen width and then every new page you visit you can translate the top bars x coordinates to the left or right. and change the image in the bar so that it looks highlighted.
Have a real play with this, see if you can make the transitions between pages smooth and the translation look sleek. I managed to do it so Im sure you will be fine.
I would provide code but unfortunately it was for a client and I cannot share his intellectual property.
Xamarin.Forms does not provide a TabView control but only a TabbedPage which seems to be no good in your case. There are commercial third party libraries that offer such a control out of the box (e.g. from SyncFusion). I looked quite a long time into this issue. Finally, I went for creating my own implementation which is based on a data bindable StackLayout with a horizontal line of buttons. Only the ContentView that is associated with the selected button is shown all other ones are hidden.
Check out this link on the old Xamarin forums here
I think this is exactly what you're looking for here. I had do a few things to get the sample to run like upgrade the version of Xamarin.Forms, then delete the nuget package for carousel view prerelease since its since rolled in with Xamarin.Forms.

UWP Timeline control

I am writing a UWP app which needs to show milestones against multiple, grouped tasks along a timeline of a video. Basically showing when a task occurred in the timeline. Image below of a crappy excel mock up of what I am talking about.
I have searched and can find some charting option but they are for WPF, javascript or .Net Framework.
Was thinking I could have a go at one myself using a grid as a base and I'm OK on this front for the moment, I am wanting to know if anyone knows of any suitable timeline controls for UWP or can think of another way to visualise this sort of data using available controls.
There are a number of options for UWP if you wanting to just xaml output a DataGrid the only free one I've seen is this
https://github.com/RSuter/MyToolkit
However if your willing to fork some cash there are lots of options. The obvious solution would be which is free for non-commercial use so you can give it a test.
http://www.telerik.com/universal-windows-platform-ui which has a great datagrid
the concept would be removing the first column and adding a new one at the end in a poll
The other option which I thought about mentioning before is https://www.syncfusion.com/ they have a graph library for UWP I have never used there product so I can't really say much about it except I believe they do have a timeline graph.
This is quite old now but I have just had the same issue. After a day of research I have discovered the SyncFusion CellGrid does this perfectly.
https://help.syncfusion.com/uwp/cellgrid/getting-started

How to make transition on DataContex change?

I have a simple wp7 app with 3 pages. I've made page transition to work (with built-in transitions from TransitionService (slide, rotate roll...) as shown in this simple tutorial. On one of my phone page, I bind few different ViewModels (only one is visible). Also, there I have a button which change DataContex (visible ViewModel). All of that work perfectly. What I want to do is to input somekind of transition on DataContex change (as I have on phone page navigation), so it would appear that the user is navigating on other page.
I appreciate any advice.
Christian Schormann demos creating page transitions in his Mix talk CL02. Download the video in high res format and play it locally will make it easy to follow.
Alternatively, you could make use of the Transition control packaged with the November Windows Phone Toolkit to do this work for you. Discussed in more detail here.
Transitions for Windows Phone 7 - Will's Blog
Depending on what you want to animate you could look at using a StoryBoard.

WPF How to design a multi-window Application?

im looking for some tips and hints how i can build up my Application in a good way.
So here are some informations: I have at the moment the Mainwindow designed with a grid which holds 4 frames. its looking like this.
At the top is a menu which let you select the different Pages. I have for the main area about 8 pages for e.g. a settings page and 4 content pages. The Sidebar displays some additional informations which can be choosen by the user and the bottom shows only a page when 1 of the content pages are opened.
So my content pages have ViewModels behind to fill them and im trying to use commands in the near future when im understand all features of them ;). So im trying to use the MVVM way, but im very new at this.
I don't really need a navigation menu like it is given from navigation windows.
So is it the best way for an application like that to use Frames or are there any better solutions?
Frames support the built-in navigation infrastructure of WPF so they're a good choice if you plan to use that. It does have some problems (at least some people think so, including me) but for simple/small applications it will do just fine. Of course they'll also work if you want to roll your own light-weight navigation system, like I usually do. I generally navigate by sending instances of ViewModels around and setting them as the contents of windows or content controls, and letting DataTemplates 'dress' them up as they are defined in the views. For larger projects I'd always recommend one of the awesome frameworks which include navigation systems like Prism or Magellan.
Basically it all depends on your requirements; there are a lot of ways to get it right. It's good that you're trying to use MVVM, try to stick with that and it will generally automatically guide you in a good direction.
I'd suggest using a docking library like AvalonDock to spice your application up a bit... however I have a bitter experience with it as it's not MVVM-friendly. I recently spent the better part of a week wrestling with it to make it usable enough in a MVVM scenario and I'm not sure it can ever be done. There may be other libraries that handle things better, but (full-featured, like in Visual Studio) docking is a complicated matter so maybe don't go there. Sorry, I probably felt the need to vent after the AvalonDock frustrations.

C# - Winforms - Animated Slideshow

Well i am developing an application whose interface requires an animated slide show
and by animated slide show i means UI components placed together change their positions after regular intervals in a sliding (animated) fashion. Let me illustrate my idea with the following image,
(source: deviantart.com)
in the image above there are three columns of UI components that i want to slide, what i could do is simply write a module to change x,y coordinates of the components that would give the animated slide effect but that does not work fine, because it is heave takes time in processing and all plus the coding will be complex and layer adjustment and all.
is there any slide show component on which instead of image i can place UI components
What are the other options i have or what is the right way to do it. Please need help.
Sounds like are looking for a carousel feature for you component. Winforms were not intended to be animated. Fortunately some companies have worked on products that support animaiton in this area but most are moving to the Silverlight and WPF platforms for those updated features. As a reader of MSDN Magazine I often come accross some interesting advertisements of Winform components that are quite interesting. Please take a look at this link. The cost of the product is quite high.
Telerik Sample Applications using Carousel feature in Win Forms
Also check out the following link to MSDN. It explains how you can reference the silverlight component as a COM object.
Using Silverlight in a Windows based application using COM
In this scenerio it could also be possible to embed a flash player with a flash animation, using one of the many (commercial and free) xml-based slideshows avaible for flash. This one for example http://www.flshow.net/.

Categories