question

CarolinaGritti-4365 avatar image
0 Votes"
CarolinaGritti-4365 asked CarolinaGritti-4365 answered

d:Text property does not exist in namespace http://schemas.microsoft.com/expression/blend/2008

Hi,

i'm working on a WPF application on Visual Studio 2019 version 16.8.3.
I need to use design time data.
I followed what is written in this article
https://docs.microsoft.com/en-us/visualstudio/xaml-tools/xaml-designtime-data?view=vs-2019

But when i try to add a TextBlock in this way

<TextBlock Text="{Binding Name}" d:Text="Name!" />

designer says that "Text property does not exist in namespace http://schemas.microsoft.com/expression/blend/2008"

Any suggestions?
Thanks!


dotnet-csharpwindows-wpfdotnet-wpf-xaml
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Viorel-1 avatar image
2 Votes"
Viorel-1 answered Viorel-1 edited

It seems that the feature is available in .NET Core and .NET 5 projects. Try experimenting with a new “WPF Application” instead of “WPF App (.NET Framework)”.

In case of .NET Framework, try enabling an option: menu, Tools, Options, Environment, Preview Features, “New WPF XAML Designer…”. Then restart Visual Studio.

Make sure the the <Window> contains the definitions of xmlns:d and xmlns:mc, which usually are already present by default.

Also consider updating Visual Studio.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

CarolinaGritti-4365 avatar image
0 Votes"
CarolinaGritti-4365 answered

Thank you very much!

First i tried with a new “WPF Application” (not “WPF App (.NET Framework)”) and it works!

But then i updated Visual Studio and enabled the option “New WPF XAML Designer…” and it works also with a WPF App (.NET Framework) application.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.