This is a migrated thread and some comments may be shown as answers.

Themming RadRichTextBox

5 Answers 82 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Artur
Top achievements
Rank 1
Artur asked on 20 Jul 2010, 01:36 PM
Hi,

I'm doing one page with two RadRichTextBox and two different themes. This themes are applied to all application, and not only to this components, in runtime (the user choose the theme he/she want). The problem is when i have this two components the default theme load, but when i try to change the theme, the browser crash. If i have only one component everything work perfectly.
The code i use to load the theme in run time is:
private void ChangeTheme_Click(object sender, RoutedEventArgs e)
        {
            ResourceDictionary rd = new ResourceDictionary();
            try
            {
                //Load resourse dictonary
                rd.Source = new Uri("/Itim.Framework.Silverlight.UI.Themes.Blue;component/Blue.xaml", UriKind.RelativeOrAbsolute);
                 
                //Clear previous styles if any...
                App.Current.Resources.MergedDictionaries.Clear();
                ////Add the loaded resource dictionary to the application merged dictionaries
                App.Current.Resources.MergedDictionaries.Add(rd);
                  
            }
            catch (System.Exception ex)
            {
                //If the path is wrong do something
                MessageBox.Show(ex.Message);
            }
        }

The version of telerik that i'm using is the last one (Q2 2010) for silverlight.

Thanks!

5 Answers, 1 is accepted

Sort by
0
Artur
Top achievements
Rank 1
answered on 20 Jul 2010, 05:15 PM
Hi again,

I found where the problem is, but i cannot fix (until now at least).
The problem is when i set the radrichtextbox datacontext to my class, to get the properties binding i wrote.

Is this some kind of bug or is my bug? in this case how can i fix?
0
Mike
Telerik team
answered on 21 Jul 2010, 08:36 AM
Hi Artur,

We need more information to be able to pinpoint the problem.
The best approach would be to open a support ticket and send us your application (or a runnable part of it) and describe the steps to reproduce the issue.

Best wishes,
Mike
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Artur
Top achievements
Rank 1
answered on 21 Jul 2010, 10:13 AM
Hi,

First of all, thanks for the quick reply.

Until now i was debuging my project to verify exactly where was the problem, and i notice the problem was when i try to change the borderThickness of the component. In my first version of the code i had one Border, and inside of that i had the RadRichTextBox (this stucture i will need, but for debug i delete the border), so now i have only the RadRichTextBox with one binding in borderThinkness property:
<telerik:RadRichTextBox x:Name="txta" Background="White" FontStretch="Condensed" BorderThickness="{Binding BorderThickness}" BorderBrush="{Binding BorderBrush}"
                                       MouseLeftButtonDown="txta_MouseLeftButtonDown" GotFocus="txta_GotFocus" />

Then i have two styles, the default with one setter to BorderThickness =  1 and one Blue theme with the BorderThickness = 2.
If i delete this setter everything works, so i think the main problem is here.

Thanks!
0
Accepted
Mike
Telerik team
answered on 26 Jul 2010, 05:27 PM
Hello Artur,

I tested a scenario similar to yours and was not able to reproduce the issue. Please see the attached app and let me know if I can help further.

Kind regards,
Mike
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Artur
Top achievements
Rank 1
answered on 27 Jul 2010, 05:15 PM
I found the problem in my code.
The problem was in the radrichtextbox i had one GotFocus event updating the editor layout.


Thanks for the help
Tags
RichTextBox
Asked by
Artur
Top achievements
Rank 1
Answers by
Artur
Top achievements
Rank 1
Mike
Telerik team
Share this question
or