Skip to content

Add design-time DataContext by default for MVUX/MVVM templates #1981

@kazo0

Description

@kazo0

Based on #22597

We should be including the design-time DataContext on the Pages when we have an MVVM or MVUX model as part of the template.

This would enhance the initial experience by properly providing users with Binding Intellisense (at least on Visual Studio) and would also serve as a hint to the users on how to properly define this design-time data for subsequent Pages and ViewModels that they may create later on in the project

Example:
d:DataContext="{d:d:DataContext="{d:DesignInstance Type=local:MainViewModel}"Type=local:MainViewModel}"

Source:
https://learn.microsoft.com/en-us/visualstudio/xaml-tools/xaml-designtime-data?view=visualstudio

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementNew feature or request.triage/untriagedIndicates an issue requires triaging or verification.
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions