This question is locked. New answers and comments are not allowed.
Hello,
I am using the DataForm. It includes a DataFormDataField with a ContentTemplate. If putting a RadComboBox into this ContentTemplate and setting the SelectedItem property of this RadComboBox Expression blends displays the error message: "The local property "SelectedItem" can only be applied to types that are derivced from "Selector".
In Visual Studio the error message does not appear. Also compiling is possible withount any error.
Please find enclosed a sceenshot showing the error message.
Thank you for your support
Daniel Koffler
Complete XAML:
I am using the DataForm. It includes a DataFormDataField with a ContentTemplate. If putting a RadComboBox into this ContentTemplate and setting the SelectedItem property of this RadComboBox Expression blends displays the error message: "The local property "SelectedItem" can only be applied to types that are derivced from "Selector".
In Visual Studio the error message does not appear. Also compiling is possible withount any error.
Please find enclosed a sceenshot showing the error message.
Thank you for your support
Daniel Koffler
Complete XAML:
<navigation:Page 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:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" xmlns:ViewModel="clr-namespace:SOS.LucyLab005.SilverlightViewModel.ViewModels;assembly=SOS.LucyLab005.SilverlightViewModel" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" x:Class="SOS.LucyLab005.Silverlight.Home" d:DesignWidth="800" d:DesignHeight="600" Title="Home" mc:Ignorable="d"> <navigation:Page.Resources> <ViewModel:HomeViewModel x:Key="HomeViewModel"/> </navigation:Page.Resources> <navigation:Page.Style> <StaticResource ResourceKey="PageStyle"/> </navigation:Page.Style> <Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource HomeViewModel}}"> <ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="100"/> <RowDefinition Height="15"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <StackPanel x:Name="ContentStackPanel" d:LayoutOverrides="Height"> <TextBlock x:Name="HeaderText" Style="{StaticResource HeaderTextStyle}" Text="Home"/> <TextBlock x:Name="ContentText" Style="{StaticResource ContentTextStyle}" Text="Home page content"/> </StackPanel> <Grid Grid.Row="3"> <Grid.ColumnDefinitions> <ColumnDefinition Width="400"/> <ColumnDefinition Width="0.5*"/> </Grid.ColumnDefinitions> <telerik:RadDataForm x:Name="DetailDataForm" Header="Details" ItemsSource="{Binding DetailsLstObj, Mode=TwoWay}" AutoGenerateFields="False" d:LayoutOverrides="Width" Margin="0,0,0,30"> <telerik:RadDataForm.ReadOnlyTemplate> <DataTemplate> <StackPanel> <TextBlock Margin="10" Text="This is the form ReadOnlyTemplate" FontWeight="Bold"/> <telerik:DataFormDataField DataMemberBinding="{Binding Name,Mode=TwoWay}" Description="Name" Label="Name:" IsReadOnly="True" /> <telerik:DataFormDataField DataMemberBinding="{Binding Description,Mode=TwoWay}" Description="Description" Label="Description:" IsReadOnly="True"/> <telerik:DataFormDataField DataMemberBinding="{Binding HeaderObj.Name,Mode=TwoWay}" Description="Header Name" Label="Header Name:" IsReadOnly="True" /> <telerik:DataFormDataField DataMemberBinding="{Binding HeaderObj.Description,Mode=TwoWay}" Description="Header Description" Label="Header Description:"> <telerik:DataFormDataField.ContentTemplate> <DataTemplate> <TextBox Text="{Binding HeaderObj.Description, Mode=TwoWay}" IsReadOnly="True"/> </DataTemplate> </telerik:DataFormDataField.ContentTemplate> </telerik:DataFormDataField> <telerik:DataFormDataField DataMemberBinding="{Binding Date,Mode=TwoWay}" Description="Date" Label="Date:" IsReadOnly="True"/> <telerik:DataFormCheckBoxField DataMemberBinding="{Binding IsValid,Mode=TwoWay}" Description="This is entry is valid. This is entry is valid. This is entry is valid." Label="Is Valid:" IsReadOnly="True"/> <telerik:DataFormDataField DataMemberBinding="{Binding DetailsLinkLstObj,Mode=TwoWay}" Description="Links" Label="Links:"> <telerik:DataFormDataField.ContentTemplate> <DataTemplate> <ListBox ItemsSource="{Binding DetailsLinkLstObj,Mode=TwoWay}" DisplayMemberPath="Name" Height="100" /> </DataTemplate> </telerik:DataFormDataField.ContentTemplate> </telerik:DataFormDataField> <telerik:DataFormDataField Description="Details Category" DataMemberBinding="{Binding DetailsCategoryObj,Mode=TwoWay}" Label="Category:"> <telerik:DataFormDataField.ContentTemplate> <DataTemplate> <telerik:RadComboBox SelectedItem="{Binding DetailsCategoryObj,Mode=TwoWay}" ItemsSource="{Binding DetailsCategoryLstObj, Source={StaticResource HomeViewModel}}" DisplayMemberPath="Name" HorizontalAlignment="Stretch" VerticalAlignment="Center"/> </DataTemplate> </telerik:DataFormDataField.ContentTemplate> </telerik:DataFormDataField> </StackPanel> </DataTemplate> </telerik:RadDataForm.ReadOnlyTemplate> <telerik:RadDataForm.EditTemplate> <DataTemplate> <StackPanel> <TextBlock Margin="10" Text="This is the form EditTemplate" FontWeight="Bold"/> <telerik:DataFormDataField DataMemberBinding="{Binding Name,Mode=TwoWay}" Label="Name:"> <telerik:DataFormDataField.Content> <TextBox Text="{Binding Name, Mode=TwoWay}" /> </telerik:DataFormDataField.Content> </telerik:DataFormDataField> <telerik:DataFormDataField DataMemberBinding="{Binding Description,Mode=TwoWay}" Label="Description:" /> </StackPanel> </DataTemplate> </telerik:RadDataForm.EditTemplate> <telerik:RadDataForm.NewItemTemplate> <DataTemplate> <StackPanel> <TextBlock Margin="10" Text="This is the form NewItemTemplate" FontWeight="Bold"/> <telerik:DataFormDataField DataMemberBinding="{Binding Name,Mode=TwoWay}" Label="Name:" IsEnabled="False" /> <telerik:DataFormDataField DataMemberBinding="{Binding Description,Mode=TwoWay}" Label="Description:" IsEnabled="False"/> <telerik:DataFormDataField DataMemberBinding="{Binding Date,Mode=TwoWay}" Label="Date:" IsEnabled="False"/> <telerik:DataFormDataField DataMemberBinding="{Binding IsValid,Mode=TwoWay}" Label="Is Valid:" IsEnabled="False"/> </StackPanel> </DataTemplate> </telerik:RadDataForm.NewItemTemplate> </telerik:RadDataForm> </Grid> </Grid> </ScrollViewer> </Grid></navigation:Page>