Custom Control edit template cause compilation failure in Visual Studio 2019 (version 16.7 Preview 2)

Magesh Sankar 31 Reputation points

In Visual Studio 2019 version 16.7 Preview 2, while try to edit the template of my custom control using Edit Template option in designer which causes compilation failure due to empty properties fields generated. Please find the code genereate details.

Code in our source side

<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="HorizontalContentAlignment" Value="{x:Static HorizontalAlignment.Center}" />

Code generated while edit template

<Setter Property="FocusVisualStyle">

<Setter Property="HorizontalContentAlignment">

The issue reproduce only in Preview version and it working fine previous version.

Project Framework : 4.6v

Error : Severity Code Description Project File Line Suppression State
Error The tag 'Static' does not exist in XML namespace ''. Line 85 Position 22. ControlTesting MainWindow.xaml 85

Please suggest any solution to fix this.


Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,710 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Leon Laude 85,721 Reputation points


    Visual Studio is currently not supported in the Q&A forums, the supported products are listed over here (more to be added later on).

    You can ask the experts in the dedicated Visual Studio forum over here:

    (Please don't forget to accept helpful replies as answer)

    Best regards,

    0 comments No comments