hi
I´ve got a exception, when i use this nuget package (https://github.com/corradocavalli/Corcav.Behaviors) to achieve event to command behavior. In code bellow i also have a regular Listview and works great. Does radcontrols have something special in events or i´m missing something
View Model code:
private Command _dataSelecionadaCommand; public Command DataSelecionadaCommand { get { return _dataSelecionadaCommand ?? new Command(() => { // do something }); } }
XAML code:
<telerikInput:RadCalendar SelectedDate="{Binding DiaSelecionado}" AppointmentsSource="{Binding Provas}" > <!--<behaviors:Interaction.Behaviors> <behaviors:BehaviorCollection> <behaviors:EventToCommand EventName="SelectionChanged" Command="{Binding DataSelecionadaCommand}" /> </behaviors:BehaviorCollection> </behaviors:Interaction.Behaviors>--> </telerikInput:RadCalendar> <ListView Grid.Row="1" ItemsSource="{Binding Provas}"> <behaviors:Interaction.Behaviors> <behaviors:BehaviorCollection> <behaviors:EventToCommand EventName="ItemSelected" Command="{Binding DataSelecionadaCommand}" /> </behaviors:BehaviorCollection> </behaviors:Interaction.Behaviors> <ListView.ItemTemplate> <DataTemplate> <ViewCell> <Grid Padding="10"> <Grid.RowDefinitions> <RowDefinition Height="*"></RowDefinition> <RowDefinition Height="*"></RowDefinition> </Grid.RowDefinitions> <Label Text="{Binding StartDate}"></Label> <Label Text="{Binding EndDate}" Grid.Row="1"></Label> </Grid> </ViewCell> </DataTemplate> </ListView.ItemTemplate> </ListView>
This is the exception : 'No command available, Is Command properly set up?'
The command instantiation is in the getter, checking if is null, and the regular listview works.
Thanks
