Added support for .NET Core 3 WPF projects.
Visual Studio 2017 Support - On Hold
I discovered a problem with the way references are resolved with the package on Visual Studio 2017. I'm working with Microsoft to resolve the issue.
Visual Studio 2017 & 2019 (supports Community, Professional, and Enterprise versions) extension that enables developers to rapidly generate data entry forms from view models or entity objects for Xamarin Forms, Windows Universal (UPW), WPF, and Silverlight 5.
At the writing of this, the primary scenario for Xamarin Forms is pages that don't require Platform-specific features to accomplish the layout, navigation, animation, or functional implementation.
This tool is designed to enable the developer to create cross-platform data-bound, data entry forms rapidly.
While adopting the MVVM pattern is not a requirement to create forms with the tool, it is designed to fully support creating forms with a view model as the BindingContext or DataContext. Using the MVVM pattern has long been a best practice for developing XAML applications, this tool's happy path is, form development against view models.
The XAML that the tool generates is similar to clean hand-coded XAML. Clean XAML is easily styleable because few if any Element properties have values set.
Please see the changelog here.
NOTE: the below images and property names in this documentation, were taken from a Xamarin Forms application. When using the tool for WPF, some options will not be displayed, or different ones will be displayed.
Creating a data-bound, data entry form with XAML Power Toys is very simple. You'll use drag and drop to specify the desired data form controls on a friendly layout surface.
The result will be a data entry form that renders well across platforms, with all data bindings, format strings, etc. set the way you would have you hand-coded the form.
From a XAML file in a Xamarin Forms or WPF project, right-click in the editor where you want your form to be inserted.
NOTE: You must build your solution if you've made changes to any view model or entity class BEFORE opening XAML Power Toys. This tool uses reflection to load up your solution's view models and entity classes.
After clicking the XAML Power Toys command in the context menu, the below Select Source Class dialog appears.
When the dialog opens: it loads the left list box will all classes where their name ends with ViewModel; case-insensitive, and it loads up all classes by the assembly, namespace, class name in the tree view on the right.
It attempts to locate a view model for the active XAML file by naming convention.
If one is found, it will be selected in the ViewModels list box on the left and the Next... button will be enabled.
If one is not found by naming convention, the Next... button will be disabled until you selected either a view model from the ViewModels list box or a class from the Assemblies tree view.
After clicking the Next... button the XAML Power Toys Form Layout Tool dialog will appear.
Generate UI I'm now happy with my two field form. It will be rendered in a stack layout and have the control labels positioned above each control.
Click the Next... button and the XAML UI Generation Options are displayed.
You can optionally wrap the form in a top-level control. For example, a scroll viewer for mobile forms.
You can optionally add names to all your controls.
You can optionally add a form header to the generated UI.
Click the Generate UI button and the following form will be inserted into your XAML file where you opened the context menu.
If run the Xamarin Forms UWP application, the UI looks like this:
With a little styling, these forms would look great and took less than a minute to create each one.
Have a look at the above application sample images that have the City, State, and Zip on the same row.
The below image pictures the required settings to accomplish this.
Table Section Title
This form's Column Root Object is a Table View. Table views group controls in sections. In the below image, all fields are grouped in the "Address" section.
The BindablePicker control is one I created and blogged about here.
You can also get the BindablePicker and see many usage examples in the Xamarin Forms Bindable Picker repo here.
You can see two of the supported scenarios:
The States and Countries collections are exposed on the view model, making the task of setting up data bindings trivial.
For cloning and building this project yourself, make sure to install the Extensibility Tools 2015 extension for Visual Studio which enables some features used by this project.