This question is locked. New answers and comments are not allowed.
Hi there,
I found a bug in RadTextBox, namely
if I clear the Text in RadTextBox by using the "X" clear button and then later assign the DataContext Property the RadTextBox does nothing... it still has an empty text inside.
I've have a demo project:
The Version of Telerik Controls: 2012.3.1211.3040
Test Scenario:
As you can see the standart WP8 TextBox handles DataContext_Changed event and displays the text.
I have,
ViewModel
and button click event:
best regards,
Vladimir.
I found a bug in RadTextBox, namely
if I clear the Text in RadTextBox by using the "X" clear button and then later assign the DataContext Property the RadTextBox does nothing... it still has an empty text inside.
I've have a demo project:
The Version of Telerik Controls: 2012.3.1211.3040
Test Scenario:
- Open App.
- Tap button
- Clear text by using the "X" button.
- Tap Button again.
- Expected result: Text in RadTextBox
- Actual Result: Text is empty.
As you can see the standart WP8 TextBox handles DataContext_Changed event and displays the text.
I have,
<StackPanel x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <controls:RadTextBox Text="{Binding Text}" Height="100" Name="tnText"></controls:RadTextBox> <Button Click="ButtonBase_OnClick" Height="78">Set Data Context</Button> <TextBox Text="{Binding Text}" Height="72" TextWrapping="Wrap" /> </StackPanel>ViewModel
public class ViewModel : INotifyPropertyChanged { private string _text; public string Text { get { return _text; } set { _text = value; OnPropertyChanged(); } } public event PropertyChangedEventHandler PropertyChanged; [NotifyPropertyChangedInvocator] protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) { PropertyChangedEventHandler handler = PropertyChanged; if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName)); } }and button click event:
private void ButtonBase_OnClick(object sender, RoutedEventArgs e) { this.DataContext = new ViewModel { Text = "13222" }; }best regards,
Vladimir.