Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
165
ReadOnly - TextEditor with OneWay binding looses binding if focused - bug
posted

 

<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="auto"/>
        <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
        <RowDefinition/>
    </Grid.RowDefinitions>
    <TextBlock>Label</TextBlock>
    <TextBlock Grid.Row="1">XamText</TextBlock>
    <TextBlock Grid.Row="2">TextBox</TextBlock>
    <TextBlock Grid.Row="3">Inputable</TextBlock>
    <TextBlock Grid.Row="4">Another box</TextBlock>

    <TextBlock Grid.Column="1" Grid.Row="0" Text="{Binding Name}"/>
    <igEditors:XamTextEditor Grid.Column="1" Grid.Row="1"
Text="{Binding Name, Mode=OneWay}" IsReadOnly="True"/>
    <TextBox  Grid.Column="1" Grid.Row="2" 
Text="{Binding Name, Mode=OneWay}" IsReadOnly="True"/>
    <TextBox  Grid.Column="1" Grid.Row="3" Text="{Binding Name}"/>
<TextBox  Grid.Column="1" Grid.Row="4" Text="{Binding Value}"/>
</Grid>

1. Select the box right next to "Inputable" and type "123"

2. Then press tab. The text "123" appears at "Label", "XamText" and "TextBox"

3. Press tab 3 times, you should be in the box at "inputable" again.

4. Type "456" into this box and

5. press tab again ...

=> The XamTextEditor has lost its binding, if you focused it once. The text "123" is still visible in this box. The "normal" TextBox shows the right text.

This happens only if the XamTextEditor uses a oneway binding and is readonly.

A possible solution is to set "Focusable" to false, but then you won't be able to copy the text from the box, and actually it would behave like an disabled box ...

Parents
No Data
Reply
  • 138253
    Verified Answer
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking into it I can suggest you use the XamTextEditor’s Value Property instead of its Text Property, this way everything works as you want. Please let me know if this helps you or you need further clarifications on this matter.

     

    Looking forward for your reply.

Children
No Data