Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
665
Padding and styles
posted

If I set padding for any of the editors in a Style, the padding value is 'lost' when going into edit mode. If I set it in the control XAML line, it is applied for the edit mode also.

Any ideas how to overcome this behaviour?

 

 

 

  • 54937
    Offline posted

    I think the default template has a controltemplate trigger that sets the Padding when IsEmbedded is false and control template triggers take precedence over a style setter. You would probably need to use a Style trigger to override the template trigger. 

    <Style TargetType="{x:Type igEditors:XamMaskedEditor}">
        <Style.Triggers>
            <Trigger Property="IsEmbedded" Value="False">
                <Setter Property="Padding" Value="10" />
            </Trigger>
        </Style.Triggers>
    </Style>