Skip to content

Getting Started

Håvard Moås edited this page Apr 1, 2020 · 26 revisions

Installation

By using DotNet:

dotnet add package DIPS.Xamarin.UI

or NuGet

Install-Package DIPS.Xamarin.UI

API and UI Components Usage

Initializing

To use our UI components, you need to initialize the library to make sure the library is not removed by the linker.

iOS

In the AppDelegate.FinishedLaunching(), add: DIPS.Xamarin.UI.iOS.Library.Initialize();

Android

In the MainActivity.OnCreate(), add: DIPS.Xamarin.UI.Android.Library.Initialize();

Custom Namespaces

👉 We recommend using custom namespacing to refer our UI components in XAML. This usage section will show you have to use our custom namespace. If you prefer to refer each component through its namespace, then you are free to do that.

  1. In your App.xaml.cs add DIPS.Xamarin.UI.Library.Initialize() in the constructor.
  1. In the desired XAML component add the namespace with a prefix in your namespaces section:
    xmlns:dxui="http://dips.xamarin.ui.com"
  1. You can now refer the library by doing this in your XAML:
<dxui:"component">

Preview Features

Features that are in preview or are experimental can be enabled by either setting the relevant property to true or calling the EnableFeature(string previewFeature) in the DIPS.Xamarin.UI.Library.PreviewFeatures namespace.

Example:

// Do this:
  Library.PreviewFeatures.MenuButtonBadgeAnimation = true;

// OR this:
  Library.PreviewFeatures.EnableFeature("MenuButtonBadgeAnimation");

Pass the String Identifier value to EnableFeature().

Available preview features

Feature Description Property String Identifier
MenuButtonBadgeAnimation Adds two animations to the MenuButton badge: When the IsBadgeVisible property changes to true and when the BadgeCount property changes. MenuButtonBadgeAnimation "MenuButtonBadgeAnimation"
Clone this wiki locally