Search code examples
c#wpfxamlvisual-studio-2017xname

x:Name in XAML WPF - Visual Studio Community 2017 BUG


I have used Visual Studio Community 2015 and there was no problem. Since I updated to 2017...well...there is some issues...

When I drop new object to grid in WPF...no default name...both in the property window and the XAML code...mostly I design applications using XAML code, I do not use the property window. It is very frustrating to type for each new object x:Name = "Button", "TextBox" etc...

And to make things worse...Visual Studio works like how he wants...one day this is the default, second day I have to manually write. In 2015 this was always the default. Has anyone had a similar experience, whether you need to adjust something or is this really a bug?


Solution

  • Go to: Tools->Options->XAML Designer Select: 'Automatically name interactive elements on creation'

    Now VS designer will name your new objects.