Contents tagged with Xamarin.Forms

  • Sharing Resource Dictionaries in your Xamarin.Forms App

    The Xamarin.Forms Application base class has a Resources property that you can use to share a resource dictionary accross all pages of your app. If your app was created before Xamarin.Forms 1.4 you'll need to make sure you update and make your main App class inherit from the new Application class.

    If you like to do everything in code rather than XAML then you can create a ResourceDictionary in the constructor of you App class:

    public class App : Application

    {

    public App()

    {

    Resources = new ResourceDictionary();

    Resources.Add("ForegroundThemeColor", … more

  • Xamarin Forms at NDC London 2014

    If you're interested in finding out more about Xamarin Forms you may find the following interesting:

    Free eBook: Creating Mobile Apps with Xamarin.Forms by Charles Petzold (Preview edition)

    Video: Creating your first Xamarin.Forms App (Xamarin Evolve 2014)

    Video: Xamarin.Forms is Even Cooler Than You Think (Xamarin Evolve 2014)

    Video: XAML for Xamarin.Forms (Xamarin Evolve 2014)

    Video: Extending Xamarin.Forms with Custom Controls (Xamarin Evolve 2014)

    more

  • DDD North Agenda App

    The DDD North Agenda App using Xamarin.Forms. The same UI and backend code is shared accross all versions. The design is inspired by the Xamarin Evolve App. The app checks when it starts to see if it has the latest agenda, so it will always be ready for DDD.

    You can find the app here:

    Windows Phone DDD North Agenda App

    iOS DDD North Agenda App

    Android DDD Agenda App

    The source code for this app is available online on GitHub: Xamarin.Forms Agenda App Source Code. Suggestions, Forks and Pull Requests welcome.

    more

  • Carousel Page in Xamarin Forms XAML

    The CarouselPage page is similar to a tabbed page, but you swipe between pages and there are no navigation pages. Windows Phone users will be most used to this type of UI, so you may choose to only use it there, but it will work on all platforms. Here is the XAML:

    <?xml version="1.0" encoding="UTF-8"?>

    <CarouselPage

    xmlns="http://xamarin.com/schemas/2014/forms"

    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"

    xmlns:local="clr-namespace:NogginXamarinFormSample;assembly=NogginXamarinFormSample"

    x:Class="NogginXamarinFormSample.MyCarouselPage">

    <CarouselPage. … more

  • Tabbed Page in Xamarin Forms XAML

    The TabbedPage page is a bit like a navigation page in that it is a collection of other pages. However instead of a navigation bar you are shown a collection of tabs. Each tab has a title and may have an icon. Create a new content page using File > Add new, and then change the XAML to this (making sure your x:Class and xmlns:local are correct for your project) and also change the base class in the code behind to TabbedPage:

    <?xml version="1.0" encoding="UTF-8"?>

    <TabbedPage

    xmlns="http://xamarin.com/schemas/2014/forms"

    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" … more

  • Navigation Page in Xamarin Forms XAML

    A NavigationPage makes it very easy to create a browser like navigation stack of pages with a back button. It is a container for your pages so the XAML to for your ContentPage doesn't change, but when the app starts and you first create the page you put it inside a NavigationPage like this:

    public static Page GetMainPage()

    {

    return new NavigationPage(MyPage());

    }

    Now we have a navigation page, you'll need a new page to navigate too, so create a new page and then on your first page add a button like this:

    <Button Text="Press me" Clicked="OnClicked"/>

    You'll then need to add an … more

  • Content Page in Xamarin Forms XAML

    The simplest of the Xamarin Page controls is the ContentPage. There is a template for this in Xamarin Studio so you can use the Add > New File... option. Here is the XAML so you can see a ContentPage along with a placeholder BoxView control so there is some content to see.

    <!--?xml version="1.0" encoding="UTF-8"?-->

    <ContentPage

    xmlns="http://xamarin.com/schemas/2014/forms"

    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"

    x:class="NogginXamarinFormSample.MyPage"

    Title="A Content Page">

    <BoxView Color="Silver" />

    </ContentPage>

    To show this … more

  • 1