This question is locked. New answers and comments are not allowed.
Hello,
Im working with PaginationControl and i like to dont display the "No Data to Display" message when there is no PageProvider set.
Here is My Code:
<phone:PhoneApplicationPage
x:Class="TelerikWindowsPhoneApp5.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
xmlns:telerikPagination="clr-namespace:Telerik.Windows.Controls.Pagination;assembly=Telerik.Windows.Controls.Primitives"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="True">
<phone:PhoneApplicationPage.Resources>
<SolidColorBrush x:Key="highlightBrush" Color="#1ba1e2"/>
<DataTemplate x:Key="dot">
<Border Width="28" Height="28" Background="#00FFFFFF">
<Ellipse Stroke="{StaticResource PhoneForegroundBrush}"
StrokeThickness="2" Width="8" Height="8"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
</DataTemplate>
<DataTemplate x:Key="dotFilled">
<Border Width="28" Height="28" Background="#00FFFFFF">
<Ellipse Fill="{StaticResource PhoneForegroundBrush}"
Width="12" Height="12"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
</DataTemplate>
<DataTemplate x:Key="thumbnail">
<Image Source="{Binding ThumbnailPicture}" Width="90" Height="60" Opacity="0.8" Margin="0,6,0,0"/>
</DataTemplate>
<DataTemplate x:Key="thumbnailSelected">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Image Stretch="None" Source="Images/current-item.png" HorizontalAlignment="Center" VerticalAlignment="Top"/>
<Image Source="{Binding ThumbnailPicture}" Width="90" Height="60" Grid.Row="1"/>
<Border BorderBrush="{StaticResource highlightBrush}" BorderThickness="4" Grid.Row="1"/>
</Grid>
</DataTemplate>
</phone:PhoneApplicationPage.Resources>
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock x:Name="ApplicationTitle" Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock x:Name="PageTitle" Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<telerikPrimitives:RadPaginationControl Background="Black" Opacity="0.65"
DisplayMode="Thumbnails"
ItemTemplate="{StaticResource dot}"
CurrentItemTemplate="{StaticResource dotFilled}"
x:Name="pagination"
NavigationMode="Adjacent"
BorderThickness="0,0,0,1"
Margin="0,0,0,0" >
<telerikPrimitives:RadPaginationControl.LayoutDefinition>
<telerikPrimitives:PaginationControlLayoutDefinition IndexLabelPosition="0,0"
LeftArrowPosition="1,0"
RightArrowPosition="1,2"
ThumbnailListPosition="1,1">
<telerikPrimitives:PaginationControlLayoutDefinition.Rows>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</telerikPrimitives:PaginationControlLayoutDefinition.Rows>
<telerikPrimitives:PaginationControlLayoutDefinition.Columns>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</telerikPrimitives:PaginationControlLayoutDefinition.Columns>
</telerikPrimitives:PaginationControlLayoutDefinition>
</telerikPrimitives:RadPaginationControl.LayoutDefinition>
<telerikPrimitives:RadPaginationControl.IndexLabelStyle>
<Style TargetType="telerikPagination:PaginationIndexLabelControl">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="Grid.ColumnSpan" Value="2"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="telerikPagination:PaginationIndexLabelControl">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{TemplateBinding CurrentIndexDisplayValue}"
FontSize="{StaticResource PhoneFontSizeLarge}"
FontFamily="{StaticResource PhoneFontFamilyLight}"/>
<TextBlock Text="{TemplateBinding Separator}"
Margin="0,10,0,0"/>
<TextBlock Text="{TemplateBinding ItemCountDisplayValue}"
FontSize="{StaticResource PhoneFontSizeMedium}"
FontFamily="{StaticResource PhoneFontFamilySemiBold}"
VerticalAlignment="Bottom"
Margin="0,0,0,1"/>
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</telerikPrimitives:RadPaginationControl.IndexLabelStyle>
<telerikPrimitives:RadPaginationControl.ThumbnailListStyle>
<Style TargetType="telerikPagination:PaginationThumbnailListControl">
<Setter Property="Height" Value="20"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Canvas.ZIndex" Value="-1"/>
<Setter Property="Margin" Value="0,0,0,0"/>
</Style>
</telerikPrimitives:RadPaginationControl.ThumbnailListStyle>
</telerikPrimitives:RadPaginationControl>
</Grid>
</Grid>
</phone:PhoneApplicationPage>
Thanks for Help
Im working with PaginationControl and i like to dont display the "No Data to Display" message when there is no PageProvider set.
Here is My Code:
<phone:PhoneApplicationPage
x:Class="TelerikWindowsPhoneApp5.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
xmlns:telerikPagination="clr-namespace:Telerik.Windows.Controls.Pagination;assembly=Telerik.Windows.Controls.Primitives"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="True">
<phone:PhoneApplicationPage.Resources>
<SolidColorBrush x:Key="highlightBrush" Color="#1ba1e2"/>
<DataTemplate x:Key="dot">
<Border Width="28" Height="28" Background="#00FFFFFF">
<Ellipse Stroke="{StaticResource PhoneForegroundBrush}"
StrokeThickness="2" Width="8" Height="8"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
</DataTemplate>
<DataTemplate x:Key="dotFilled">
<Border Width="28" Height="28" Background="#00FFFFFF">
<Ellipse Fill="{StaticResource PhoneForegroundBrush}"
Width="12" Height="12"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
</DataTemplate>
<DataTemplate x:Key="thumbnail">
<Image Source="{Binding ThumbnailPicture}" Width="90" Height="60" Opacity="0.8" Margin="0,6,0,0"/>
</DataTemplate>
<DataTemplate x:Key="thumbnailSelected">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Image Stretch="None" Source="Images/current-item.png" HorizontalAlignment="Center" VerticalAlignment="Top"/>
<Image Source="{Binding ThumbnailPicture}" Width="90" Height="60" Grid.Row="1"/>
<Border BorderBrush="{StaticResource highlightBrush}" BorderThickness="4" Grid.Row="1"/>
</Grid>
</DataTemplate>
</phone:PhoneApplicationPage.Resources>
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock x:Name="ApplicationTitle" Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock x:Name="PageTitle" Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<telerikPrimitives:RadPaginationControl Background="Black" Opacity="0.65"
DisplayMode="Thumbnails"
ItemTemplate="{StaticResource dot}"
CurrentItemTemplate="{StaticResource dotFilled}"
x:Name="pagination"
NavigationMode="Adjacent"
BorderThickness="0,0,0,1"
Margin="0,0,0,0" >
<telerikPrimitives:RadPaginationControl.LayoutDefinition>
<telerikPrimitives:PaginationControlLayoutDefinition IndexLabelPosition="0,0"
LeftArrowPosition="1,0"
RightArrowPosition="1,2"
ThumbnailListPosition="1,1">
<telerikPrimitives:PaginationControlLayoutDefinition.Rows>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</telerikPrimitives:PaginationControlLayoutDefinition.Rows>
<telerikPrimitives:PaginationControlLayoutDefinition.Columns>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</telerikPrimitives:PaginationControlLayoutDefinition.Columns>
</telerikPrimitives:PaginationControlLayoutDefinition>
</telerikPrimitives:RadPaginationControl.LayoutDefinition>
<telerikPrimitives:RadPaginationControl.IndexLabelStyle>
<Style TargetType="telerikPagination:PaginationIndexLabelControl">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="Grid.ColumnSpan" Value="2"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="telerikPagination:PaginationIndexLabelControl">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{TemplateBinding CurrentIndexDisplayValue}"
FontSize="{StaticResource PhoneFontSizeLarge}"
FontFamily="{StaticResource PhoneFontFamilyLight}"/>
<TextBlock Text="{TemplateBinding Separator}"
Margin="0,10,0,0"/>
<TextBlock Text="{TemplateBinding ItemCountDisplayValue}"
FontSize="{StaticResource PhoneFontSizeMedium}"
FontFamily="{StaticResource PhoneFontFamilySemiBold}"
VerticalAlignment="Bottom"
Margin="0,0,0,1"/>
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</telerikPrimitives:RadPaginationControl.IndexLabelStyle>
<telerikPrimitives:RadPaginationControl.ThumbnailListStyle>
<Style TargetType="telerikPagination:PaginationThumbnailListControl">
<Setter Property="Height" Value="20"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Canvas.ZIndex" Value="-1"/>
<Setter Property="Margin" Value="0,0,0,0"/>
</Style>
</telerikPrimitives:RadPaginationControl.ThumbnailListStyle>
</telerikPrimitives:RadPaginationControl>
</Grid>
</Grid>
</phone:PhoneApplicationPage>
Thanks for Help