WPF DefaultStyleKey vs DefaultStyleKeyProperty.OverrideMetadata

Alvaro Rivoir 6 Reputation points
2020-11-11T14:38:52.33+00:00

What is the difference between these

static XXXXXXX()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(XXXXXXX),
new System.Windows.FrameworkPropertyMetadata(typeof(XXXXXXX)));
}

and

public XXXXXXX()
{
DefaultStyleKey = typeof(C1XXXXXXX);
}

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,761 questions
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.