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

RateApplicationReminder Style

2 Answers 62 Views
RateApplicationReminder
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Miroslav
Top achievements
Rank 1
Miroslav asked on 21 Feb 2013, 11:38 AM
Hi,

I have an app that supports different skins. One of them sets global style to buttons and checkboxes that makes them red. I noticed that this applies to the RateApplicationReminder control as well. However, the background stays the same and it's really hard to read the text this way. Is there any way to set the styles for the RateApplicationReminder control?

2 Answers, 1 is accepted

Sort by
0
Accepted
Todor
Telerik team
answered on 21 Feb 2013, 12:39 PM
Hi Miro,

Thank you for writing.

RadRateApplicationReminder uses our RadMessageBox. In order to style it, you need to override the default style for our message box in the resources of your page or in the whole application, for example in App.xaml add the following resource:
<Application.Resources>
    ...
    <Style TargetType="messageBox:RadMessageBoxControl">
        <Setter Property="Background"
            Value="{StaticResource PhoneChromeBrush}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="messageBox:RadMessageBoxControl">
                    <Border Padding="12"
                        Background="{TemplateBinding Background}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
 
                            <ContentControl x:Name="PART_Title"
                                        HorizontalContentAlignment="Left"
                                        FontSize="{StaticResource PhoneFontSizeLarge}"
                                        FontFamily="{StaticResource PhoneFontFamilySemiBold}"
                                        Margin="{StaticResource PhoneMargin}"/>
 
                            <ContentControl Grid.Row="1"
                                        HorizontalContentAlignment="Left"
                                        x:Name="PART_Message"
                                        Margin="12, 12, 12, 24"/>
 
                            <CheckBox x:Name="PART_CheckBox"
                                    Grid.Row="2"
                                    HorizontalAlignment="Left"
                                    VerticalAlignment="Bottom"/>
 
                            <ContentControl Grid.Row="3"
                                        x:Name="PART_ButtonsContainer"
                                        HorizontalContentAlignment="Stretch">
                                <ContentControl.ContentTemplate>
                                    <DataTemplate>
                                        <StackPanel x:Name="PART_ButtonsPanel"
                                                Orientation="Horizontal">
                                        </StackPanel>
                                    </DataTemplate>
                                </ContentControl.ContentTemplate>
                            </ContentControl>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</Application.Resources>

You can see how the background is set in the beginning and you can change it to the color of your choice.

Please note that the prefix messageBox here maps to the following namespace:
xmlns:messageBox="clr-namespace:Telerik.Windows.Controls.MessageBox;assembly=Telerik.Windows.Controls.Primitives"

I hope this information helps.

Kind regards,
Todor
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Miroslav
Top achievements
Rank 1
answered on 22 Feb 2013, 07:05 AM
Hi Todor,

Thanks for your help.

Tags
RateApplicationReminder
Asked by
Miroslav
Top achievements
Rank 1
Answers by
Todor
Telerik team
Miroslav
Top achievements
Rank 1
Share this question
or