Bonjour
Je construit dynamiquement un organigramme
Quand j'ajoute des boutons il apparaissent bien
Par contre avec le même code j'ajoute des lable ou des textBlock ils n’apparaissent pas
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 Button txt = new Button(); txt.Width=50; txt.Height=50; txt.Content="OU"; txt.Visibility=System.Windows.Visibility.Visible; txt.VerticalAlignment=System.Windows.VerticalAlignment.Top; grdLine.Children.Add(txt); txt.Margin = new Thickness(0,-50,0,0); txt.SetValue(Grid.MarginProperty, new Thickness(0,- 50, 0, 0));
QQun aurait il une explication?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 Label txt = new Label(); txt.Width=50; txt.Height=50; txt.Content="OU"; txt.Visibility=System.Windows.Visibility.Visible; txt.VerticalAlignment=System.Windows.VerticalAlignment.Top; grdLine.Children.Add(txt); txt.Margin = new Thickness(0,-50,0,0); txt.SetValue(Grid.MarginProperty, new Thickness(0,- 50, 0, 0));
Merci
Partager