Skip to content

ContentPresenter.Content is not inheriting its content #5

Open
@samoteph

Description

@samoteph

If I try to redefine the template of a button like this the contentpresenter doesn't work. But with ContentControl it's working !

<Style x:Name="EmptyButtonStyle" TargetType="Button">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="Button">
                <ContentControl Content="{TemplateBinding Content}"/>
                <!--<ContentPresenter></ContentPresenter>-->
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions