Skip to content

Sample project that demonstrates design-time data capabilities for WPF .NET Core & UWP developers added to Visual Studio 2019 in Update 16.7

Notifications You must be signed in to change notification settings

LyalinDotCom/XAMLDesignTimeSamples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XAMLDesignTimeSamples

Demo app the showcase the capabilites of design-time data for .NET desktop applcations powered by XAML (WPF .NET Core & UWP).

Getting Started:

  • This feature was first introduced in Visual Studio 2019 16.7 Preview 3. While in preview you might have to turn the feature on in settings even if you have the preview installed ( “Options > Environment > Preview Features” and enable “Expanded Design-time Data Support”)

Known Issues

  • UserControls hosted in parent page don't render d:: UserControls can be created and visualized using design-time data, but when hosted in a parent page the design-time data using d: won't be a consistent experience and likely not show up. We're working to improve this experience in 16.8 timeframe.

Limitations

UWP apps don't support <x:Array>: While WPF samples often use <x:Array> inside a lists/grids/etc ItemSource to produce design-time data, this isn't supported for UWP apps. Alternative is to add design-time items under Items collection. Example:

<ListView ItemTemplate="{StaticResource ItemUserControlTemplate}">
 <d:ListView.Items>
   <local:Item LabelOne="test" LabelTwo="test 2"/>
   <local:Item LabelOne="test" LabelTwo="test 2"/>
   <local:Item LabelOne="test" LabelTwo="test 2"/>
 </d:ListView.Items>
</ListView>

Credit: thank you to Cosmin Stirbu for bringing up this issue using a VS Community feedback ticket.

Resources:

About

Sample project that demonstrates design-time data capabilities for WPF .NET Core & UWP developers added to Visual Studio 2019 in Update 16.7

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages