Close button of Report Viewer not working in Silverlight.
xmlns:telerikControl="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
xmlns:telerik1="clr-namespace:Telerik.ReportViewer.Silverlight;assembly=Telerik.ReportViewer.Silverlight"
xmlns:Telerik_ReportViewer_Silverlight="clr-namespace:Telerik.ReportViewer.Silverlight;assembly=Telerik.ReportViewer.Silverlight"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation
<Style x:Key="ReportViewerStyle" TargetType="Telerik_ReportViewer_Silverlight:ReportViewer">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Telerik_ReportViewer_Silverlight:ReportViewer">
<Grid x:Name="LayoutRoot" DataContext="{x:Null}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="ExportReportStateGroup">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0"/>
</VisualStateGroup.Transitions>
<VisualState x:Name="ExportNoExportState"/>
<VisualState x:Name="ExportInProgressState">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ExportDialog">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ExportProgressBar">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="ExportCompleteState">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ExportDialog">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="PrintReportStateGroup">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0"/>
</VisualStateGroup.Transitions>
<VisualState x:Name="PrintNoPrintState"/>
<VisualState x:Name="PrintInProgressState">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PrintDialog">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PrintProgressBar">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="PrintCompleteState">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PrintDialog">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Collapsed</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="ViewerStateGroup">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0"/>
</VisualStateGroup.Transitions>
<VisualState x:Name="ViewerPageState"/>
<VisualState x:Name="ViewerErrorState">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ViewerError">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PageScrollViewer">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Collapsed</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="ViewerWorkInProgressState">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ViewerProgressMessage">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border BorderBrush="{StaticResource OuterControlBorderBrush}" BorderThickness="1" CornerRadius="6">
<Border BorderBrush="{StaticResource InnerControlBorderBrush}" BorderThickness="1" Background="{StaticResource ControlBackgroundBrush}" CornerRadius="5" Margin="0" Padding="6">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="6"/>
<RowDefinition Height="*"/>
<RowDefinition Height="6"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<telerik:RadToolBar Grid.Row="0" telerik:StyleManager.Theme="{StaticResource Theme}" IsEnabled="True">
<telerik:RadComboBox DisplayMemberPath="LocalizedName" Height="24" ItemsSource="{Binding RenderingExtensions}" IsEnabled="{Binding IsExportEnabled}" Margin="1,0" MaxDropDownHeight="300" Padding="2,0" SelectedItem="{Binding SelectedRenderingExtension, Mode=TwoWay}" Width="45">
<telerik:RadComboBox.EmptySelectionBoxTemplate>
<DataTemplate>
<Image HorizontalAlignment="Left" Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/Export.png" Width="16"/>
</DataTemplate>
</telerik:RadComboBox.EmptySelectionBoxTemplate>
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.ExportToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
</telerik:RadComboBox>
<telerik:RadButton x:Name="PrintButton" BorderThickness="0" Command="{Binding PrintReportCommand}" Margin="0,2" Padding="2" telerik:StyleManager.Theme="{StaticResource Theme}">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.PrintToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/Print.png" Width="16"/>
</telerik:RadButton>
<telerik:RadToolBarSeparator/>
<telerik:RadButton x:Name="CloseButton" Command="{Binding NavigateBackCommand}" Margin="0" Padding="2" Height="20"
Content="Close" Click="ReportViewerCloseButton_Click" telerik:StyleManager.Theme="{StaticResource Theme}">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.BackToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
</telerik:RadButton>
<telerik:RadToolBarSeparator Height="20" Margin="2,0"/>
<telerik:RadComboBox HorizontalAlignment="Center" IsEditable="True" ItemsSource="{Binding AvailableZoomValues}" IsTextSearchEnabled="False" Margin="10, 0, 3, 0" MaxDropDownHeight="300" Text="{Binding ZoomText, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" VerticalAlignment="Center" Width="70">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.ZoomToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
</telerik:RadComboBox>
<telerik:RadSlider HandlesVisibility="Visible" Maximum="100" Minimum="-100" SmallChange="10" telerik:StyleManager.Theme="{StaticResource Theme}" Value="{Binding Zoom, Converter={StaticResource ScaleFactorConverter}, Mode=TwoWay}" VerticalAlignment="Center" Width="137">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.ZoomToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
</telerik:RadSlider>
<telerik:RadToolBarSeparator/>
<telerik:RadButton Command="{Binding MoveToFirstPageCommand}" Margin="0,2" Padding="2">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.FirstPageToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/FirstPage.png" Width="16"/>
</telerik:RadButton>
<telerik:RadButton Command="{Binding MoveToPreviousPageCommand}" Margin="0,2" Padding="2">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.PreviousPageToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/PrevPage.png" Width="16"/>
</telerik:RadButton>
<telerik:RadToolBarSeparator/>
<Telerik_ReportViewer_Silverlight:TextBoxEx Telerik_ReportViewer_Silverlight:KeyDown.Command="{Binding NavigateToSpecificPageCommand}" IsEnabled="{Binding IsMoveToPageEnabled}" Margin="10, 0, 0, 0" MinWidth="30" TextAlignment="Center" Text="{Binding PageNumberModel, Mode=TwoWay}" VerticalAlignment="Center">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.CurrentPageToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
</Telerik_ReportViewer_Silverlight:TextBoxEx>
<TextBlock Margin="2, 0, 10, 0" TextAlignment="Center" Text="{Binding PageCount, ConverterParameter=of \{0\} pages, Converter={StaticResource FormatedNumberConverter}}" VerticalAlignment="Center">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.TotalPagesToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
</TextBlock>
<telerik:RadToolBarSeparator/>
<telerik:RadButton Command="{Binding MoveToNextPageCommand}" Margin="0,2" Padding="2">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.NextPageToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/NextPage.png" Width="16"/>
</telerik:RadButton>
<telerik:RadButton Command="{Binding MoveToLastPageCommand}" Margin="0,2" Padding="2">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.LastPageToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/LastPage.png" Width="16"/>
</telerik:RadButton>
<telerik:RadToolBarSeparator/>
<telerik:RadButton Command="{Binding RefreshReportCommand}" Margin="0,2" Padding="2">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.RefreshToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/Refresh.png" Width="16"/>
</telerik:RadButton>
<telerik:RadToolBarSeparator/>
<telerik:RadButton Command="{Binding NavigateBackCommand}" Margin="0,2" Padding="2" Visibility="Collapsed">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.BackToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/NavBack.png" Width="16"/>
</telerik:RadButton>
<telerik:RadButton Command="{Binding NavigateForwardCommand}" Margin="0,2" Padding="2" Visibility="Collapsed">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.ForwardToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/NavForward.png" Width="16"/>
</telerik:RadButton>
<telerik:RadToggleButton IsChecked="{Binding IsDocumentMapVisible, Mode=TwoWay}" IsEnabled="{Binding IsToggleDocumentMapEnabled}" Margin="0,2" Padding="2" Visibility="{Binding HasDocumentMap, Converter={StaticResource VisibilityConverter}}">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding DocumentMapToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/DocumentMap.png" Width="16"/>
</telerik:RadToggleButton>
<telerik:RadToggleButton IsChecked="{Binding IsParametersAreaVisible, Mode=TwoWay}" IsEnabled="{Binding IsToggleParametersAreaEnabled}" Margin="0,2" Padding="2" Visibility="{Binding HasParameters, Converter={StaticResource VisibilityConverter}}">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding ParametersToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/Parameters.png" Width="16"/>
</telerik:RadToggleButton>
</telerik:RadToolBar>
<Border x:Name="ParametersAreaPane" Grid.Row="1" Visibility="{Binding IsParametersAreaVisible, Converter={StaticResource VisibilityConverter}}">
<Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Telerik_ReportViewer_Silverlight:ReportParametersControl Foreground="{StaticResource ForegroundBrush}" IsTabStop="False" ItemsSource="{Binding ParameterModels}" ParameterTemplateSelector="{StaticResource ReportParameterEditorTemplateSelector}">
<Telerik_ReportViewer_Silverlight:ReportParametersControl.ItemsPanel>
<ItemsPanelTemplate>
<telerik:RadUniformGrid Columns="2"/>
</ItemsPanelTemplate>
</Telerik_ReportViewer_Silverlight:ReportParametersControl.ItemsPanel>
</Telerik_ReportViewer_Silverlight:ReportParametersControl>
</Grid>
<Grid Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Bottom">
<telerik:RadButton Content="Preview" Command="{Binding ApplyReportParametersCommand}" Margin="3" Padding="10, 3" telerik:StyleManager.Theme="{StaticResource Theme}" Visibility="{Binding IsPreviewButtonVisible, Converter={StaticResource VisibilityConverter}}"/>
</Grid>
</Grid>
</Grid>
</Border>
<Grid Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding DocumentMapWidth, Mode=TwoWay}"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border x:Name="DocumentMapPane" Grid.Column="0" HorizontalAlignment="Stretch" Visibility="{Binding IsDocumentMapVisible, Converter={StaticResource VisibilityConverter}}" VerticalAlignment="Stretch">
<Border BorderBrush="{StaticResource OuterViewerAreaBorderBrush}" BorderThickness="1" CornerRadius="4" Margin="0, 0, 0, 0">
<Border BorderBrush="{StaticResource InnerViewerAreaBorderBrush}" BorderThickness="1" Background="{StaticResource InnerViewerAreaBackground}" CornerRadius="3" Margin="0">
<telerik:RadTreeView x:Name="DocumentMapTreeView" Background="{StaticResource InnerViewerAreaBackground}" ItemsSource="{Binding DocumentMapNodes}" SelectedItem="{Binding SelectedDocumentMapNode, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}">
<telerik:RadTreeView.ItemTemplate>
<telerik:HierarchicalDataTemplate telerik:ContainerBinding.ContainerBindings="{StaticResource DocumentMapItemBindingsCollection}" ItemsSource="{Binding Children}">
<TextBlock Text="{Binding Text}"/>
</telerik:HierarchicalDataTemplate>
</telerik:RadTreeView.ItemTemplate>
</telerik:RadTreeView>
</Border>
</Border>
</Border>
<sdk:GridSplitter Background="Transparent" Grid.Column="1" HorizontalAlignment="Center" Opacity="0" ShowsPreview="True" Visibility="{Binding IsDocumentMapVisible, Converter={StaticResource VisibilityConverter}}" VerticalAlignment="Stretch" Width="3"/>
<Border BorderBrush="{StaticResource OuterViewerAreaBorderBrush}" BorderThickness="1" Grid.Column="2" CornerRadius="4">
<Border BorderBrush="{StaticResource InnerViewerAreaBorderBrush}" BorderThickness="1" Background="{StaticResource InnerViewerAreaBackground}" CornerRadius="3" Margin="0">
<Grid>
<ScrollViewer x:Name="PageScrollViewer" BorderThickness="0" telerik:ScrollViewerExtensions.EnableMouseWheel="True" HorizontalScrollBarVisibility="Auto" telerik:StyleManager.Theme="{StaticResource Theme}" Visibility="Visible" VerticalScrollBarVisibility="Visible">
<ContentControl x:Name="PageContentControl">
<ContentControl.Resources>
<ControlTemplate x:Key="PrintPreviewTemplate">
<Border x:Name="PageBorder" BorderBrush="{StaticResource PageBorderBorderBrush}" BorderThickness="1" Background="{StaticResource PageBorderBackground}" Height="{Binding PageHeight}" Margin="10" Width="{Binding PageWidth}">
<ContentPresenter/>
</Border>
</ControlTemplate>
<ControlTemplate x:Key="InteractiveTemplate">
<ContentPresenter HorizontalAlignment="Left" Margin="10" VerticalAlignment="Top"/>
</ControlTemplate>
</ContentControl.Resources>
<telerik:LayoutTransformControl x:Name="PageContainer" Content="{Binding PageRoot}" LayoutTransform="{Binding PageTransform}"/>
</ContentControl>
</ScrollViewer>
<Telerik_ReportViewer_Silverlight:DialogBox x:Name="ViewerProgressMessage" Visibility="Collapsed">
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<TextBlock HorizontalAlignment="Center" Text="{Binding ProgressMessage}" VerticalAlignment="Center"/>
<telerik:RadProgressBar Grid.Row="1" Style="{StaticResource ProgressBarStyle}"/>
</Grid>
</Telerik_ReportViewer_Silverlight:DialogBox>
<customControl:CTextBox x:Name="ViewerError" BorderThickness="0" Background="{StaticResource InnerViewerAreaBackground}" Foreground="{StaticResource ErrorMessageForeground}" FontFamily="Verdana" HorizontalAlignment="Stretch" IsReadOnly="True" Padding="20" TextAlignment="Center" TextWrapping="Wrap" Text="{Binding Error}" Visibility="Collapsed" VerticalAlignment="Stretch"/>
<Telerik_ReportViewer_Silverlight:DialogBox x:Name="ExportDialog" Visibility="Collapsed">
<Grid Width="270">
<Grid.RowDefinitions>
<RowDefinition Height="100"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid HorizontalAlignment="Stretch" Margin="20" VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<TextBlock HorizontalAlignment="Center" Text="{Binding ExportProgress}" VerticalAlignment="Center"/>
<telerik:RadProgressBar x:Name="ExportProgressBar" Grid.Row="1" Style="{StaticResource ProgressBarStyle}" Visibility="Collapsed"/>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<telerik:RadButton Content="Save" Grid.Column="1" Command="{Binding SaveExportCommand}" Margin="5" Padding="10, 3" telerik:StyleManager.Theme="{StaticResource Theme}"/>
<telerik:RadButton Content="Cancel" Grid.Column="2" Command="{Binding CancelExportCommand}" Margin="5" Padding="10, 3" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</Grid>
</Grid>
</Telerik_ReportViewer_Silverlight:DialogBox>
<Telerik_ReportViewer_Silverlight:DialogBox x:Name="PrintDialog" Visibility="Collapsed">
<Grid Width="270">
<Grid.RowDefinitions>
<RowDefinition Height="100"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid HorizontalAlignment="Stretch" Margin="20" VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<TextBlock HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding PrintProgress}" VerticalAlignment="Center"/>
<telerik:RadProgressBar x:Name="PrintProgressBar" Grid.Row="1" Style="{StaticResource ProgressBarStyle}" Visibility="Collapsed"/>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<telerik:RadButton Content="Print" Grid.Column="1" Command="{Binding PrintDocumentCommand}" Margin="5" Padding="10, 3" telerik:StyleManager.Theme="{StaticResource Theme}"/>
<telerik:RadButton Content="Cancel" Grid.Column="2" Command="{Binding CancelPrintDocumentCommand}" Margin="5" Padding="10, 3" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</Grid>
</Grid>
</Telerik_ReportViewer_Silverlight:DialogBox>
</Grid>
</Border>
</Border>
</Grid>
<Grid Grid.Row="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center"/>
</Grid>
</Grid>
</Border>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Report Viewer
<telerik1:ReportViewer x:Name="ReportViewerControl" Visibility="Visible"
ReportServiceUri="../ReportService.svc" Style="{StaticResource CityLawReportViewerStyle}" DataContext="{Binding}" ViewMode="PrintPreview" UseNativePrinting="False" />
Everything works fine in report viewer apart of close button. Close button is always going to display in Disable due to some internal setting of Silverlight Report viewer. I want to close Reportviewer screen(Want to add own code) on Close button click.
Please guide me for the same.
xmlns:telerikControl="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
xmlns:telerik1="clr-namespace:Telerik.ReportViewer.Silverlight;assembly=Telerik.ReportViewer.Silverlight"
xmlns:Telerik_ReportViewer_Silverlight="clr-namespace:Telerik.ReportViewer.Silverlight;assembly=Telerik.ReportViewer.Silverlight"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation
<Style x:Key="ReportViewerStyle" TargetType="Telerik_ReportViewer_Silverlight:ReportViewer">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Telerik_ReportViewer_Silverlight:ReportViewer">
<Grid x:Name="LayoutRoot" DataContext="{x:Null}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="ExportReportStateGroup">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0"/>
</VisualStateGroup.Transitions>
<VisualState x:Name="ExportNoExportState"/>
<VisualState x:Name="ExportInProgressState">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ExportDialog">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ExportProgressBar">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="ExportCompleteState">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ExportDialog">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="PrintReportStateGroup">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0"/>
</VisualStateGroup.Transitions>
<VisualState x:Name="PrintNoPrintState"/>
<VisualState x:Name="PrintInProgressState">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PrintDialog">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PrintProgressBar">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="PrintCompleteState">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PrintDialog">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Collapsed</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="ViewerStateGroup">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0"/>
</VisualStateGroup.Transitions>
<VisualState x:Name="ViewerPageState"/>
<VisualState x:Name="ViewerErrorState">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ViewerError">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PageScrollViewer">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Collapsed</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="ViewerWorkInProgressState">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ViewerProgressMessage">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Visible</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border BorderBrush="{StaticResource OuterControlBorderBrush}" BorderThickness="1" CornerRadius="6">
<Border BorderBrush="{StaticResource InnerControlBorderBrush}" BorderThickness="1" Background="{StaticResource ControlBackgroundBrush}" CornerRadius="5" Margin="0" Padding="6">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="6"/>
<RowDefinition Height="*"/>
<RowDefinition Height="6"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<telerik:RadToolBar Grid.Row="0" telerik:StyleManager.Theme="{StaticResource Theme}" IsEnabled="True">
<telerik:RadComboBox DisplayMemberPath="LocalizedName" Height="24" ItemsSource="{Binding RenderingExtensions}" IsEnabled="{Binding IsExportEnabled}" Margin="1,0" MaxDropDownHeight="300" Padding="2,0" SelectedItem="{Binding SelectedRenderingExtension, Mode=TwoWay}" Width="45">
<telerik:RadComboBox.EmptySelectionBoxTemplate>
<DataTemplate>
<Image HorizontalAlignment="Left" Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/Export.png" Width="16"/>
</DataTemplate>
</telerik:RadComboBox.EmptySelectionBoxTemplate>
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.ExportToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
</telerik:RadComboBox>
<telerik:RadButton x:Name="PrintButton" BorderThickness="0" Command="{Binding PrintReportCommand}" Margin="0,2" Padding="2" telerik:StyleManager.Theme="{StaticResource Theme}">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.PrintToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/Print.png" Width="16"/>
</telerik:RadButton>
<telerik:RadToolBarSeparator/>
<telerik:RadButton x:Name="CloseButton" Command="{Binding NavigateBackCommand}" Margin="0" Padding="2" Height="20"
Content="Close" Click="ReportViewerCloseButton_Click" telerik:StyleManager.Theme="{StaticResource Theme}">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.BackToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
</telerik:RadButton>
<telerik:RadToolBarSeparator Height="20" Margin="2,0"/>
<telerik:RadComboBox HorizontalAlignment="Center" IsEditable="True" ItemsSource="{Binding AvailableZoomValues}" IsTextSearchEnabled="False" Margin="10, 0, 3, 0" MaxDropDownHeight="300" Text="{Binding ZoomText, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" VerticalAlignment="Center" Width="70">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.ZoomToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
</telerik:RadComboBox>
<telerik:RadSlider HandlesVisibility="Visible" Maximum="100" Minimum="-100" SmallChange="10" telerik:StyleManager.Theme="{StaticResource Theme}" Value="{Binding Zoom, Converter={StaticResource ScaleFactorConverter}, Mode=TwoWay}" VerticalAlignment="Center" Width="137">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.ZoomToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
</telerik:RadSlider>
<telerik:RadToolBarSeparator/>
<telerik:RadButton Command="{Binding MoveToFirstPageCommand}" Margin="0,2" Padding="2">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.FirstPageToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/FirstPage.png" Width="16"/>
</telerik:RadButton>
<telerik:RadButton Command="{Binding MoveToPreviousPageCommand}" Margin="0,2" Padding="2">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.PreviousPageToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/PrevPage.png" Width="16"/>
</telerik:RadButton>
<telerik:RadToolBarSeparator/>
<Telerik_ReportViewer_Silverlight:TextBoxEx Telerik_ReportViewer_Silverlight:KeyDown.Command="{Binding NavigateToSpecificPageCommand}" IsEnabled="{Binding IsMoveToPageEnabled}" Margin="10, 0, 0, 0" MinWidth="30" TextAlignment="Center" Text="{Binding PageNumberModel, Mode=TwoWay}" VerticalAlignment="Center">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.CurrentPageToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
</Telerik_ReportViewer_Silverlight:TextBoxEx>
<TextBlock Margin="2, 0, 10, 0" TextAlignment="Center" Text="{Binding PageCount, ConverterParameter=of \{0\} pages, Converter={StaticResource FormatedNumberConverter}}" VerticalAlignment="Center">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.TotalPagesToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
</TextBlock>
<telerik:RadToolBarSeparator/>
<telerik:RadButton Command="{Binding MoveToNextPageCommand}" Margin="0,2" Padding="2">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.NextPageToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/NextPage.png" Width="16"/>
</telerik:RadButton>
<telerik:RadButton Command="{Binding MoveToLastPageCommand}" Margin="0,2" Padding="2">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.LastPageToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/LastPage.png" Width="16"/>
</telerik:RadButton>
<telerik:RadToolBarSeparator/>
<telerik:RadButton Command="{Binding RefreshReportCommand}" Margin="0,2" Padding="2">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.RefreshToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/Refresh.png" Width="16"/>
</telerik:RadButton>
<telerik:RadToolBarSeparator/>
<telerik:RadButton Command="{Binding NavigateBackCommand}" Margin="0,2" Padding="2" Visibility="Collapsed">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.BackToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/NavBack.png" Width="16"/>
</telerik:RadButton>
<telerik:RadButton Command="{Binding NavigateForwardCommand}" Margin="0,2" Padding="2" Visibility="Collapsed">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding TextResources.ForwardToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/NavForward.png" Width="16"/>
</telerik:RadButton>
<telerik:RadToggleButton IsChecked="{Binding IsDocumentMapVisible, Mode=TwoWay}" IsEnabled="{Binding IsToggleDocumentMapEnabled}" Margin="0,2" Padding="2" Visibility="{Binding HasDocumentMap, Converter={StaticResource VisibilityConverter}}">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding DocumentMapToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/DocumentMap.png" Width="16"/>
</telerik:RadToggleButton>
<telerik:RadToggleButton IsChecked="{Binding IsParametersAreaVisible, Mode=TwoWay}" IsEnabled="{Binding IsToggleParametersAreaEnabled}" Margin="0,2" Padding="2" Visibility="{Binding HasParameters, Converter={StaticResource VisibilityConverter}}">
<ToolTipService.ToolTip>
<ToolTip Content="{Binding ParametersToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</ToolTipService.ToolTip>
<Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/Parameters.png" Width="16"/>
</telerik:RadToggleButton>
</telerik:RadToolBar>
<Border x:Name="ParametersAreaPane" Grid.Row="1" Visibility="{Binding IsParametersAreaVisible, Converter={StaticResource VisibilityConverter}}">
<Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Telerik_ReportViewer_Silverlight:ReportParametersControl Foreground="{StaticResource ForegroundBrush}" IsTabStop="False" ItemsSource="{Binding ParameterModels}" ParameterTemplateSelector="{StaticResource ReportParameterEditorTemplateSelector}">
<Telerik_ReportViewer_Silverlight:ReportParametersControl.ItemsPanel>
<ItemsPanelTemplate>
<telerik:RadUniformGrid Columns="2"/>
</ItemsPanelTemplate>
</Telerik_ReportViewer_Silverlight:ReportParametersControl.ItemsPanel>
</Telerik_ReportViewer_Silverlight:ReportParametersControl>
</Grid>
<Grid Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Bottom">
<telerik:RadButton Content="Preview" Command="{Binding ApplyReportParametersCommand}" Margin="3" Padding="10, 3" telerik:StyleManager.Theme="{StaticResource Theme}" Visibility="{Binding IsPreviewButtonVisible, Converter={StaticResource VisibilityConverter}}"/>
</Grid>
</Grid>
</Grid>
</Border>
<Grid Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding DocumentMapWidth, Mode=TwoWay}"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border x:Name="DocumentMapPane" Grid.Column="0" HorizontalAlignment="Stretch" Visibility="{Binding IsDocumentMapVisible, Converter={StaticResource VisibilityConverter}}" VerticalAlignment="Stretch">
<Border BorderBrush="{StaticResource OuterViewerAreaBorderBrush}" BorderThickness="1" CornerRadius="4" Margin="0, 0, 0, 0">
<Border BorderBrush="{StaticResource InnerViewerAreaBorderBrush}" BorderThickness="1" Background="{StaticResource InnerViewerAreaBackground}" CornerRadius="3" Margin="0">
<telerik:RadTreeView x:Name="DocumentMapTreeView" Background="{StaticResource InnerViewerAreaBackground}" ItemsSource="{Binding DocumentMapNodes}" SelectedItem="{Binding SelectedDocumentMapNode, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}">
<telerik:RadTreeView.ItemTemplate>
<telerik:HierarchicalDataTemplate telerik:ContainerBinding.ContainerBindings="{StaticResource DocumentMapItemBindingsCollection}" ItemsSource="{Binding Children}">
<TextBlock Text="{Binding Text}"/>
</telerik:HierarchicalDataTemplate>
</telerik:RadTreeView.ItemTemplate>
</telerik:RadTreeView>
</Border>
</Border>
</Border>
<sdk:GridSplitter Background="Transparent" Grid.Column="1" HorizontalAlignment="Center" Opacity="0" ShowsPreview="True" Visibility="{Binding IsDocumentMapVisible, Converter={StaticResource VisibilityConverter}}" VerticalAlignment="Stretch" Width="3"/>
<Border BorderBrush="{StaticResource OuterViewerAreaBorderBrush}" BorderThickness="1" Grid.Column="2" CornerRadius="4">
<Border BorderBrush="{StaticResource InnerViewerAreaBorderBrush}" BorderThickness="1" Background="{StaticResource InnerViewerAreaBackground}" CornerRadius="3" Margin="0">
<Grid>
<ScrollViewer x:Name="PageScrollViewer" BorderThickness="0" telerik:ScrollViewerExtensions.EnableMouseWheel="True" HorizontalScrollBarVisibility="Auto" telerik:StyleManager.Theme="{StaticResource Theme}" Visibility="Visible" VerticalScrollBarVisibility="Visible">
<ContentControl x:Name="PageContentControl">
<ContentControl.Resources>
<ControlTemplate x:Key="PrintPreviewTemplate">
<Border x:Name="PageBorder" BorderBrush="{StaticResource PageBorderBorderBrush}" BorderThickness="1" Background="{StaticResource PageBorderBackground}" Height="{Binding PageHeight}" Margin="10" Width="{Binding PageWidth}">
<ContentPresenter/>
</Border>
</ControlTemplate>
<ControlTemplate x:Key="InteractiveTemplate">
<ContentPresenter HorizontalAlignment="Left" Margin="10" VerticalAlignment="Top"/>
</ControlTemplate>
</ContentControl.Resources>
<telerik:LayoutTransformControl x:Name="PageContainer" Content="{Binding PageRoot}" LayoutTransform="{Binding PageTransform}"/>
</ContentControl>
</ScrollViewer>
<Telerik_ReportViewer_Silverlight:DialogBox x:Name="ViewerProgressMessage" Visibility="Collapsed">
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<TextBlock HorizontalAlignment="Center" Text="{Binding ProgressMessage}" VerticalAlignment="Center"/>
<telerik:RadProgressBar Grid.Row="1" Style="{StaticResource ProgressBarStyle}"/>
</Grid>
</Telerik_ReportViewer_Silverlight:DialogBox>
<customControl:CTextBox x:Name="ViewerError" BorderThickness="0" Background="{StaticResource InnerViewerAreaBackground}" Foreground="{StaticResource ErrorMessageForeground}" FontFamily="Verdana" HorizontalAlignment="Stretch" IsReadOnly="True" Padding="20" TextAlignment="Center" TextWrapping="Wrap" Text="{Binding Error}" Visibility="Collapsed" VerticalAlignment="Stretch"/>
<Telerik_ReportViewer_Silverlight:DialogBox x:Name="ExportDialog" Visibility="Collapsed">
<Grid Width="270">
<Grid.RowDefinitions>
<RowDefinition Height="100"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid HorizontalAlignment="Stretch" Margin="20" VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<TextBlock HorizontalAlignment="Center" Text="{Binding ExportProgress}" VerticalAlignment="Center"/>
<telerik:RadProgressBar x:Name="ExportProgressBar" Grid.Row="1" Style="{StaticResource ProgressBarStyle}" Visibility="Collapsed"/>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<telerik:RadButton Content="Save" Grid.Column="1" Command="{Binding SaveExportCommand}" Margin="5" Padding="10, 3" telerik:StyleManager.Theme="{StaticResource Theme}"/>
<telerik:RadButton Content="Cancel" Grid.Column="2" Command="{Binding CancelExportCommand}" Margin="5" Padding="10, 3" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</Grid>
</Grid>
</Telerik_ReportViewer_Silverlight:DialogBox>
<Telerik_ReportViewer_Silverlight:DialogBox x:Name="PrintDialog" Visibility="Collapsed">
<Grid Width="270">
<Grid.RowDefinitions>
<RowDefinition Height="100"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid HorizontalAlignment="Stretch" Margin="20" VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<TextBlock HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding PrintProgress}" VerticalAlignment="Center"/>
<telerik:RadProgressBar x:Name="PrintProgressBar" Grid.Row="1" Style="{StaticResource ProgressBarStyle}" Visibility="Collapsed"/>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<telerik:RadButton Content="Print" Grid.Column="1" Command="{Binding PrintDocumentCommand}" Margin="5" Padding="10, 3" telerik:StyleManager.Theme="{StaticResource Theme}"/>
<telerik:RadButton Content="Cancel" Grid.Column="2" Command="{Binding CancelPrintDocumentCommand}" Margin="5" Padding="10, 3" telerik:StyleManager.Theme="{StaticResource Theme}"/>
</Grid>
</Grid>
</Telerik_ReportViewer_Silverlight:DialogBox>
</Grid>
</Border>
</Border>
</Grid>
<Grid Grid.Row="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center"/>
</Grid>
</Grid>
</Border>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Report Viewer
<telerik1:ReportViewer x:Name="ReportViewerControl" Visibility="Visible"
ReportServiceUri="../ReportService.svc" Style="{StaticResource CityLawReportViewerStyle}" DataContext="{Binding}" ViewMode="PrintPreview" UseNativePrinting="False" />
Everything works fine in report viewer apart of close button. Close button is always going to display in Disable due to some internal setting of Silverlight Report viewer. I want to close Reportviewer screen(Want to add own code) on Close button click.
Please guide me for the same.