<UserControl x:Class="CSharp.SilverlightDemo.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="clr-namespace:Telerik.ReportViewer.Silverlight;assembly=Telerik.ReportViewer.Silverlight"    
    xmlns:telerikNav="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
    xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
    xmlns:telerikPrimitives ="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
    xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
             xmlns:local="clr-namespace:CSharp.SilverlightDemo"
    mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">

    <Grid x:Name="LayoutRoot">
        <Image Source="/CSharp.SilverlightDemo;component/images/BgOfficeBlack.jpg" Stretch="Fill" />
        <Grid HorizontalAlignment="Center" Margin="20" >
            <Grid.RowDefinitions>
                <RowDefinition Height="50" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <Grid Grid.Row="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="auto"/>
                </Grid.ColumnDefinitions>

                <StackPanel Grid.Column="1" Orientation="Horizontal">
                    <TextBlock Text="Theme:" Margin="5, 0" FontWeight="Bold" Foreground="Gray" VerticalAlignment="Center"/>
                    <telerikInput:RadComboBox x:Name="ThemeSelector" 
                                          Width="120"
                                          VerticalAlignment="Center"
                                          SelectedIndex="0">
                        <telerikControls:Office_BlackTheme />
                        <telerikControls:Office_BlueTheme />
                        <telerikControls:Office_SilverTheme />
                        <telerikControls:SummerTheme />
                        <telerikControls:Windows7Theme />
                        <telerikControls:VistaTheme />
                        <telerikControls:Expression_DarkTheme />
                        <telerikControls:TransparentTheme />
                    </telerikInput:RadComboBox>
                </StackPanel>
                <Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="112,11,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" />
            </Grid>

            <telerik:ReportViewer Grid.Row="1" x:Name="ReportViewer1" 
                                  Width="1000"
                                  telerikControls:StyleManager.Theme="{Binding SelectedItem, ElementName=ThemeSelector}"
                                  ReportServiceUri="../ReportService.svc"
                                  Report="Telerik.Reporting.Examples.CSharp.Report1, CSharp.ReportLibrary" RenderBegin="ReportViewer1_RenderBegin_3" UseNativePrinting="False" />
        </Grid>
    </Grid>
</UserControl>
