Release Notes - v3.0.0

1st June 2017

Download MFractor 3.0.0

Introduction

This is a summary of the changes introduced in v3.0.0 of MFractor for Visual Studio Mac.

This release supports Visual Studio for Mac.

This release adds the ability to control MFractor through configuration files; this enables developers to change MFractor's behavior when refactoring, analyzing and generating code.

Features

  • Visual Studio For Mac Support!
  • Premium Only The new config file system enables customization the code generated by MFractor. Create a new file with the extension .mfc or .mfc.xml in your project and influence MFractor's internals using the <configure id="com.mfractor.XXX"/> and <property name="Name" value="Value"/> syntax. A full tutorial on configuration is [available here].
  • New Code Analysers
    • Detect when a ContentView has multiple child elements.
    • Detect when a ContentPage has multiple child elements.
    • Detect when a MyView.Resources resource dictionary setter contains anything but a ResourceDictionary declaration.
  • New Code Generators
    • When on a <Grid.RowDefinitions> element, the new code generator Add RowDefinition will insert a new row definition element.
    • When on a <Grid.ColumnDefinitions> element, the new code generator Add ColumnDefinition will insert a new column definition element.
  • New Code Organisation
    • When the root xaml node has unused namespaces, activate Removed Unused Namespaces to cleanup all unused xaml namespaces.
  • New Code Fixes
    • When a MyView.Resources property setter contains anything but a ResourceDictionary declaration allow the user to wrap the element declarations with a resource dictionary.
      • When the result of a binding expression does not match the input type of the outer attribute and a value converter has a ValueConversion that resolves it, generate a Converter= expression and import the value converter as resource.
      • When the result of a binding expression does not match the input type of the outer attribute, generate an IValueConverter implementation that resolves the type-flow, generate a Converter= expression and import the value converter as resource.

Enhancements

  • Android Layout analysis and IntelliSense has been disabled. It interfered with the stock Xamarin IntelliSense and regressed the layout editors user experience. This will be revisited at a later date.
  • Only show code fixes in the quick fix menu when it's activated over a code issue. This reduces noise and improves usability.
  • In Xaml, color literals (EG: #AAA) are now underlined with the color value. This makes it easy to visually see the color at a glance.
  • Press Alt+Shift+1 to jump to the view model for a code behind or xaml view.
  • Press Alt+Shift+2 to jump to the code behind for a view model or xaml view.
  • Press Alt+Shift+3 to jump to the xaml view for a code behind or view model.
  • Significantly improved speed/performance of the MVVM navigation shortcut suite.
  • The Simply Static Assignment organise code action has been removed as it added no tangible value.

Bug Fixes

  • Fixed: Passing . into a binding expression to reference the binding context would cause an analysis error. Using . will now correctly resolve to the binding context.
  • Fixed: MFractor now detects when the BindingContext of a Xaml element is specified using a property setter node (<View.BindingContext> <vm:MyViewModel> </View.BindingContext>).
  • Fixed: Generate code files into shared projects when the source xaml is in a shared project.
  • Fixed: Don't allow view model creation from the App.xaml.
  • Fixed: Don't check for x:Key attributes on <Style/> elements; no x:Key means the style is the implicit control style.
  • Fixed: Detect .NET symbol references that are within attributes whose type is System.Type to include them in namespace refactoring and unused namespace detection.