This is a migrated thread and some comments may be shown as answers.
RadBusyIndicator is removing my theme
3 Answers 54 Views
This is a migrated thread and some comments may be shown as answers.
Linus
Top achievements
Rank 1
Linus asked on 09 Jan 2012, 11:46 AM
I have a view with a couple of regular Silverlight TextBlocks and TextBoxes which are nicely styled using Expression_Dark theme on the application level. But then I wrap a RadBusyIndicator around my controls and the styling goes away.

Why is this? It does not help to explicitly set the them on the RadBusyIndicator control.

Thankful for any help.

3 Answers, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 10 Jan 2012, 10:24 AM
Hi,

Application themes take effect on RadControls only. For native MS Silverlight controls like TextBlocks and TextBoxes, you will need to apply the theme explicitly.

A working sample:
<telerik:RadBusyIndicator IsBusy="True">
            <Grid Width="300">
                <TextBlock Text="TextBlock" VerticalAlignment="Center" telerik:StyleManager.Theme="Expression_Dark" />  
                <TextBox Margin="100 0" Width="100" VerticalAlignment="Center" telerik:StyleManager.Theme="Expression_Dark" />              
            </Grid>         
        </telerik:RadBusyIndicator>

public MainPage()
        {
            // Required to initialize variables
              
            StyleManager.ApplicationTheme = new Expression_DarkTheme();
            InitializeComponent();
        }

Hope this helps.

Kind regards,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Linus
Top achievements
Rank 1
answered on 16 Jan 2012, 05:14 PM
Hi!

Thanks for you reply. Unfortunately it didn't help me and I would very much like to know what I'm doing wrong. Even when explicitly setting the theme on the TextBlock I don't get the correct theme. Or atleast I suppose so.

In my regular app I have a nice grey background and a light-grey/white color of my TextBlocks (without explicitly setting the theme). In my new Test app I get the result you can see in the attached radthemes.png file. I don't even use RadBusyIndicator which introduced the problem in my regular app. Two things bother me in the test app:

* The background is white, why not grey? I'm setting the ApplicationTheme to Expression_Dark in the ctor before InitializeComponent().
* The TextBlocks are both black and there's seemingly no difference between the one with the theme and the one without.

My page:
<Grid x:Name="LayoutRoot" >
    <StackPanel>
        <TextBlock Text="TextBlock without theme" HorizontalAlignment="Center" Margin="5 5 5 5"/>
        <TextBlock Text="TextBlock with theme" HorizontalAlignment="Center" telerik:StyleManager.Theme="Expression_Dark" Margin="5 5 5 5"/>
        <TextBox Width="300" Text="TextBox without theme" Margin="5 5 5 5"/>
        <TextBox Width="300" Text="TextBox with theme" Margin="5 5 5 5"
                 telerik:StyleManager.Theme="Expression_Dark"
                 />
        <telerik:RadButton Width="300" Content="RadButton" Margin="5 5 5 5"/>
    </StackPanel>
</Grid>

0
Accepted
Dani
Telerik team
answered on 17 Jan 2012, 09:39 AM
Hi Linus,

The TextBlock is not a themeable control, meaning we do not provide Styles for it in our themes. So applying a theme to it will not result in changing its appearance. If you need a control displaying text as a caption, I suggest  you try using a Label. The Label is themable via our themes and you will be able to take advantage of the Expression Dark style for it.


Kind regards,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Asked by
Linus
Top achievements
Rank 1
Answers by
Dani
Telerik team
Linus
Top achievements
Rank 1
Share this question
or