This question is locked. New answers and comments are not allowed.
RadRichTextBox seems to have some kind of binding problem if the UserControl holding the RadRichTextBox isn't visible on screen when the Bind is supposed to happen.
It is somewhat complex to describe, but what I try to accomplish is some background loading of data. I have a TransitionControl whose Content is bound to the Tag of the SelectedItem of a RadTreeview. Rather basic stuff that works OK when configured as "default".
The loaded UserControls all have their own DomainDataSource. If I configure the DomainDataSource for AutoLoad, everything works as expected, all Bindings are working and all data is visible when the UserControl is activated in the TransitionControl. The problem is that the DomainDataSource Load isn't triggered until I actually load the UserControl in the TransitionControl; a fact that has a number of unwanted effects for me.
So, I have written a Load() public method in the UserControls that triggers the DomainDataSource load, and I call this method as soon as I have instantiated the UserControl(s). The effect is that the DomainDataSource load is performed in the background and the data is already present when the user selects the entry in the TreeView and the UserControl gets loaded into the TransitionControl the first time.
And now to get back to the problem at hand; When performing this background load, all Binding works except for RadRichTextBox. When the user selects the UserControl the first time, all controls have their bound data except for the RichTextBox that is empty. If the user selects another UserControl (i.e. loads another UserControl in the TransitionControl) and then re-selects this one, all controls including the RichTextBox have their bound data.
Since it is the same instance of the UserControl and all data is pre-loaded, the only difference between the first and second display of the UserControl is just that - the first and second time it is displayed through the TransitionControl. So, why isn't the RichTextBox content displayed the first time the UserControl is displayed?
Example of UserControl creation and Load method call:
TransitionControl basics:
RichTextBox things...
Since all other controls in the same UserControl bind to and display their data correctly on the first attempt, the load/bind functionality seems to be intact. It is only the RadRichTextBox that refuse to display the bound data on the first UserControl display but displays it correctly on subsequent displays.
Am I doing something wrong or is this a bug?
It is somewhat complex to describe, but what I try to accomplish is some background loading of data. I have a TransitionControl whose Content is bound to the Tag of the SelectedItem of a RadTreeview. Rather basic stuff that works OK when configured as "default".
The loaded UserControls all have their own DomainDataSource. If I configure the DomainDataSource for AutoLoad, everything works as expected, all Bindings are working and all data is visible when the UserControl is activated in the TransitionControl. The problem is that the DomainDataSource Load isn't triggered until I actually load the UserControl in the TransitionControl; a fact that has a number of unwanted effects for me.
So, I have written a Load() public method in the UserControls that triggers the DomainDataSource load, and I call this method as soon as I have instantiated the UserControl(s). The effect is that the DomainDataSource load is performed in the background and the data is already present when the user selects the entry in the TreeView and the UserControl gets loaded into the TransitionControl the first time.
And now to get back to the problem at hand; When performing this background load, all Binding works except for RadRichTextBox. When the user selects the UserControl the first time, all controls have their bound data except for the RichTextBox that is empty. If the user selects another UserControl (i.e. loads another UserControl in the TransitionControl) and then re-selects this one, all controls including the RichTextBox have their bound data.
Since it is the same instance of the UserControl and all data is pre-loaded, the only difference between the first and second display of the UserControl is just that - the first and second time it is displayed through the TransitionControl. So, why isn't the RichTextBox content displayed the first time the UserControl is displayed?
Example of UserControl creation and Load method call:
iwAction iwu =
new
iwAction();
iwu.DataContext =
this
.DataContext;
iwu.Load(
"0"
);
this
.twUserAction.Tag = iwu;
TransitionControl basics:
<
telerik:RadTransitionControl
x:Name
=
"iwContent"
Grid.Row
=
"1"
Duration
=
"00:00:00.25"
Content
=
"{Binding SelectedItem.Tag, ElementName=IncidentTree}"
Padding
=
"5"
Background
=
"Transparent"
>
RichTextBox things...
<
telerik:RadRichTextBox
Grid.Row
=
"4"
x:Name
=
"editor"
Height
=
"130"
DocumentInheritsDefaultStyleSettings
=
"True"
Margin
=
"3"
Grid.Column
=
"1"
>
<
telerik:RadRichTextBox.Resources
>
<
telerikDocumentsHtml:HtmlDataProvider
x:Key
=
"HtmlProvider"
RichTextBox
=
"{Binding ElementName=editor}"
Html
=
"{Binding Body, Mode=TwoWay}"
/>
</
telerik:RadRichTextBox.Resources
>
</
telerik:RadRichTextBox
>
Since all other controls in the same UserControl bind to and display their data correctly on the first attempt, the load/bind functionality seems to be intact. It is only the RadRichTextBox that refuse to display the bound data on the first UserControl display but displays it correctly on subsequent displays.
Am I doing something wrong or is this a bug?