-1

I would like to change the label text of a group box outside the designer. I tried the content property but it it does not works. Any help ?

Zigma
  • 529
  • 6
  • 37

1 Answers1

0

Create a label inside the design like this :

<GroupBox Height="608" Margin="0,0,0,0"  Width="375" x:Name="grp1">
            <GroupBox.Header>
                <Label Foreground="Blue" x:Name="lblGroupHeader"></Label>
            </GroupBox.Header>
</GroupBox>

then In code :

lblGroupHeader.Content = "The Name"
Zigma
  • 529
  • 6
  • 37
  • what is this an edit to your question ? the content Property of the GroupBox is the Content(everything in the GroupBox, if you want to change the Header then change the Property from Content to Header maybe ? which you are setting – Mark Aug 25 '14 at 07:19
  • I think this is the answer. – Zigma Aug 25 '14 at 09:29