Xamarin Forms animation limitation? - xamarin

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/

Related

Xamarin forms community tabview easing when swiping

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

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.

Applying animation in xamarin.forms

Is there any way I can implement the animation like
https://codemyui.com/circular-water-fill-loading-animation/ in Xamarin.forms?
Is there any way I can implement the animation like ...
The short answer is; Yes.
The longer answer; It depends upon what you really need, only you can answer that.
A "quick way" (at least for me) is to use the Xamarin.Forms' WebView and embed the html/svg/css/JScript into native application projects and setup a javascript interface to control the percentage completion (the water.style.transform element).
https://developer.xamarin.com/samples/xamarin-forms/WorkingWithWebview/
You could, of course, re-implement it using something like SkiaSharp, Lottie, etc and create a cross-platform Forms' control, or implement it as a "native" control on each platform.
Note: I'm a big fan of Lottie and would personally take that approach, but they do not support native UWP. Currently supported is iOS, Android, Web.
I edited the colors, etc. on that PEN sample you linked to and added the html/js/css to a Forms' solution, setup a JS interface and the results work in a Forms' WebView (iOS' UIWebView and Android's WebView, did not test UWP Edge, but it should work fine):
The Lottie is my preferred, but you can use a animation with the Nuget XamAnimation. It most hard to create but it's so good too.

Xamarin Forms Customized Camera for iOS and Android

I'm pretty new to Xamarin Forms and C# in general, and need som hints on the best way to create an app for iOS and Android. I want to use the Camera to take pictures / videos and later on send them with email or something else, since I want customized controls on the camera, I'm guessing the stock camera won't be an option? Which gets us to Renderers, which is the best approach to this? Preferably in a MVVM way. I just want the camera and a few customized buttons on it.
Do I make on renderer for the different buttons objects and one for the camera, the buttons I'll do as extensions of the Button class, but what about the camera?
/Oliver
You have two options:
Create a page renderer and put your camera/buttons native in each platform.
Create a view renderer for the camera and add your view in any page of Forms, so you can put your buttons or anything you like in forms.

layer control in iWatch using Xamarin

Is there any way to layer a control on top of another. I wanted to put one label on top of another to build out a word. I am using Xamarin Studio and programming for the iWatch, watchOS2.
Unlike UIKit, there is no z-index, or hierarchy, in WatchKit for views. As far as I know, the closest you can get to this is to use a WKInterfaceGroup with a custom background. The hard way, which may get you the result you are looking for, is to render an image and display it.

Resources