Ergebnis 1 bis 3 von 3
-
Fühle mich heimisch
- 12.04.2011, 18:55
- #1
Hallo Leute
Ich will einen Textblock programmatisch erstellen und dazu gehört auch ein Binding.
So sieht es in xaml aus:
<TextBox Height="89" HorizontalAlignment="Left" Margin="142,105,0,0" Name="notenBox" Text="{Binding note, Mode=TwoWay}" VerticalAlignment="Top" Width="318" />
Wie kann jetzt auf note im Programm binden?
Gruss
Cr3dos
-
- 13.04.2011, 19:49
- #2
Hier ist der Code den du brauchst:
Code:TextBox box = new TextBox(); box.SetBinding(TextBox.TextProperty, new System.Windows.Data.Binding("note") { Source = this, Mode= System.Windows.Data.BindingMode.TwoWay } );
-
Fühle mich heimisch
- 13.04.2011, 19:52
- #3
Vielen Dank für die Antwort und den Code
Ähnliche Themen
-
Enum an ListBox / ComboBox binden
Von EddieDean im Forum Windows Phone 7 EntwicklungAntworten: 0Letzter Beitrag: 23.03.2011, 11:03
Pixel 10 Serie mit Problemen:...