This question is locked. New answers and comments are not allowed.
hi,
When I put RadCalendar to a grid then I got a error "unable to determine application identity of the caller", Im sure set the ItemTemplateSelector property to "{StaticResource TheDaySelector}" causes this problem. any idea for solve this problem.
thank you.
Ken Nao
<phone:PhoneApplicationPage
x:Class="Application1.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:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Application1"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="True"
Loaded="MainPage_Loaded"
>
<UserControl.Resources>
<local:DaySelector x:Key="TheDaySelector">
<local:DaySelector.NoTemplate>
<DataTemplate>
<Grid Margin="5">
<Image Source="/Assets/no.png" Width="24" Height="24" VerticalAlignment="Top" HorizontalAlignment="Right" />
<TextBlock Text="{Binding Text}" x:Name="TextPresenter" VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
</Grid>
</DataTemplate>
</local:DaySelector.NoTemplate>
<local:DaySelector.SpecialTemplate>
<DataTemplate>
<Grid Margin="5">
<Image Source="/Assets/Yes.png" Width="24" Height="24" VerticalAlignment="Top" HorizontalAlignment="Right" />
<TextBlock Text="{Binding Text}" x:Name="TextPresenter" VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
</Grid>
</DataTemplate>
</local:DaySelector.SpecialTemplate>
<local:DaySelector.OkTemplate>
<DataTemplate>
<Grid Margin="5">
<Image Source="/Assets/smiley.png" Width="24" Height="24" VerticalAlignment="Top" HorizontalAlignment="Right" />
<TextBlock Text="{Binding Text}" x:Name="TextPresenter" VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
</Grid>
</DataTemplate>
</local:DaySelector.OkTemplate>
</local:DaySelector>
</UserControl.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
Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}"
Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>
<TextBlock Text="{Binding Path=LocalizedResources.CalendarTitle, Source={StaticResource LocalizedStrings}}"
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">
<telerikInput:RadCalendar
x:Name="Calendar1"
ItemTemplateSelector= "{StaticResource TheDaySelector}"
FirstDayOfWeek="Sunday" MonthInfoDisplayMode="Small" Margin="-14,0,-18,0">
</telerikInput:RadCalendar>
</Grid>
</Grid>
</phone:PhoneApplicationPage>
StackTrace:
at System.IO.IsolatedStorage.IsolatedStorage.InitStore(IsolatedStorageScope scope, Type appEvidenceType)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type applicationEvidenceType)
at System.IO.IsolatedStorage.IsolatedStorageSettings..ctor(Boolean useSiteSettings)
at System.IO.IsolatedStorage.IsolatedStorageSettings.get_ApplicationSettings()
at SafePeriodCalculator.App.get_DaysSetting()
at SafePeriodCalculator.Template.DaySelector.SelectTemplate(Object item, DependencyObject container)
at Telerik.Windows.Controls.RadCalendar.ApplyCalendarButtonTemplate(CalendarButton button)
at Telerik.Windows.Controls.RadCalendar.GenerateCalendarFirstRowElements(DateTime firstDayToDisplay)
at Telerik.Windows.Controls.RadCalendar.PopulateDays()
at Telerik.Windows.Controls.RadCalendar.OnApplyTemplate()
at System.Windows.FrameworkElement.OnApplyTemplate(IntPtr nativeTarget)
When I put RadCalendar to a grid then I got a error "unable to determine application identity of the caller", Im sure set the ItemTemplateSelector property to "{StaticResource TheDaySelector}" causes this problem. any idea for solve this problem.
thank you.
Ken Nao
<phone:PhoneApplicationPage
x:Class="Application1.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:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Application1"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="True"
Loaded="MainPage_Loaded"
>
<UserControl.Resources>
<local:DaySelector x:Key="TheDaySelector">
<local:DaySelector.NoTemplate>
<DataTemplate>
<Grid Margin="5">
<Image Source="/Assets/no.png" Width="24" Height="24" VerticalAlignment="Top" HorizontalAlignment="Right" />
<TextBlock Text="{Binding Text}" x:Name="TextPresenter" VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
</Grid>
</DataTemplate>
</local:DaySelector.NoTemplate>
<local:DaySelector.SpecialTemplate>
<DataTemplate>
<Grid Margin="5">
<Image Source="/Assets/Yes.png" Width="24" Height="24" VerticalAlignment="Top" HorizontalAlignment="Right" />
<TextBlock Text="{Binding Text}" x:Name="TextPresenter" VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
</Grid>
</DataTemplate>
</local:DaySelector.SpecialTemplate>
<local:DaySelector.OkTemplate>
<DataTemplate>
<Grid Margin="5">
<Image Source="/Assets/smiley.png" Width="24" Height="24" VerticalAlignment="Top" HorizontalAlignment="Right" />
<TextBlock Text="{Binding Text}" x:Name="TextPresenter" VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
</Grid>
</DataTemplate>
</local:DaySelector.OkTemplate>
</local:DaySelector>
</UserControl.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
Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}"
Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>
<TextBlock Text="{Binding Path=LocalizedResources.CalendarTitle, Source={StaticResource LocalizedStrings}}"
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">
<telerikInput:RadCalendar
x:Name="Calendar1"
ItemTemplateSelector= "{StaticResource TheDaySelector}"
FirstDayOfWeek="Sunday" MonthInfoDisplayMode="Small" Margin="-14,0,-18,0">
</telerikInput:RadCalendar>
</Grid>
</Grid>
</phone:PhoneApplicationPage>
StackTrace:
at System.IO.IsolatedStorage.IsolatedStorage.InitStore(IsolatedStorageScope scope, Type appEvidenceType)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type applicationEvidenceType)
at System.IO.IsolatedStorage.IsolatedStorageSettings..ctor(Boolean useSiteSettings)
at System.IO.IsolatedStorage.IsolatedStorageSettings.get_ApplicationSettings()
at SafePeriodCalculator.App.get_DaysSetting()
at SafePeriodCalculator.Template.DaySelector.SelectTemplate(Object item, DependencyObject container)
at Telerik.Windows.Controls.RadCalendar.ApplyCalendarButtonTemplate(CalendarButton button)
at Telerik.Windows.Controls.RadCalendar.GenerateCalendarFirstRowElements(DateTime firstDayToDisplay)
at Telerik.Windows.Controls.RadCalendar.PopulateDays()
at Telerik.Windows.Controls.RadCalendar.OnApplyTemplate()
at System.Windows.FrameworkElement.OnApplyTemplate(IntPtr nativeTarget)