How to enforce that developers writing XAML in Visual Studio should follow certain standards and validations need to be run and if invalid compile time errors are thrown.
For example, making sure that all the databinding expressions (some are real long) are written correctly as per 'a custom validation' I would like implement, during design time. Like,
<TextBox Text="{Binding Source={StaticResource CALCULATED}, Converter={StaticResource XPathConverter}, ConverterParameter=@FIRSTNAME_STRING, XPath=@FIRSTNAME}"/>
In the above sample if the binding expression in the Text property is not in that format, there should be a compilation error.
Is there a way to do this?