UIElement vs FrameworkElement
-
26-10-2019 - |
Pergunta
I am unclear about when you would use a UIElement
as opposed to a FrameworkElement
, and why is there a FrameworkElement
class at at all. Essentially, what is the extra functionality that a FrameworkElement
provides as opposed to UIElement
?
Solução
You should never inherit from UIElement
(no class besides FrameworkElement
does), among other properties it has no DataContext
, whose lack can land you in some troubles.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow