Category: News

Home / Category: News

There are many reasons why you should download Xamarin.Forms 4.6 right now, but one is extremely important: without it you cannot publish new iOS apps on the app store anymore (UIView deprecated). Is this not enough? 🙂

So ok, let’s see what other new features we have in this new version.

Improved Shell Styling

Shell is a “quite” new feature of Xamarin.Forms that simplifies your app structure. Using it, you can have access to an “already cooked” tabbed navigation or Fly-out menu (use Shell and you’ll have an app and its navigation ready in 2 minutes). Xamarin.Forms 4.6 has improved the Shell styling making very easy to customise your navigation pages.

Navigating Back

Sometimes you don’t know your previous page so you don’t know where to go when the user presses the back button. Now you can co back with a vey easy and intuitive command:

await Shell.Current.GoToAsync("..");

Experimental Features

Thanks to an amazing open source community, Xamarin.Forms progresses really quickly. Sometime, they want to add new features but maybe the users are not fully ready for them, so they use an experimental flag.

To use a new feature you need to add to your App.xaml.cs the following constructor:

Device.SetFlags(new[] {
    "RadioButton_Experimental",
    "AppTheme_Experimental",
    "Markup_Experimental",
    "Expander_Experimental"
} );

Of course you want to add only the features you need in your app.

RadioButton

Should I really have to tell you what they are? Com on, you know what we are talking about. To be sure your radio buttons are part of the same group, you need to set the GroupName.

<StackLayout>
    <RadioButton GroupName="BestOne" Text="Android" />
    <RadioButton GroupName="BestOne" Text="iOS"/>
    <RadioButton GroupName="BestOne" Text="UWP"/>
</StackLayout>

Expander

How many times did you want to show and hide part of your page? Now with the Expander you can. This component shows/hides its content.

<Expander>
    <Expander.Header>      
        <Label Text="My header"/>
    </Expander.Header>                        
    <Label Text="My content">
    </Label>
</Expander>

Easy? Yes, it is!

C# UI Extensions

This is something I personally don’t like as I prefer to write my UI in XAML, but anyway I’m sure thare are many people around that would love this new feature. If you like to write your UI in C#, then you’ll be very happy. This extension enables the use of the fluent syntax.

Font Embedding

This is an amazing feature. I love it as it makes very easy to use custom fonts in our Xamarin.Forms apps. To add a new font, add it as an Embedded Resource to you .netstandard project then in you assemblyInfo.cs file add this line:

[assembly: ExportFont("yourfont.ttf")]

Just remember to replace “yourfont” with your font filename 🙂

then you just have to set the fontfamily every time you want to use that font. For example if we want to set a font for every label in our app we can create a style like this:

<Style TargetType="Label">
    <Setter Property="FontFamily" Value="MyFontName"/>
</Style>

Conclusion

I’ve tested the new version of Xamarin.Forms and I’ve found few things very useful.I think that you should really upgrade your app to Xamarin.Forms 4.6.

Have you tried this version and you are happy or have issues with it? Let me know your experience in the comments!

Do you need the link to download it? Here you go: nuget Xamarin.Forms

Happy Xamarin Coding!

With Xamarin Forms it’s definitely possible to create great apps for Android, iOS and Windows: Safe Notes is clearly an example.

As you can see from the gallery, Safe Notes keeps your notes safe using a password and does it in a very stylish way.

Key Features

* Password protection. Protect your notes and checklist with password and lock the whole notepad app with your PIN.

* Offline access. Access your notes even without internet connection.

* Autosave. The notepad will save your notes automatically while you edit them.

* Tags. Organise your notes and to do list with labels to find them easily.

* Search function. Easy search notes and filter tags.

* Preferred Notes. Set note importance.

* Fast memo. Import text data directly from another source. Copy and paste from your phone to your note.

* Simple and intuitive user experience. Create. Edit. Delete.

* Photo support. Add photos and images to your secure notes.

* Colours. Use colours to categorise notes by importance, tags or subject or just make your notepad more fun.

* Tick the completed tasks.

* Share. Send and share individual note to yourself or another contact if you need.

* Unlimited text size.

* Multi languages.

* Off-line security. You are the only one that knows your password and everything that you write and save it is stored only on your phone instead of app and database. You don’t have to trust any other third-party as nobody else have access to it. Nothing is stored online where someone could potentially read it. 100% privacy protection.

* Free (Safe Notes is a free app and ads supported).

Download it from the Stores

Android: https://play.google.com/store/apps/details?id=com.HighTouch.SafeNotes

iOS: To be released

Windows: To be released

MTAdmob is now Open Source

October 16, 2019 | News, Plugin | No Comments

MTAdmob is probably the easiest and best plugin to add Google Admob to your Xamarin Android and iOS apps.

You can add Banners, Interstitials and Rewarded Videos to your app with a single line of code.

And now MTAdmob is Open Source so if you want to know how it works or if you want to contribute to it, you can go on

https://github.com/marcojak/MTAdmob

and have a look or maybe send a pull request with some new features.

Again if you need a tutorial, you can have a look at

https://www.xamarinexpert.it/admob-made-easy/

Have a suggestion or a comment? Write it here or on:

https://github.com/marcojak/MTAdmob

https://bitbucket.org/marcojak81/mtadmob

Microsoft today has released Visual Studio 2017 version 15.6!

Visual Studio
Visual Studio 2017

Release Note

  • We improved solution load performance by optimizing design time build.
  • We’ve added installation progress details on Visual Studio Installer.
  • You can pause your installation and resume at a later time.
  • We streamlined the update process so the notification takes you directly to the Installer.
  • Non-administrators can create a VS layout.
  • We added a new shortcut for Edit.Duplicate in the keyboard mapping.
  • We made significant improvements to the F# language and tools, particularly for .NET Core SDK projects.
  • The C++ compiler optimizes your code to run faster through improved optimizations.
  • C++ Mapfile generation overhead is reduced in full linking scenarios.
  • Debug options are available for Embedded ARM GCC support.
  • We added strong name signing on CoreCLR for the C# compiler.
  • Visual Studio Tools for Xamarin has lots of new productivity updates for iOS and Android developers.
  • Python no longer requires a completion DB, and Anaconda users have support for conda.
  • The Performance Profiler’s CPU Usage Tool can display logical call stacks for asynchronous code.
  • The CPU Usage tool displays source line highlighting and async/await code with logical ‘Call Stack Stitching’.
  • The debugger supports thread names set via SetThreadDescription APIs in dump debugging.
  • Snapshot Debugging can be started from the Debug Target dropdown for ASP.NET applications.
  • We’ve launched the initial implementation of Navigate to decompiled sources for .NET code navigation.
  • New enhancements for Configure Continuous Delivery include support for TFVC, Git authentication over SSH, and containerized projects.
  • You can now click on the Continuous Delivery tile in Team Explorer to configure automated build and deployments for your application.
  • Team Explorer supports Git tags and checking out pull request branches.
  • Service Fabric Tooling for the 6.1 Service Fabric release is now available.
  • The Windows 10 Insider Preview SDK can be installed as an optional component.
  • File versions for a number of Visual Studio executables now reflect the minor release.
  • Test Explorer has a hierarchy view and real time test discovery is now on by default.
  • We have added support for testing Win10 IoT Core applications.
  • Visual Studio Build Tools supports TypeScript and Node.js.
  • ClickOnce Tools support signing application and deployment manifests with CNG certificate.
  • You can access Azure resources such as Key Vault using your Visual Studio accounts.

And the Top issued fixed:

  • Visual Studio may freeze or crash when running on a pen-enabled machine.
  • Resizing of windows is not reliable.
  • .NET Core Projects containing special characters fail to restore NuGet packages or build.
  • Test Explorer Default Architecture not remembered.
  • Solution Explorer does not remain pinned after closing Visual Studio.
  • Regular UI freezes during debug session.
  • File names revert to lower case when re-opening a project.
  • Mouse cursor sticks on the Pointer (Hand) icon.
  • VSIXAutoUpdate crashes on scheduled task.
  • Start-up generates “We’ve noticed that a tool window ‘Error List’ is slowing Visual Studio.” alert.
  • Quick Launch no longer displays results after toggling to full screen.
  • XAML Activity designer throws OutOfMemoryException due to failed assembly reference resolution.
  • Cannot Stop/Cancel Debugged Unit Tests when using Selenium WebDriver.
  • When using the /quiet switch, vsixinstaller.exe does not exit at the end of installation.

This is the official page to get more info: https://docs.microsoft.com/en-us/visualstudio/releasenotes/vs2017-relnotes

About Xamarin in this release:

Visual Studio Tools for Xamarin

This release includes Xamarin.iOS 11.8 and Xamarin.Android 8.2.

Live XAML Previewing with the iOS Simulator

The Xamarin Live Player enables developers to continuously deploy, test, and debug their apps using just Visual Studio and an iOS or Android device. Visual Studio 2017 version 15.5 added support to enable developers to preview real-time XAML changes directly in the Android emulator without requiring a recompile or redeploy. This release brings this functionality to the Remoted iOS Simulator for Windows.

Microsoft has released a new preview version of the new Visual Studio 2019.

The good thing is that it can be installed without affecting your current Visual Studio installation, so if you want to try it now, you can install it for free from here.

We love Visual Studio but in particular we love Xamarin, so let’s see what are the news related to it:

Build and Deploy time

It seems that this new version of Visual Studio brings a massive improvement in Build and Deploy time.

According to Pierce Boggan: “Incremental build times in the Visual Studio 2019 Preview for the SmartHotel360 app are 29.66% better than the Visual Studio 2017 version 15.8 release, and deployment times are over twice as fast

STEPVISUAL STUDIO 2017 VERSION 15.8VISUAL STUDIO 2019 PREVIEW 2DELTA
First Build01:04.2000:50.13-21.95%
Incremental Build (XAML Change)00:10.6200:07.47-29.66%
Deploy (XAML Change)00:09.0300:04.44-50.83%

Considering that we spend most of our days building and deploying apps, even few seconds are more than appreciated and here we are talking about 30%. Not bad!

Enhanced Fast Deployment for Android

Visual Studio 2019 Preview 2 adds support for enhanced fast deployment. It means that it will generate a new APK only when necessary.

To enable this feature, add these lines to your Android file project:

<PropertyGroup>   
<AndroidFastDeploymentType>Assemblies:Dexes</AndroidFastDeploymentType> 
</PropertyGroup>

Xamarin.Forms

In Visual Studio 2019 we can use a property panel to help us writing our XAML files. We just need to select a control and all its properties will appear in the property panel.

XAML IntelliSense

Visual Studio 2019 has a better IntelliSense and will include IntelliCode that will recommend us the common items putting them on top of the completion list according to the context.

Designers

The Android designer adds support for Android Pie (9.0) while now IntelliSense is supported for Android XML files.

The iOS Designer adds support to render custom controls that need to load native dynamic libraries or frameworks.

What else

Visual Studio 2019 produces faster Android Apps with smaller APKs thanks to d8 and r8.

To enable these two features add these lines to your Android project file:

d8:

<PropertyGroup>   
<AndroidDexTool>d8</AndroidDexTool>
</PropertyGroup>

r8:

<PropertyGroup>   
<AndroidLinkTool>r8</AndroidLinkTool>
</PropertyGroup>

Visual Studio 2019 also adds the Xamarin Forms Shell Template.

There are many other improvements to Visual Studio 2019, so I’ll suggest you to try it and maybe give your feedback to Microsoft.

What do you think about Visual Studio 2019 Preview 2? Tell us writing a comment…

On September 2013 I released Safe Photo a native application for Android that allows you to hide pictures on your phone.

The app was quite successful with over 100.000 downloads and an impressive rating of 4.1.

During these years I’ve stopped to write native apps to concentrate entirely on Xamarin. So the logic consequence of that is that I’ve now created a new version of the app with Xamarin.Forms: Safe Photo 2.

Get it on Google Play
Get the app on Google Play Store

The idea behind the app is always the same: Safe Photo 2 will allow you to hide your secret pictures behind the security of the app.

Features

  • Protect the photos on your smartphone or tablet
  • Take new photos directly from the application, they will be protected automatically
  • Import photos from the public gallery (then delete them from the public gallery)
  • Protect your privacy with a numeric password
  • Organise your photos in galleries
  • Share your photos with whoever you want and how you want
  • The application can run on an external memory card so you will not consume the internal memory of your smartphone
  • Your photos are invisible also connecting the phone to a PC
  • Delete one or more images or galleries in one click
  • Compatible with smartphones and tablets
  • And it’s free

Gallery

Xamarin : How the app is made

To store all the data, Safe Photo 2 uses a SQLite database and of course the app uses the Sqlite Plugin For Xamarin And Windows (Nuget package).

The app also uses a Google Admob to show ads as banners and interstitials. As soon as possible I’ll create a package to easily add Admob to your Xamarin applications. If you prefer to write code yourself instead of using the plugin, I’ll also add a tutorial on how to add Admob on Xamarin.Android, Xamarin.iOS and Ads on UWP.

The app also uses some Dependency Services to execute some code on the native platforms. We use them to

  • Share a picture
  • Save, Copy and delete Files
  • Implement banners and interstitials for Admob

Do you want to know more about the app code or about Xamarin? Let me know and I’ll tell you more.

Finally the new version of Visual Studio 2017 is here.

Visual Studio
Visual Studio 2017

As usual let’s see the new features inside this releases and the changes for Xamarin:

  • You can now import and export an installation configuration file that specifies which workloads and components should be installed with an instance of Visual Studio.
  • We have improved the debugging experience for NuGet packages using the new symbol package format (.snupkg).
  • Step back in debugger is now available in C++ for Enterprise customers.
  • C++ IntelliSense now responds to changes in the remote environment for both CMake and MSBuild projects targeting Linux.
  • We have made updates to UWP Desktop Bridge framework packages and added support for ARM64 C++ Native Desktop scenarios.
  • We added support for the range-v3 library with the MSVC 15.9 compiler.
  • We fixed several bugs in the F# compiler and F# tools.
  • Language service support for new TypeScript features for semantic file renaming and project references.
  • Improved Node.js development by updating Vue.js templates and adding support for unit testing using the Jest framework.
  • We added SharePoint 2019 project templates, so you can migrate existing SharePoint 2013 and 2016 projects to SharePoint 2019.
  • Visual Studio Tools for Xamarin now supports Xcode 10.
  • We made improvements to the Xamarin.Android build performance.
  • We have added and improved features for Universal Windows Platform developers, including ARM64 support, the latest preview SDK, better debugging of Desktop Bridge applications, and XAML Designer improvements.
  • Substantial improvements were made to the experience of using authenticated package feeds.
  • There is now support for lock file to enable repeatable restore for PackageReference based projects.
  • We have added support for the new license format for NuGet packages.
  • We have introduced NuGet client policies in Visual Studio which enables you to lock down environments such that only trusted packages can be installed.
  • We made the use of .NET Core within Visual Studio more predictable.

and these are the bugs fixed in this version:

  • No way to change “Find All References” background color.
  • “Visual C++ Resource Editor Package” load failed.
  • VS2017 v15.8 Build does not start if XAML files are not manually saved first.
  • Installation failed – manifest signature verification failed.
  • Update 15.8.6 breaks Installer Projects.
  • Scrolling up with the arrow key causes Visual Studio to page up.
  • After updating to 15.8.1, data tip does not show when debugging.
  • System.InvalidProgramException: Common Language Runtime detected an invalid program..
  • Solution Explorer does not remain pinned after closing Visual Studio.
  • Navigation bar in editor has trouble handling long method names.

Regarding Xamarin these are the most important changes in this release:

Visual Studio Tools for Xamarin

Visual Studio Tools for Xamarin now supports Xcode 10, which allows you to build and debug apps for iOS 12, tvOS 12, and watchOS 5. See how to get ready for iOS 12 and our introduction to iOS 12 for more details on the new features available.

Initial Xamarin.Android Build Performance Improvements

Xamarin.Android 9.1 includes initial build performance improvements. You can see the build performance comparison here.

To download Visual Studio 2017 or to see the entire release notes, you can follow this link: Visual Studio 2017 release notes.

Microsoft has now released a new update for Visual Studio 2019. Let see what news we are and if there are improvements for Xamarin (Yes, there are…Yes!!!!)

As usual I’ll copy here Microsoft Release notes (it’s quite long, so I’ll keep only the important part) and then we’ll see the improvements for Xamarin. I’ve added in bold the parts related to Xamarin.

Release Notes Visual Studio 2019 version 16.1

IDE

  • Visual Studio IntelliCode is now generally available and comes installed with any workload that supports C#, C++, TypeScipt/JavaScript, or XAML.
  • We have added Per-Monitor Awareness support.
  • New codefixes are available for C#.
  • Most Recently Used has been added to Visual Studio Search.

Performance

  • You can now experience optimizations to improve the solution load time of very large solutions.
  • Template authors can add custom tags to their templates.
  • There is now CodeLens support for custom UI.
  • We have provided updates to Language Server Protocol implementation.
  • We have updated behavior for switching between solutions, folders, and other views.

C++

  • In-editor documentation for CMake has been added.
  • Use Windows Subsystem for Linux with C++ natively in Visual Studio, and AddressSanitizer for Linux projects and WSL.
  • We have made improvements and modified colorization in C++ Quick Info tooltips.
  • We have implemented new C++ Code Analysis quick fixes.

F#

  • We have released more performance improvements and a bulk of bug fixes for F# and F# tooling.

.NET

  • New .NET productivity features include one-click code cleanup on projects and solutions, a new toggle block comment keyboard shortcut, refactoring to move types to other namespaces.
  • You can now clone code from an SSH URI through the clone screen in the start window.
  • .NET Productivity additions in this release include intellisense completion for unimported types, toggling single-line comment/uncomment, exporting naming styles to editorconfig, and a new code style setting for preferring usings inside/outside namspaces.
  • We have implemented .NET SDK tooling additions primarily around supporting WinForms and WPF projects for .NET Core 3.0 along with bug fixes and performance improvements.
  • Visual Studio SDK v16.0 has been released to NuGet.
  • A preview of the XAML Designer for .NET Core 3.0 WPF development is available.

Xamarin

  • Default Android Experience for Xamarin now supports API 28.
  • Xamarin.Forms XAML recommendations for design time attributes.

Top Issues Fixed in Visual Studio 2019 version 16.1

  • Cannot navigate to the symbol under the caret in ASP.NET MVC Projects.
  • Resx editor doesn’t render.
  • Xamarin.iOS cannot find the application manifest. Please ensure the project contains a manifest file named ‘Info.plist”.
  • nmake environment missing path to NETFX tools.
  • Clicking on a ASP.NET Core project in solution opening the project .csproj file.
  • Assembly reference is removed from project after running app referencing library.

Details of What’s New in Visual Studio 2019 version 16.1

IDE

  • IntelliCode is now generally available and comes installed with any workload that supports C#, C++, TypeScipt/JavaScript, or XAML.
  • Use the start window to clone code from an online repository through SSH.
Clone with SSH on start window

Clone with SSH on start window

  • Visual Studio IntelliCode is installed by default when you install a workload that supports C#, XAML, or C++.
    • C# and XAML base models will be on by default.
    • Preview features, such as custom model training and argument completion, can be enabled via Tools > Options > IntelliCode.
  • Added Per-Monitor Awareness support
  • New codefixes available for C#.
  • Added Per-Monitor Awareness support for WinForms based PropertyBrowser window of Visual Studio. Requires .NET Framework 4.8 RTM version installed on the machine.

Debugger

  • Source Link can now use Windows Authentication to support on-premises TFS Source Control.
  • Added nuget.org symbol server to the list of default symbol servers

Project

  • The button for switching the Solution Explorer view will now consistently show you a dropdown menu of all possible views.
Solution switching

Solution view switching

  • Improved the loading time for very large solutions. The improvement varies based on the size of the solutions.
  • Removed the Convert dialog under File > Convert. This feature was previously deprecated in Visual Studio 2015.
  • Updated the validation rules for the task.vs.json and launch.vs.json schemas, and added descriptions for the properties.
  • Added support for Linux remote debugging using a custom program via launch.vs.json.

Editor

  • Visual Studio Search will now display on focus the three most recently used actions invoked through Visual Studio Search, as shown in this sample mockup. (Note: icons and specific line items have not been fully updated in this mock-up.)
Visual Studio Search

.NET Productivity

  • There is now experimental intellisense completion for unimported types! You now receive intellisense suggestions for types in dependencies in your project even if you have not yet added the import statement to your file. You must turn this option on in Tools > Options > Text Editor > C# > Intellisense.
Intellisense completion for unimported types

Intellisense completion for unimported types

  • Toggle Single Line Comment/Uncomment is now available through the keyboard shortcut (Ctrl+K,/). This command will add or remove a single line comment depending on whether your selection is already commented.
  • You can now export naming styles with the “Generate editorconfig” button located in Tools > Options > Text Editor > C# > Code Style.
  • You can now use a new editorconfig code style rule to require or prevent usings inside a namespace. This setting will also be exported when you use the “Generate editorconfig” button located in Tools > Options > Text Editor > C# > Code Style.
Editorconfig rule for usings outside/inside namespaces

Editorconfig rule for usings outside/inside namespaces

Tools Options setting for usings inside/outside namespace

Tools Options setting for usings inside/outside namespace

  • The Find All References “Kind” column now has more filter options and is aware of namespaces and types.
Find All References Kind column has more filter options

Find All References Kind column has more filter options

  • We have added a codefix for split/merge if statements.
Split or merge if statements

Split or merge if statements

  • We have added a codefix for wrapping binary expressions.
Wrap binary expressions

Wrap binary expressions

  • A regex completion list can now be accessed through the intellisense menu (Ctrl + space) when inside a regex string. These completions also include an in-line description of what the suggestion does.
Regex completion offered in Intellisense with (Ctrl + space)

Regex completion

  • We have added a codefix for unsealing a class.
Unseal a class codefix

Unseal a class

  • You can now use one-click code cleanup for projects and solutions. You can right-click on projects or the solution in the Solution Explorer and select ‘Run Code Cleanup’.
Right-click to run code cleanup over the entire solution

Right-click to run code cleanup over the entire solution

You will see a dialog box while cleanup is applied to each file

You will see a dialog box while cleanup is applied to each file

  • You can now use a refactoring dialog to move type to namespace or folder. Place your cursor in the class name and type (Ctrl + .) to open the quick actions and refactorings menu and select ‘Move to namespace.’ This launches a dialog where you can select the target namespace you would like to move the type to.
Place cursor in class name and type (Ctrl+.) to view refactorings

Place cursor in class name and type (Ctrl+.) to view refactorings

Select the destination namespace

Select the destination namespace

  • Toggle Block Comment/Uncomment is now available through the keyboard shortcut (Ctrl+Shift+/) or through Edit > Advanced > Toggle Block Comment. This command will add or remove block comments depending on what you have selected.
Toggle block comment with (Ctrl+Shift+/)

Toggle block comment with (Ctrl+Shift+/)

  • There is now a codefix for making readonly struct fields writable. Place your cursor in the struct name, type (Ctrl+.) to open the quick actions and refactorings menu, and select ‘Make readonly fields writable.’
  • The codefix to add a private field from a constructor and vice versa is easier to discover and will show when any portion of the field name is selected. This refactoring now also offers all possible constructors.

XAML Designer Preview for .NET Core 3.0 WPF development

  • There is an early preview of the XAML Designer for developers building .NET Core 3.0 WPF applications in Visual Studio. Many design-time features will be unavailable at this time. Since this is an early preview, if you encounter issues such as crashes, please submit Visual Studio feedback for the team to improve the experience going forwards.
  • With each update to Visual Studio 2019, we will continue implementing more of the features that were previously available in the XAML Designer for .NET Framework WPF applications.

Xamarin

  • We have updated the default Android Experience to API 28 for templates, device creation, installers, and more.
  • IntelliSense on Windows now shows recommendations for design-time attributes when writing Xamarin.Forms XAML.

Changes related to Xamarin

As we have seen, there are 2 main changes. The first one is relative to Android, now everything is updated to API 28, so we should find updated Android templates.

The second change is relative to IntelliSense, now it should give us better recommendations when we write our Xamarin.Froms XAML files.

A very annoying bug has been fixed in Xamarin.iOS: Xamarin.iOS cannot find the application manifest. Please ensure the project contains a manifest file named ‘Info.plist”.

That was quite a bad bug and the only way to resolve it was to unload and reload the iOS project. Fortunately now Microsoft has fixed it so…..Yeahhh!

Are you going to update Visual Studio? I’m doing it right now!

For a list of all changes, please visit this page: https://docs.microsoft.com/en-gb/visualstudio/releases/2019/release-notes#16.1.0

N.B. The images were taken from the page above. So the copyright belongs to them

Xamarin.Forms 4.0 is finally out

May 22, 2019 | News | No Comments

Every release of Xamarin.Forms improves the performances and adds new features. It has been a long time since the first Xamarin.Forms came out. That version was very basic and to be honest not very great. Then Xamarin.Forms 2 came out and it was better, finally something that could be used for a production app. When Xamarin.Forms 3 came out, it was great, better performances, new features. Xamarin.Forms 3 has been a great tool to create amazing multiplatform apps and now Xamarin.Forms 4.0 promises even more, again better performances and new features. Let’s see together the main news of this release.

The Shell

Shell is a new way to create our apps. First of all it allows us to add easily flyouts and menus to our apps. It also adds the concept of URI navigation.

That’s great but what is even better is that it uses “fast renderers” (see later). To use the shell, on Visual Studio 2019 starting a new Xamarin.Forms app, you can select the Shell template. To get more info about Shell, you can use this documentation:

Android Fast Renderers

Android Fast Renderers were introduced in Xamarin.Forms 2.4 but disabled by default. The idea behind them is to reduce the number of views required to render a particular control. Honestly you could see improved performances so now they are enabled by default. This means that you will notice better perfomances with the enw Xamarin.Forms.

Image Source Unification

From Xamarin.Forms 3.5, they have introduced the FontImageSource to use the font glyphs but was not possible to use it everywhere. From version 4.0using ImageSource you can use them wherever you want.

Accessibility

From Xamarin Forms 4.0 we can now control the focus order directly in X.F. To do this, we can use the TabIndex property available on any VisualElement.

Conclusion

I will personally test Xamarin.Forms 4.0 and in particular the Shell to see how great that is. I will also test the new navigation pattern (URI Navigation) to see if there are improvements here. I will also evaluate the new performances to see if the app can be faster or more fluid.

And what do you think about Xamarin.Forms 4.0?

If you are using the Syncfusion library together with Xamarin.Forms > 3.4 you should definitely continue to read.

Since the new release of Xamarin.Form 3.5, if you try to use the Syncfusion Listview (SfListView) in Release mode on Android, your app will crash.

In this moment there are two things that you can do:

  • Use a version of Xamarin.Forms < 3.5
  • Set the Linking to None (in this case your final APK will be bigger than usual).

Unless you are using some of the new features of Xamarin.Forms > 3.4, I’d suggest you to continue to use Xamarin.Forms 3.4 otherwise in you Android project, set the Linking to None and it will solve your problem.

I will update this post, as soon as Synfusion and Xamarin will solve this massive issue.

Meanwhile you can follow the progress of this bug here: https://github.com/xamarin/Xamarin.Forms/issues/5288

%d bloggers like this: