Giter VIP home page Giter VIP logo

mrlacey / rapid-xaml-toolkit Goto Github PK

View Code? Open in Web Editor NEW
659.0 37.0 43.0 14.63 MB

A collection of tools to accelerate XAML development within Visual Studio. These include XAML analysis, XAML generations, plus templates and helpers.

Home Page: https://marketplace.visualstudio.com/items?itemName=MattLaceyLtd.RapidXamlToolkit

License: Other

C# 99.26% PowerShell 0.74%
xaml vsix uwp wpf xamarin-forms uno-platform rapid-xaml

rapid-xaml-toolkit's Introduction

Rapid XAML Toolkit

Build status License: MIT Works with Visual Studio 2019 AppVeyor tests

‼️ Important News ‼️

The Visual Studio 2019 extensions helped a lot of people improve their XAML experiences. They also showed there's still a lot of opportunity to make things even better.
2023 will bring an update to the extension (including VS2022 support) and additional tools and functionality.
The best distribution and licensing options are currently under review.

Expect more details soon....


This is a collection of tools for making it easier for developers to work with XAML (UWP, WPF, Xamarin.Forms, WinUI3, and .NET MAUI). These tools include

  • Get in-editor analysis of your XAML to find and fix issues faster.
  • Generate XAML from your ViewModels.
  • Enhance the editor window.
  • Roslyn Analyzers (to help with code related to MVVM and XAML)
  • Project & Item Templates (to create new apps faster)

Get it from the VS Marketplace

XAML Analysis

Like Roslyn Analyzers but for XAML. Identify potential issues and use the Suggested Actions to make fixes.

Screenshot showing some of the issues analysis can find

You can also create your own Custom Analyzers and run the analysis as part of a Build/CI process with this NuGet package.

Learn more about features.

XAML Generation

Turn your ViewModels into XAML with a couple of clicks or a drag of the mouse.

Animation showing XAML generated from a ViewModel

The generated XAML is based on common conventions but is highly configurable.


Principles guiding this project

  • Developers using XAML deserve the best tools possible.
  • Doing something is better than doing nothing.
  • Everything that is output should be configurable.
  • C# and VB.NET are supported equally.
  • The toolkit won't do things that Visual Studio can already do. (Without very good reason.)
  • The toolkit can't generate the final XAML as every app requires unique customization.
  • This toolkit is focused specifically on tooling for working with XAML. It will not include controls, etc.

Installation

Please see the getting started guide.

Contributing

Please see the contribution guide.


History

The Rapid XAML Toolkit (RXT) was started as a sister project to Windows Template Studio (WinTS).
It was oringinally created in partnership with Microsoft (that's why github.com/microsoft/rapid-xaml-toolkit redirects here) but is now primarily cared for by Matt Lacey.

rapid-xaml-toolkit's People

Contributors

alex-witkowski avatar danielchalmers avatar dependabot[bot] avatar kmgallahan avatar microsoftopensource avatar mkan0141 avatar mrlacey avatar msftgits avatar olivierodo avatar sibille avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rapid-xaml-toolkit's Issues

Need keyboard shortcuts for all commands

Need to not be already commonly used.
Ideally with some logical grouping.

Needed for:

  • Create View
  • Copy to clipboard
  • Send to Toolbox
  • Open Options
  • Set DataContext

Localize VSIX

Add localization support for UI Text.
Initial release (1.0) will be English only.

Need to localize:

  • Package level resources
  • Settings dialogs
  • Other UI/exception messages
  • Manifest
  • EULA

Review and extend default Xamarin.Forms profile

Version 0.1 only includes a basic profile for Xamarin.Forms apps. This is not expected to cover all scenarios and should be extended to include support for a wider range of scenarios and uses.

Please share your thoughts below.

We're actively seeking feedback on how the default profile should be changed AND any other profiles that should also be included by default.

A follow-on from #28

Define default profiles for launch

These will be what we ship with as the default options for launch

  • UWP - basic stack panel - VM set in codebehind - C#
  • UWP - basic 2Col grid - VM set in XAML - C#
  • UWP - basic stack panel - VM set in codebehind - VB
  • UWP - basic 2Col grid - VM set in XAML - VB
  • WPF - Basic - C#
  • WPF - Basic - VB
  • Xamarin.Forms - Basic - C#

Need these in code and separate files in the repo too.

WPF & XF profiles included by default to show they're supported. More included by default in a future version.

Review and extend default WPF profiles

Version 1.0 only includes a basic profile for WPF apps (C# & VB versions). This is not expected to cover all scenarios and should be extended to include support for a wider range of scenarios and uses.

Please share your thoughts below.

We're actively seeking feedback on how the default profile should be changed AND any other profiles that should also be included by default.

A follow-on from #28 & #71

Need to handle mapping VM and View with Copy actions

investigation needed

If XAML is added via the clipboard or toolbox the view it's added to may still need to wire up the VM and the View. This might be in code behind or in the XAML.

Need a way of helping developers avoiding having to do this manually.

Ideas:

  • Add a context menu option to the XAML view to add an entry there
  • Add a context menu option to the codebehind to add an entry there (set datacontext | add VM property and initialize with new instance)
  • the above context menus based on filenames
  • the above context menus with VM selection from a list of options from within the project/solution
  • context menu on the VM to use for initialization on a view (based on naming convention or list) -- could be in XAML or CB.

Provide a way to handle different relative paths in subProperties

While a property binding path may require more than a property name, a nested sub-property path will likely not need/want this.
Add a configurable way to allow this.

See TODO in AnalyzerBase.cs which currently has the hardcoded removal of "ViewModel."
The simplest solution to this may be to provide a configurable value that should be removed, but it's worth exploring other possibilities.

Set up official build for VSIX

Need to set up and establish a process for creating official releases.

This needs to handle

  • build
  • signing
  • distribution to the VS Marketplace

Audio feedback?

As visual output is often minimal (just in status bar) it can be easy to miss.
Should we also provide (offer?) audible feedback too?

  • This goes doubly so for errors, exceptions, or situations when no output is created.

Need configuration for rules about where to create views

if generating the file from solution explorer context menu.

Need to consider the naming of the file and where to put it.

Naming may involve removing/replacing a suffix from the VM file name.
Location may be the same dir, a specific dir in the same project or a different project.

Also, need to specify/configure the template of the page the content will be added to.

Need to specify how the VM is wired up to the view

  • in code behind
  • in the XAML

some investigation needed

Analyzers to handle all options for getting properties

Original POC code only worked with a single file. This needs extending.

Needs to work with

  • inherited properties in the same file
  • inherited properties in another file in the same project
  • inherited properties in a file in a different project
  • inherited properties as native types
  • inherited properties in a separate library
  • classes in other files in the project
  • classes in other projects in the solution
  • classes of native type
  • classes in other compiled library
  • Getting sub-properties must work with inherited properties

Investigate: resolving datatype xml namespaces

Rather than generate

DataTemplate x:DataType="string">

It would be nice to instead get this:

DataTemplate x:DataType="x:String">

It will mean that more of the generated XAML will work without developer intervention.

It won't be able to do everything (e.g. custom types) but would be better than nothing.

Create a known limitations list

Needs to be written for a general readership

include (initially)

  • sub-properties
  • external libraries as base classes or types
  • internal symbol access (don't have as much detail as the compiler)

Need a logo

Will be used for the whole project, the VSIX & future items too.

Add support for F#

A popular question from people who've seen the early demos is "will this work with F#?"

There's no reason (AFAIK) that we couldn't do this but it's not a top priority.

Ensure VS Theme support

Ensure all UI reflects VS Theme selection.

Assigned to v1.1 as not a priority for initial launch

Require selection of an active profile on first use

Rather than default to a profile if none are selected, ask the user to choose one when first using the extension.

Context menus should not include functionality options when no profile is active. Instead, they should point to the settings (including a link) and require a profile be set to active.

Settings dialog should make clear if no profile is active and prompt to select one.

Need VS command icons

Need icons for

  • Copy to clipboard
  • Send to Toolbox
  • Create View
  • Open Options
  • Set Datacontext

Using $subprops$ for something with no sub properties should output a blank binding path

public ObservableCollection<string> Items { get; set; } currently produces

            <ListView ItemsSource="{x:Bind ViewModel.Items}">
                <ListView.ItemTemplate>
                    <DataTemplate x:DataType="x:String">
                        <StackPanel>
                            <TextBlock Text="{x:Bind Items}" />
                        </StackPanel>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>

It uses the fallback name of the sub-property entry.
But this isn't valid.

The sub-prop should be

<TextBlock Text="{x:Bind }" />

Check for inconsistent namespace aliases

Add a platform agnostic analyzer that checks for the use of different aliases for the same namespace in different files within the project (solution?)

Using consistent aliases throughout a codebase aids maintainability.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.