Xamarin forms community tabview easing when swiping - xamarin

I'm using the TabView from Community Toolkit of Xamarin Forms:
https://learn.microsoft.com/en-us/xamarin/community-toolkit/views/tabview
Works just fine, but i'm not too fond of the transition when swiping.
Is there anyway to change the transition from the current easing to another linear easing? Or preferable the same smooth linear transition it uses when tabbing the tabs?

According to Xamarin.CommunityToolkit API, we can't set the way of swiping. Although, you can try TabbedPage instead. For more information, you can refer to
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/navigation/tabbed-page

Related

Difference between Prism Dialogs vs Popup

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.

Carousel Page not appearing in Xamarin.Forms template

I am trying to add new Carousel Page in my Xamarin.Forms application but on doing Add new item it's not appearing in the template list.
I am using Visual Studio 15.9 Preview.
Carousel Page not appearing in Xamarin.Forms template
With the release of Xamarin.Forms 2.2.0, we now have the CarouselView, a replacement for the CarouselPage. CarouselPage will be marked as deprecated in a future release. That's why the CarouselPage template been removed. You could find it in the Xamarin.Forms release notes.
Also, you could see the talk Jason Smith gave at Evolve where he specifically says that you should not use CarouselPage and you use use CarouselView instead: https://youtu.be/RZvdql3Ev0E
CarouselView
CarouselView is intended to fully replace CarouselPage. CarouselPage
will be deprecated in a future release. CarouselView is superior in
many ways, including its ability to be virtualized and nested within
layouts.
As SushiHangover has pointed out:
Xamarin.Forms CarouselPage does not support UI virtualization (recycling).
Initialization performance and memory usage can be a problem depending upon the number of pages/children.
Benefits of CarouselView:
Can now be embedded in a page (big bonus)
Is virtualized
Suggestion 1:
If you want use CarouselPage in your project, you need write it on you own:
Xamarin.Forms Carousel Page
CarouselPage sample
Suggestion 2:
Using CarouselView instead:
Flip through items with Xamarin.Forms CarouselView
https://xamarinhelp.com/carousel-view-xamarin-forms/
You have to write it out yourself. Xamarin Forms can do many things and has made cross-platform development much easier, but you still have to do some of the work yourself!
More info on CarouselPage.

How to create same UI as given UX in xamarin forms?

I am working in xamarin forms. I have some UX given by the designer. Now I want to create exactly same UI(same height of control, width of control, colors etc) in xamarin forms. My xaml view should be exactly xame like given UX.
Is there any tool that can guide me to create same UI like UX. I mean through that tool I can get the height, widths and colors of controls of screens and then can use it.
it's not good idea to use exact length of UI since the app will run on different screen and different devices. Xamarin forms uses native views for each platform which will also change the look of basic views.
What you need to do is to use grids or other layouts for sizing and control the height and the width of your views.
I also suggested that you always use scroll view incase if a mobile has a small screen size.
Finally, regarding the actual UI components and UX interactions, there are many ready components like calendars, custom checkboxes, sliders,... . If you can't find a component that cover what you need, you have 2 options:
combine different components and try to customize them with absolute
and Relative layouts.
Create the components yourself which will require some knowledge
on each platform to create the view component by drawing it and do
all the handling for each platform.
Regarding the UX, there are many libraries for animations and most components allow customizability.
Your question was very general so this answer is general. Please try to be more specific next time.

Carousel view or Custom Render Tabs?

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.

Xamarin Forms animation limitation?

In Xamarin Forms if you want to create animations quickly you can call any of the animation extension methods such as TranslateTo(x, y), etc according to:
https://developer.xamarin.com/guides/xamarin-forms/user-interface/animation/simple/
But they don't seem to cover everything. For example on the above link, I don't see:
A method to animate the background color?
A parameter to specify the easing factor?
What are the other animation limitations in Xamarin Forms API, compared to the full iOS and Android animation capabilities?
The "simple" ones are just the easy extension methods to do basic things. If you want the full control you need to use the animation class. There is even a background colour example a few pages below yours:
https://developer.xamarin.com/guides/xamarin-forms/user-interface/animation/custom/

Resources