This is a migrated thread and some comments may be shown as answers.

Events MVVM support in RadComboBox or other Telerik controls

1 Answer 146 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Irene
Top achievements
Rank 2
Irene asked on 23 Sep 2010, 11:18 PM
Hi,

I am very new to Silverlight and trying to use MVVMLight framework with Telerik Silverlight controls. When I am using events, I am getting compile errors:

Error 108 The tag 'EventTrigger' does not exist in XML namespace 'clr-namespace:System.Windows.Interactivity;    assembly=System.Windows.Interactivity'. C:\SharepointDev\xcSLClient1\MainPage.xaml 13 12 xcSLClient1
Error 107 The property 'Triggers' does not exist on the type 'RadComboBox' in the XML namespace 'clr-namespace:System.Windows.Interactivity;    assembly=System.Windows.Interactivity'. C:\SharepointDev\xcSLClient1\MainPage.xaml 12 11 xcSLClient1


My XAML is:

<

 

 

UserControl xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"

 

 

 

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:telerik="http://schemas.telerik.com/2008/xaml/presentation"

 

 

 

xmlns:u="http://schemas.microsoft.com/expression/2010/interactivity" x:Name="userControl" x:Class="xcSLClient1.MainPage"

 

 

 

xmlns:i="clr-namespace:System.Windows.Interactivity; assembly=System.Windows.Interactivity"

 

 

 

xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.SL4"

 

 

 

mc:Ignorable="d" d:DesignWidth="694" d:DesignHeight="480">

 

 

 

 

<Grid x:Name="LayoutRoot">

 

 

 

 

<StackPanel Grid.Column="0" Grid.Row="0" Orientation="Vertical">

 

 

 

 

<telerik:RadComboBox HorizontalAlignment="Left" Margin="22,19,0,0" x:Name="radComboBox1" VerticalAlignment="Top" Width="250" >

 

 

 

 

<i:Interaction.Triggers>

 

 

 

 

<i:EventTrigger EventName="SelectionChanged">

 

 

 

 

<cmd:EventToCommand PassEventArgsToCommand="True"

 

 

 

Command="{Binding Path=DSNameChangedCommand, Mode=OneWay}" />

 

 

 

 

</i:EventTrigger>

 

 

 

 

</i:Interaction.Triggers>

 

 

 

 

<telerik:RadComboBoxItem Content="Item 123" />

 

 

 

 

<telerik:RadComboBoxItem Content="Item 234" />

 

 

 

 

<telerik:RadComboBoxItem Content="Item 345" />

 

 

 

 

<telerik:RadComboBoxItem Content="New Very Good Item" />

 

 

 

 

</telerik:RadComboBox>

 

 

 

 

<telerik:RadButton x:Name="myButton" Width="100" Height="20" Margin="22,19,0,0" HorizontalAlignment="Left" Click="myButton_Click" Visibility="Visible" Content="Refresh1"/>

 

 

 

 

<sdk:Label x:Name="lblStatus" Background="AntiqueWhite" Content="{Binding Status}" />

 

 

 

 

<TextBlock x:Name="txtStatus" Text="{Binding Status, Mode=OneWay}" />

 

 

 

 

</StackPanel>

 

 

 

 

</Grid>

 

</

 

 

UserControl>

Please let me know if Telerik controls work with MVVMlight or Blend interactivity features or may be I am doing something wrong.

 


Thanks a lot,

Irene




1 Answer, 1 is accepted

Sort by
0
Irene
Top achievements
Rank 2
answered on 23 Sep 2010, 11:37 PM
Please disregard the question. The reason for error was surprisingly the extra space in xlmns:i attribute.

Thanks,

Irene
Tags
ComboBox
Asked by
Irene
Top achievements
Rank 2
Answers by
Irene
Top achievements
Rank 2
Share this question
or