We’ve got a new drop of Xamarin.Forms available.

Read more about it on the Xamarin Forums. Please pay very close attention to the section:

Renderer Porting Guide


Release Notes

 

**WARNING:** Breaking change to the renderer API in this release.

Major Changes:

  • Renderer API's have been updated to be made more consistent (details below).
  • ModifierType has been removed (unused data type).

 

Release Features:

  • TableView.Root is marked as content and can now be set implicitly with XAML
  • Android MasterDetailPage now uses true DrawerLayout.
  • XAML now supports OnIdiom for conditional phone/tablet layouts.
  • TapGestureRecognizers now support Commanding and can be used from XAML.
  • Binding now additionally has an empty constructor to allow more usage from XAML.
  • ListView.GroupDisplayBinding and GroupShortNameBinding can now accept a regular string in
  • XAML: `<ListView GroupDisplayBinding="My.Path" />`

Bug Fixes:

  • Entry keyboard updates property on iOS now.
  • NullReferenceException on iOS 6.1 fixed.
  • The Expression-based SetBinding overload's stringFormat parameter now works as expected.
  • SearchBar no longer requires API 16 on Android.
  • Android toolbar now works correctly for ToolbarItems on navigation pages.
  • EntryCell.IsEnabled now works.
  • UriImageSource.Uri no longer throws exceptions when null.
  • Android should no longer use the incorrect context after context recreation events.

Renderer API Changes:

  • Model renamed to Element (and all references updated).
  • Most renderers now subclass from ViewRenderer on all platforms.
  • OnElementPropertyChanged replaces OnModelPropertyChanged.
  • OnElementChanged replaces OnModelSet/OnModelChanged.
  • Windows Phone renderers are now public.
  • Most renderers now subclass generic super-class (no casting needed).
  • Other minor changes (see porting guide on forums).

My Experiences

As mentioned, this package contains breaking changes.  Here is the error list after building my DrawIt sample app post-update:

image

I got the iOS renderer changed out pretty quick (< 10 minutes), but the Android renderer is causing me issues. Still waiting to hear back from the Forums on this one.


A Note about NuGet Packages

 

When you first create a Xamarin.Forms project, you may not actually have the NuGet packages installed, which you can do using this command:

Get-Project -All | Install-Package Xamarin.Forms

This will install the Xamarin.Forms package in all of the projects.

The default NuGet Console only works with a single project at a time.  I made the mistake of not recognizing that I was only installed the packages or the update on a single project.

Once NuGet packages are installed in a solution, you have a new option called Manage NuGet Packages for Solution, which will install packages for all or selected projects within the solution.

So Xamarin released an update (v3) last week and it is truly a huge step forward for mobile developers.  So if you are interested in cross-platform development and haven’t reviewed what Xamarin has done, then you need to stop what you’re doing and go look.

Xamarin is having a contest to showcase their new Xamarin.Forms functionality added to Xamarin 3.  I spent the good part of last weekend reviewing everything that I could find regarding Xamarin.Forms and was in my chair coding by 7:00am Monday morning.

This is the story of what I created.

 

Introducing DrawIt

Imagine a cross-platform drawing tool.  Yeah, I know, they probably exist but I didn’t let that get in my way.  This is a very simple drawing application that allows you to draw with your finger, using a pen color of your choice.

Here is the iOS/iPad version:

XamarinRocks

The Android version:

image

The Windows Phone version:

SNAGHTML35b07ae

Unfortunately, I was not able to get actual drawing mechanism working on WinPhone, so all we have at this point is the UI.

 

How it Works

I create a Xamarin.Forms shared-code project which created the following Visual Studio solution:

image

DrawIt is the shared-code project while the others exist to provide a platform-specific layer that the shared-code will reside upon.

Within the shared-code project, I started off with a custom class that inherited from Image that would allow me to specify a line color.

 

ImageWithTouch Class

public class ImageWithTouch : Image 
    {
        public static readonly BindableProperty CurrentLineColorProperty = 
            BindableProperty.Create ((ImageWithTouch w) => w.CurrentLineColor, Color.Default);

        public Color CurrentLineColor {
            get {
                return (Color)GetValue (CurrentLineColorProperty);
            }
            set {
                SetValue (CurrentLineColorProperty, value);
            }
        }
    }

 

Creating the User Interface

The best part of Xamarin.Forms is that I have a single codebase for the user interface, that looks something like this:

public MainPage()
{
    Content = BuildGrid();

    // Accomodate iPhone status bar.
    Padding = new Thickness(10, Device.OnPlatform(20, 0, 0), 10, 10);
}

private Grid BuildGrid()
{
    return new Grid
    {
        VerticalOptions = LayoutOptions.FillAndExpand,
        HorizontalOptions = LayoutOptions.FillAndExpand,
        RowDefinitions = {
            new RowDefinition {
                Height = GridLength.Auto
            },
            new RowDefinition {
                Height = new GridLength (1, GridUnitType.Star)
            },
        },
        ColumnDefinitions = {
            new ColumnDefinition {
                Width = new GridLength (100, GridUnitType.Absolute)
            },
            new ColumnDefinition {
                Width = new GridLength (1, GridUnitType.Star)
            },
        },
        Children =
        {
            {new Label {
                Text = "Draw It",
                Font = Font.BoldSystemFontOfSize (50),
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                VerticalOptions = LayoutOptions.FillAndExpand
                }, 0, 2, 0, 1},
            {BuildPalletFrame(), 0, 1},
            {new ContentView {
                Content = BuildDrawingFrame(),
                Padding = new Thickness(10, 0, 0, 0),
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.FillAndExpand
            }, 1, 1}
        }
    };
}

The UI elements exist within a fixed-size grid that is fitted to the screen for whatever device the application is running on.

All of the code you have seen so far is cross-device compatible and exists within a Shared project used by the device-specific projects

 

Custom Renderers

In order to provide the low-level drawing capabilities, I had to create what is called a custom-renderer for each of the device platforms. This is what actually creates the drawing surface for each device.  Here is the renderer for iOS:

[assembly: ExportRenderer(typeof(ImageWithTouch), typeof(ImageWithTouchRenderer))]
namespace DrawIt.iOS
{
    public class ImageWithTouchRenderer : ImageRenderer
    {
        protected override void OnModelSet(VisualElement model)
        {
            base.OnModelSet(model);

            SetNativeControl(new DrawView(Control.Frame));
        }

        protected override void OnHandlePropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            base.OnHandlePropertyChanged(sender, e);

            if (e.PropertyName == ImageWithTouch.CurrentLineColorProperty.PropertyName)
            {
                ((DrawView)Control).CurrentLineColor = ((ImageWithTouch)Model).CurrentLineColor.ToUIColor();
            }
        }
    }
}

The other two projects have similar renderers. The code that actually does the work is in a class called DrawView, which merely creates an ImageView that can be drawn upon using the native drawing mechanisms for the device.

 

Wrapping It Up

This was a fun little project and I barely touched the surface of what Xamarin.Forms can do.  I am still rather shocked at the small amount of code that I had to write to get a standard user interface across all three platforms.

Drop me a line and let me know what you think.

 

Source

You can view my source on GitHub here:

https://github.com/MitchMilam/Drawit/tree/master

,

I had a few minutes this morning before one of my classes and thought I’d start working with the new Xamarin 3, which looks freaking awesome, by the way.

I opened visual Studio 2013 and created a new Xamarin.Forms application.  Before I make any changes, I decided to verify that it would indeed compile with out issues (I’ve had problems like this before).

This is what I got:

Could not find android.jar for API Level 19. This means the Android SDK platform for API Level 19 is not installed. Either install it in the Android SDK Manager (Tools > Open Android SDK Manager…), or change your Xamarin.Android project to target an API version that is installed. (C:\Users\Mitch\AppData\Local\Android\android-sdk\platforms\android-19\android.jar missing.)

Very clear as to what the issue is, but the instructions to fix the problem are not exactly correct.  I found this page on the Xamarin developer site:

http://developer.xamarin.com/recipes/cross-platform/ide/launch_sdk_manager/

Which mostly pointed me to where I needed to be. 

Here are the revised instructions for correcting this issue with Xamarin 3.0 and Visual Studio 2013:

1. Select Tools, Open Android Emulator Manager.

image

2. Click on the Tools menu.

image

3. Click on Manage SDK…

image

It will investigate your current environment then recommend a list of packages to update.

4. Select the packages you wish to install then click the Install X packages button. (X is the number of updates).

image

5. Accept the License then click the Install button.

image

The update process will take several minutes to complete, depending on the number of updates.

6. After the update has completed (mine took more than an hour, with 14 updates), close the SDK Manager and return to Visual Studio.

7. Rebuild your project and you should be good to go.

You can find it here:  http://www.microsoft.com/en-us/download/details.aspx?id=43110

We have also posted the admin and developer guides for Unified Service Desk as well as a set of Visual Studio Templates to support advanced development.

You can find the Visual Studio Add-in in the VS Gallery called Microsoft Dynamics CRM SDK Templates (No this is not the developer toolkit, that is still coming)

For those of you that prefer to go to the site directly, you can find it here: http://visualstudiogallery.msdn.microsoft.com/c1eff934-bf97-40a6-bbe3-c25178f18f86

The templates have also been placed in the CRM SDK.

Several walkthroughs have been created that utilizes these templates for build CRM connect programs and USD Extensions.

You can find more information and walkthroughs here:

 

Unified Service Desk

Note: The walkthroughs are still pending as of 5:30pm CDT on 5/28/2014, but will probably be live later today.

     

Templates

Hi Everyone,

I found out a couple of weeks ago that Microsoft may not be releasing an instructor-led version of the Extending Dynamics CRM 2013 content. (if you know different, then please let me know).

Regardless, I decided to roll my own version, which will be held sometime in July.

I am still working to shove eight-full days of training into five-half days, but in a nutshell, here is what we’ll be covering:

Day 1:

  • xRM Architecture points
  • Working with CRM web services
  • CRM platform operations

Day 2:

  • Searching for data (queries)

Day 3:

  • Plugins and custom workflow activities

Day 4:

  • JavaScript

Day 5:

  • Client experience customizations (SiteMap and Ribbon)
  • Solutions

If you are interested, then please let me know by filling out the following survey:

http://www.xrmcoaches.com/july-workshops

I am also thinking about holding full-length versions of the Plugin Development and JavaScript Development workshops, given enough interest.

And finally, I would like to launch my Architecture workshop for those of you who would like to learn more about the how’s and why’s of designing solutions for Dynamics CRM.

As always, these classes will be conducted over the Internet using a variety of modern software solutions.

Please let me know what you think.

Thanks, Mitch

Hi Folks,

If you’re in the South Central or North Central regions here in the U.S., please consider joining us for a CRMUG Regional conference next month.

Here are the details:

clip_image002

Early Bird Special…REGISTER by May 22 and SAVE!

South Central Region | June 9 – 10 | Dallas, TX | REGISTER

North Central Region | June 19 -20 | Minneapolis, MN | REGISTER

Join us for the CRMUG Regional Conference to connect, learn, and share with over 100 Dynamics CRM professionals representing some of the largest chapters in the region. The conference is designed for end users, administrators/IT, and developers/technical…an opportunity to broaden your knowledge of Dynamics CRM.

Sessions designed to drill down on topics that most interest you. A sampling of sessions include:

  • All You Need to Know in Using Advanced Find
  • Diving into Charts and Dashboards for the End User
  • Using Outlook and Excel for the CRM End User
  • What's New for the End User in Dynamics CRM 2013
  • Administrative Differences in CRM 2013 from 2011
  • Going Deeper in Automation with Dynamics CRM 2013
  • Organizations Raise the Stakes with Marketing Automation
  • Leveraging and Deploying the MoCA Client
  • Best Practices in ALM for Dynamics CRM 2013
  • Optimizing Dynamics CRM Application & SQL Server Performance
  • Let's have a CRM DevFest
  • And much more! View all the Sessions.

Early Bird Registration is Now Open

  • CRMUG Premium User Members – $129 through May 22
  • CRMUG Basic or Preview Members & Non-Members – $299 through May 22
  • Reserve your seat today!

CRMUG Academy Coming to You During Regional Conferences

CRMUG Academy is excited to participate in the upcoming Regional Conference in Dallas on June 11th and in Minneapolis on June 19th. Our 4 hour on-site, deep dive class formats allows CRM users and administrators to gain the technical knowledge they need to realize their full investment in Microsoft Dynamics CRM. View available Classes today.


 

CRMUG
Regional
Conferences

June 9 – 10
Dallas

June 19 – 20
Minneapolis


QUICK LINKS

Regional Conference

Session Topics

On-site Academy Training

Sponsor Opportunities

Register – Dallas

Register – Minneapolis

 

clip_image003

 
,

The CRM team just released the new supported configuration information for the next release of CRM:

http://blogs.msdn.com/b/crm/archive/2014/05/14/important-information-about-supported-configurations-in-the-next-major-release-for-crm.aspx

per Feridun Kadir:  Update Rollup 17 for Dynamics CRM 2011 has been released.

Here is the download link:

http://www.microsoft.com/en-ph/download/details.aspx?id=42672

and the associated KB Article:

http://support.microsoft.com/kb/2915687

Hi Everyone,

KnowledgeBits, my new free information-delivery service, is almost fully populated and will finish going live this week.  The JavaScript channel has been running for a while now and I’ll enable the others throughout the week.

If you missed the announcement last month, KnowledgeBits are tips and tricks that I have assembled over the years while working with various Dynamics CRM-related technologies or processes and are meant to give people a head-start with their activities.

Here is the current list of KnowledgeBit channels:

  • Administration
  • .NET Development (beginning and intermediate)
  • JavaScript (beginning and intermediate)
  • Plug-ins
  • Training Strategies

Each KnowledgeBit channel will be contain between 10 and 25 broadcasts which will be sent once per day.

It’s been a lot of fun putting these together and to be quite honest, a bit more work then I expected. I’ll attribute that last fact to liking to hear myself talk. Smile 

You can sign up here:

http://www.infinite-x.net/knowledgebits-signup/

Thanks, Mitch

I had one of my CRM Online organizations transition to the O365 platform a couple of weekends ago.  Not exactly a smooth process.  One of the issues I ran into was my email router was not running due to configuration changes.  Here is a list of things I worked through.  Hopefully this will help some other folks.

 

CRM Online URL

The URL that you utilize for CRM Online with Office 365 is different than that of CRM Online with Windows Live authentication.  The new format looks like this:

https://disco.crm.dynamics.com/[organization name]

[organization name] is the name of your CRM Online organization as seen on the Developer Resources page (Settings, Customizations, Developer Resources).

 

Unable to Publish Configuration

Is everyone familiar with the Chicken or the Egg conundrum?  Well I ran into that here.  I could not publish the configuration from the Email Router Configuration application because the Email Router Service was not running.

 

Email Router Service Will Not Start

The email router would not start because it could not find the Microsoft.Crm.Tools.EmailAgent.xml file, which is created by publishing the configuration.

 

The only way I successfully got around these issues was to perform a Repair on the CRM Email Router installation and that returned the system to normal.  The email router start successfully and I was able to publish my new configuration.

 

Other Issues

I did not, but you may also run into this issue:

The Email Router and Microsoft.Crm.Tools.EmailAgent.SystemState.xml file

 

Good luck. 

Mitch

Sign up for our new KnowledgeBits service and get news, tips and tricks and more, delivered straight to your inbox.