Posts

Showing posts with the label ui

[Xamarin Forms]Page navigation summary

Image
[Xamarin Forms] Page navigation summary 1- The different navigation possibilities In this article will we list and sum up how we can navigate inside a Xamarin Forms application.  In Xamarin.Forms, you can navigate between pages using several methods, we will enumerate it and give a brief description / use case for each : Push/Pop Navigation : Using Navigation.PushAsync() and Navigation.PopAsync() for stack-based navigation. Modal Navigation : Using Navigation.PushModalAsync() and Navigation.PopModalAsync() for displaying pages modally. Master-Detail Navigation : Using MasterDetailPage to manage a master menu and a detail page. Tabbed Navigation : Using TabbedPage for navigation between different tabs. Carousel Navigation : Using CarouselPage to swipe through pages in a carousel-style interface. Shell Navigation : Using Xamarin.Forms Shell for a unified navigation paradigm with URL-based routing and flyout menus. Custom Navigation : Or if you want to customize and design a good

[Xamarin Forms] Complete guide to design a TOAST component

Image
  [Xamarin Forms] Complete guide to design a TOAST component In this guide, we will first show you how to design a toast component in Xamarin Forms (adding transition animations to the component), then in a second part, we list some existing controls that you can use directly... Custom Toast design in Xamarin Forms  Designing a "toast" component in Xamarin Forms involves creating a custom control to display brief messages to the user.  I will show you bellow a simple example on how to create a Toast component, and we will also how to add transition animation. Here are the steps to design and implement a toast component: Step 1: Create the Toast View First, you need to create a custom view that represents the toast message. You can add all the UI controls that you need to fit your needs (like an icon image...) 1.1 Create a ToastView class Create a new class ToastView that inherits from ContentView . public class ToastView : ContentView { public ToastView ( string m

[TIP] "Dispatcher.BeginInvoke()" in Xamarin.Forms

In traditional WP8 apps, when you want to update a visual element but you are not in the UI thread, you have to use the dispatcher like this: Deployment.Current.Dispatcher.BeginInvoke( /* my custom task */); In Xamarin.Forms, you have to use the Device 's object static method: Device.BeginInvokeOnMainThread(() => { // your code on UI thread here... });