Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIElement vs FrameworkElement

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?

like image 504
mihajlv Avatar asked Sep 05 '11 19:09

mihajlv


1 Answers

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.

like image 133
H.B. Avatar answered Oct 16 '22 16:10

H.B.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!