During the past days I have been using MFractor and definitely love it. In simple words, MFractor is a tool that helps you code faster, because of some interesting features that can increase your productivity such as: making you aware of syntax errors, creating classes, providing handy shortcuts to do stuff, etc.
Let’s see the magic
There are 2 kinds of licenses: a free one which is limited to 3 features and MFractor professional.
Free license
Let’s explore the features:
Xaml Tooltips
It allows seeing a tooltip with a detail of any property of your XAML.
As you can see here, if I use an Image I can see a little preview of it. Also in the Text property, I can see the binding context of that property (TestViewModel).
Go-To
It allows you to navigate between the XAML, ViewModel and code-behind in a very easy way.
Code Analysis
It allows you to detect a syntax error in your XAML and suggests a fix as well.
As you can see here the property IsVisible was written as isVisible so underlines it and when hovering it shows a possible resolution.
Premium License
If you want to get really extra super powers then you have to check the premium features. Is also important to mention that with the free license you are able to use 3 premium features per day.
These are some of the premium features:
Image Wizard
Working with local images in mobile apps sometimes is a nightmare, why? because you have to make sure to add the same image in different resolutions and it can be tedious if your app has a lot of them.
That’s the reason why this is my favorite feature, Image Wizard allows you to generate an image in different resolutions just by clicking a button.
Pretty simple to do, you just have to go to “Tools”, press “Import Image Wizard”, choose the image and click on Import.
Also, you can change the image name and select which platform you want.
Auto Generation
It allows generating properties and view models from XAML to C#.
As you can see here, I didn’t have any ViewModel associated to my View, so when doing right click on my binding property in the XAML, the ViewModel and the property was auto-created for me.
Also if the ViewModel was created already but not the property, it adds the property into the ViewModel.
Extract Value Into Property
If you have hardcoded values in your XAML, it allows you to automatically move that value to a property and name it.
Edit Colors
If you want to use custom colors, it provides you a color editor to do it.
Code Analysis with Replace option
Besides the option of code analysis we have shown before by using the free license, in the premium version it lets you apply the resolution suggestion.
Extra Information
Those are some of the awesome features, but there’s more. You can find more information about it on the official documentation here: http://docs.mfractor.com/.
- How to install it: http://docs.mfractor.com/installation-and-setup/
- Premium license price: 299AUD per year (234~ USD)
For more questions you can contact them directly on Twitter or email, they are always willing to help!
Happy coding :)!
3 Comments
Do you know if there is a similar tool for Visual Studio for windows?!
The most similar for Visual Studio – Windows is Resharper (https://www.jetbrains.com/resharper/).
I’ve used Resharper at my previous position. And recently started to test out MFractor.
These tools are real treats and can help a C# / Xamarin developer be much more productive.
For me, initially getting my XAML checked before runtime is a real timesaver. The refactoring is very powerfull too.
ps: ❤️ your blog and I’ll be 👀 it from now on 😀