I checked almost every demo application from the website, but nobody use tabview, only Gridlayout or docklayout for "tabbing" purposes. What is the benefit of the Gridlayout instead of tabview? Apart from the customize the background.
My point is to have a native tab look and feel on every page.
If I have page 1, page 2, page 3, all the page components should have the same tabview/GridLayout part, or I can move out the tabview section to an individual global component?
Apologize for the basic question.
Thanks!
If you are looking for pure native look and feel, you would go with a TabView. Another advantage with TabView is lazy loading, it loads the page only when required.
You may go with GridLayout when you want to keep the TabView look similar on both iOS and Android. iOS by default uses Tabs at bottom and Androids places them at top. iOS would give you a More tab when the number of tab exceeds the available space, on Android it will be scrollable. These are by native, so if you want a customised common look and feel, then you could use GridLayout. Or still you could use the TabView and replace the TabBar with your own custom view, which is a bit complicated.
If you want the tabs on every page, then you should probably have a Frame inside each tab and load your pages there. So the TabBar remains same on every page. The same could be achieved with GridLayout, it's all about choices. I personally like sticking with the native look and feel of platform.
Related
I'm using Shell in my Xamarin Forms app together with a bottom tabbar and no flyout menu.
Is it somehow possible to have a static view/control between the content page and the bottom tabbar?
(As an example, look at Spotifys mini-player that's constantly shown above the bottom tabbar)
I have tried to use a ControlTemplate in the ContentPage, but it works so-so.
When navigating between pages, the entire view is "slided away", thus it's noticeable that the control is not static and instead instantiated per each page.
Deactivating animations partially solves it but makes the application feel very static and is thus not an acceptable solution.
Anyone got an idea of how this can be solved?
It's quite easy to solve it with Xamarin.Android and Xamarin.Ios, but this needs to be done in Xamarin Forms.
Thanks in advance.
I am implementing Prism in a new Xamarin Forms App. I have been using Rg.Plugins.Popup in the app before converting to Prism.
What are the limitation on the Prism Dialogs vs Prism.Plugin.Popups?
What are some examples when you would use one over the other?
Thank you!
Rg.Plugins.Popup is a popular plugin for Xamarin.Forms which accesses the native functionality to provide a "Modal Popup" which traditionally has not been achievable with Xamarin.Forms.
Dialogs in Prism 7.2
If you're using Prism 7.2 you'll find that the DialogService locates the currently displayed page and then "reparent's the content". Or in other words it takes the content of the active Content Page and places it as the root child of an AbsoluteLayout, placing a mask layer and finally your dialog on top. As a result of this approach you'll notice that any navigation bars for instance on the NavigationPage or TabbedPage, or a MasterDetailPage's menu will remain accessible to the user.
While in some regard both the PopupPage and Dialog may look very similar as you can probably tell there is some significant divergence there.
Dialogs in Prism 8
If you're using Prism 8.0 you'll see that we have updated to the latest Xamarin.Forms and as a result we are able to take advantage of a new feature in Xamarin.Forms which allows you to present a Modal Page with a Transparent background. This in effect allows you to replicate the effect of a PopupPage with either some benefits or drawbacks depending on how you look at it.
With Rg.Plugins.Popups you have the ability to push a PopupPage on top of whatever page is currently displayed from anywhere in the app
With Xamarin.Forms page's that have been pushed Modally they are part of your active Navigation Stack
Using the a traditional page with a transparent background and Modal Navigation you in effect have replicated the appearance of what you get with a PopupPage
Limitations
Prism.Plugin.Popups has the benefit of being integrated into the Navigation Service. As such you can inject the Navigation Service into the ViewModel of a PopupPage, and the PopupPage will be dismissed when you navigate away from it to another non PopupPage.
Dialogs are not part of the Navigation Stack tracked by Prism's Navigation Service. Navigation in Xamarin.Forms is dependent on navigating FROM a specific page. Since Prism's NavigationService doesn't know about the Dialog you will need to dismiss the dialog before navigating.
Other Key Differences
Besides what I've mentioned so far the only real difference is that Rg.Plugins.Popup gives you some added animations which honestly I've seen very few people using.
In Xamarin.Forms I have created a custom Navigation bar using a StackLayout and Labels for one of my pages. The other pages however are using the default navigation bar. I've tried to make the titles of the custom and default navigation bars look exactly the same but can't quite get it to match.
Is there a way to find out the font size and family of the default navigation bar in Xamarin.Forms?
Yes, there is! Xamarin.Forms is fully open-source, so you can inspect anything the code is doing on GitHub. The magic most likely happens inside the NavigationPage renderers, so check out Xamarin.Forms.Platform.[Target Platform]/Renderers/NavigationPageRenderer.cs.
But in your case this might be overkill, and you might be able to get the information you are interested in using the Xamarin Inspector while your app is running in debug mode.
I have question - what is rightn and correct way to implement this design in Xamarin (Xamarin forms)
Design principle
I see here 2 ways for implementations:
First way - is TabbedPage. And right Custom Render (For IOS - move tabs to top, and for android - Icons)
Second way - is CarouselView - but not sure is good.
Additional requirements is - Animation switch between content of "tabs"
Switch by finger slide is NICE TO HAVE option.
There is no right and wrong way. There is only what meets your requirements and what is easiest to implement and maintain.
Your linked picture clearly shows a TabbedPage. However your additional requirements would make this an issue. iOS shows the tabs at the bottom. I'm not sure if it is easy to move them to the top. It would require a custom renderer if it is even possible. I think iOS allows you to swipe between tabbed pages but I'm not sure that Android does.
It would probably be easier to implement a CarouselView with buttons above. That way you will be able to place your buttons where you like, allow you to swipe between them and have animation. This meets all your requirements.
I want to make an application which shows you the schedule for your school.
It should mainly display the current day and allow you to scroll left and right for switching to the day before or the day after the current selected day.
There should also be a settings view.
I'm new to making iOS apps, so which Xcode template should I use?
I think Page-Based Application seems to fit the most, however is this right?
I don't want the page curl transition, just a normal scrolling transition.
I typically start with a Tabbed Application or Master Detail view, but normally just a Tabbed Application and put in a tableview wrapped in a navigation controller. The tabs allow me to structure out different sections of the app and using table views gives you the nice slide in of new views.
Hope that makes sense.