I try to change the property Header
of an Expander to vary the title of this variable depending on but there is no way ...
If I add a constant to the Header, it works correctly;
<Expander Name="Header" Margin="4" Header="Config nivel 0"/>
But at the moment I perform a Binding on a variable in the part of the C # of ja to work and the field comes out empty ...
<Expander Name="Header" Margin="4" Header="{Binding Path=header}"/>
And here the part of the C # where I do the binding ...
public partial class ConfigNivel : UserControl
{
int number;
String header = "Configuración nivel ";
public ConfigNivel(int number)
{
this.number = number;
header += Convert.ToString(number);
InitializeComponent();
}
}
With the resulting result ...