Extending Xamarin Forms

XamerinFormsPart2

This is Keith’s second part to his earlier session on Introduction to XAML Forms.

Below are my in-session notes:

  • JetBrains dotPeek is a Windows app to help with XAML.  Extremely valuable according to Keith.
  • Demo was in Xamarin Studio (on Mac).  A little more stable than Visual Studio 2015 right now.
  • When starting new project, you have check boxes for target platforms (iOS & Android).
  • UITests projected created for you, by default.
  • Be sure to get latest packages because they’re updated frequently.
  • Creating a new XAML form creates a XAML file and a C# code behind file.
  • Inside XAML <ContentPage>, type in your new controls.
  • He created an Audio Recorder class to record some audio.
  • He’ll be targeting iPhone for this demo.
  • Data binding with BindableProperty type:
    • public static BindableProperty fileNMeProperty = BindableProperty.Create(“FileName”, typeof(string));
    • public string FileName{ get{ return (string)this.GetValue(FileNameProperty);} set{this.SetValue(FileNameProperty, value);}
  • MessagingCenter class lets you communicate between the layers (I presume he means between the code behind layer and the XAML layer).
  • C# code that’s native to the target platform is auto-generated (I think).
  • He built and deployed his demo to his iPhone and recorded his voice.  We didn’t hear the playback, but he swears it played back.  Don’t worry, we trust you Keith. 🙂
  • He created a “renderer” for a platform specific feature (>> on list items on iOS).  It will not fail on other platforms, it just won’t show it.