6 Answers, 1 is accepted
You can apply a theme very easily using the follwong syntax:
<
telerik:RadCalendar
telerik:StyleManager.Theme
=
"Vista"
/>
All the best,
Dani
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
<
UserControl x:Class="Bulkmailapplication.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls"
xmlns:local="clr-namespace:Bulkmailapplication"
mc:Ignorable="d" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch"
d:DesignHeight="300" d:DesignWidth="400" >
<UserControl.Resources>
<telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
</UserControl.Resources>
<Grid HorizontalAlignment="Stretch" telerik:StyleManager.Theme="" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<telerik:RadButton Click="Button_Click" Grid.Row="0" HorizontalAlignment="Center" Content="Load Appointments" FontWeight="Bold" Margin="12" Padding="18 4" />
<telerik:RadBusyIndicator x:Name="busyIndicator" Grid.Row="1" BusyContent="Loading data....">
<telerik:RadScheduler telerik:StyleManager.Theme="Windows7" x:Name="scheduler" ViewMode="Day" />
</telerik:RadBusyIndicator>
</Grid>
</
UserControl>
You cannot set a Telerik theme to the <Grid /> panel. The Grid does not have any visual representation and is not themable via our themes.
You can try setting an application theme, if you wish for all controls to pick up the theme in your UserControl:
public
partial
class
MainPage : UserControl
{
public
MainPage()
{
StyleManager.ApplicationTheme =
new
VistaTheme();
// Required to initialize variables
InitializeComponent();
}
}
Please, note that MS native controls, such as ScrollViewer, Listbox, TextBox, etc. will not pick up the application theme and need to have their theme set explicitly.
I hope this helps.
All the best,
Dani
the Telerik team
I did the same as directed but the page is leep on loading no output. if i comet the line
StyleManager.ApplicationTheme =
new
VistaTheme();
It is working fine please let me know how can i proceed
Since there is no RadCalendar in the xaml you provided, my supposition is that you are referring to RadScheduler.
Please, check the attached very basic sample. It demonstrates how you can apply an application theme to a Silverlight application containing RadControls, including the RadScheduler control.
If you have further questions on using the RadScheduler control, please submit them in the RadScheduler forum.
I hope this will be helpful.
Best wishes,
Dani
the Telerik team