XamRight 2: Visual Studio for Mac, Triggers, and more

It’s been a while since we’ve posted anything, but rest assured, we’ve been busy listening to feedback from users and improving XamRight. In the last few months, we’ve made XamRight faster, more reliable, with more accurate analysis. And that’s just the behind-the-scenes stuff. There are several visible features to talk about, and for this post we talk about two, shown in the demo below:

XamRight for Visual Studio for Mac

First of all, XamRight now runs as a Visual Studio for Mac extension, bringing all of the Binding analysis, Xaml checking, autocomplete, code editing assists, and more, that the Visual Studio (for Windows) version has. It is currently available in the Visual Studio for Mac Extension Gallery in the Beta Channel.

The other feature highlighted here is support for Triggers. Triggers are a great way to declaratively express how Xaml properties react to changes in Binding properties or other elements. There are some great blog tutorials about Triggers, for instance https://xamgirl.com/understanding-triggers-in-xamarin-forms/ and https://askxammy.com/getting-started-with-triggers-in-xamarin-forms/, with others just a quick search away. This demo shows how Data Triggers, Multi Triggers, and Property Triggers can be used in a realistic situation.

One thing about Triggers – they are a bit wordy. XamRight helps you use Triggers more easily by generating the correct structure for you, which will vary based on context. Then it’s up to you to fill in the blanks — adding in the specific behavior you want to see.

When filling in the details of Triggers, XamRight error checking steps in to help. Skip ahead to 20 seconds into the video to see how XamRight Binding checker indicates that the Binding property specified by the DataTrigger doesn’t exist on the view model class, and then gives the developer an easy way to inject a new C# view model property.

There are more exciting features we’ll be sharing soon!

XamRight is available for trial from both the Visual Studio Marketplace (2017 and 2019) and Visual Studio for Mac Extension Gallery.

Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.