我不清楚你什么时候会使用UIElement
而不是FrameworkElement
,为什么有一个FrameworkElement
类。从本质上来说,与UIElement
相比,FrameworkElement
提供的额外功能是什么?UIElement vs FrameworkElement
6
A
回答
3
你不应该从UIElement
继承(除FrameworkElement
之外没有其他类),除了其他属性,它没有DataContext
,它的缺点可能会给你带来麻烦。
+0
只是为了清楚UIElement不提供任何布局,数据绑定,样式,模板和资源。 – mihajlv
+1
@mihajlv:FrameworkElements做,UIElements不。 –
+0
@ H.B,如果UIElement没有参与布局,那么如何使用Measure和Arrange方法? –
相关问题
- 1. WPF/Silverlight中的UIElement vs FrameworkElement
- 2. WPF FrameworkElement父和移动UIElement
- 3. VisualStateManager.GoToState for FrameworkElement
- 4. 获取FrameworkElement边界矩形的坐标
- 5. 将ScrollViewer附加到FrameworkElement?
- 6. 谁能告诉我FrameworkElement obj = sender作为FrameworkElement和FrameworkElement obj =(FrameworkElement)之间的差异someobject
- 7. WPF样式使用的UIElement
- 8. 绘图的FrameworkElement的
- 9. 如何获得UIElement的家长?
- 10. C#UIElement LostTouchCapture OnLostTouchCapture
- 11. 是不是呈现的FrameworkElement?
- 12. WPF自定义FrameworkElement/IScrollInfo
- 13. 的UIElement零使用自定义的DependencyProperty
- 14. 块到UIElement转换
- 15. WPF:当一个FrameworkElement与其他FrameworkElement接触时如何获取事件
- 16. 派生UIElement - 如何获得焦点
- 17. C#每当另一个UIElement通过他时删除UIElement
- 18. 如何添加UIElement到列表<UIElement>?
- 19. 绑定到UiElement的UWP Relativepanel不起作用,像RelativePanel with propertie = UiElement
- 20. WPF:在另一个UIElement重叠的UIElement上触发mouseenter
- 21. 绑定命令中继到矩形Vs的菜单项(CanExecute()不叫)
- 22. WPF FrameworkElement未接收鼠标输入
- 23. FrameworkElement对象上的WPF MouseDown事件
- 24. 住宅“模板”式“FrameworkElement的”未找到
- 25. 如何获得FrameworkElement的真实位置?
- 26. 定义扩展FrameworkElement的Windows Phone中
- 27. 的Silverlight 3DROTATE +上的UIElement将
- 28. WPF CLR类型到UIElement
- 29. 如何重置WPF UIElement?
- 30. UIElement图像文件(WP7)
可能重复的[UIELement与WPF/Silverlight中的Frameworkelement](http://stackoverflow.com/questions/5956880/uielement-vs-frameworkelement-in-wpf-silverlight) – BoltClock
@mihajlv:事实上,答案该问题可能是错误的,与它是否重复无关。 –
@mihajlv:绑定也与调度程序无关...... –