Difference between ContentControl and ContentPresenter?
ContentPresenter is a lightweight element. It's derived from FrameworkElements class. So, It has no Template property (i.e.) we can't set control Template for it, while we can set data template for it as it has Content property.
ContentPresenter has a addition property 'ContentSource' which is not present in Content Control.
Default value of 'ContentSource' property is content, So when we will put ContentPresenter inside of ControlTemplate we don't need to define binding explicitly.
ContentControl also uses ContentPrenseter in it's template to display data.
No comments:
Post a Comment