ReSharper: the 'Name' attribute is not allowed here; use "x: Name" instead of XAML

ReSharper complains about some of my XAML with the following error:

Attribute

'Name' is prohibited here because the type "FlashingTextBlock" implemented in the same project. using 'x: Name' instead

What is the problem? Should I do what he says?

+4
source share
2 answers

See great explanations in this answer and decide for yourself;)

In WPF, what are the differences between x: Name and Name attributes?

+3
source

Does FlashingTextBlock have a System.Windows.Markup.RuntimeNameProperty attribute?

According to Adam Nathan's Windows Presentation Foundation Unleashed:

... you can simply set its Name property to a string, rather than using the x: Name syntax. You can use either mechanism, but you cannot use both at the same time.

0
source

Source: https://habr.com/ru/post/1309961/


All Articles