I am developing a custom control derived from System.Windows.Controls.ContentControl. In the controls default template (themes\generic.xaml), I use a Border element that wraps the actual content.
Does my custom control already implement margin and padding (i.e., shrink the border according to the padding set on the custom control) or do/can I decide myself, where margin and padding are applied (i.e., set the margin and padding properties on the border element to {TemplateBinding Margin}
etc.
Thanks in advance!
Margin is implemented I believe all the way down in Framework element. However Padding is not. ContentControl has the "PaddingProperty" but by default it doesn't do anything. Basically you bind the MarginProperty of the Content to the Padding property of the content control.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With