Search code examples
wpfheaderdevexpresstile

Some questions of tile group header template - get value of group header, change automatically group header at editing


I'm using devexpress TileLayoutControl. I'm trying to custom the header template of group.

I do this :

<devexpress:TileLayoutControl.GroupHeaderTemplate>
                <DataTemplate>
                    <local:EditableTextBoxHeader Texte="{Binding Path=???}" TexteColor="Black" FontSize="{StaticResource TaillePoliceGrande}" FontWeight="Bold"/>
                </DataTemplate>      
</devexpress:TileLayoutControl.GroupHeaderTemplate>

1) i'm using a user control, but i don't know how to get the text value of group header ?

2) if i use my own control for the header, if i set AllowGroupHeaderEditing="True", is the tile where I change the group header will be update automatically ? Or I need to use the "default" header template to do this ?

Thanks for reply.


Solution

  • I answer my questions :

    1) it's TemplateBinding Content to get the value

    <devexpress:TileLayoutControl.GroupHeaderTemplate>
                    <DataTemplate>
                        <local:EditableTextBoxHeader Texte="{TemplateBinding Content}" TexteColor="Black" FontSize="{StaticResource TaillePoliceGrande}" FontWeight="Bold"/>
                    </DataTemplate>      
    </devexpress:TileLayoutControl.GroupHeaderTemplate>
    

    2) i used the default textbox in template and added my own others control in it.