The analyzer detected a possible error related to dependency property registration. Two dependency properties were registered under the same name within one class.
class A : DependencyObject
{
public static readonly DependencyProperty CurrentTimeProperty =
DependencyProperty.Register("CurrentTime",....);
public static readonly DependencyProperty OtherProperty =
DependencyProperty.Register("CurrentTime",....);
....
Because of copy-paste, the OtherProperty dependency property was registered under the name 'CurrentTime' instead of 'Other' as intended by the developer.
A correct way to register the dependency properties in the code above is as follows:
public static readonly DependencyProperty CurrentTimeProperty =
DependencyProperty.Register("CurrentTime",....);
public static readonly DependencyProperty OtherProperty =
DependencyProperty.Register("Other",....);
Was this page helpful?
Your message has been sent. We will email you at
If you do not see the email in your inbox, please check if it is filtered to one of the following folders:
Take
a chance!