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

FileUploaded event and EventTrigger

1 Answer 60 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Kirk Quinbar
Top achievements
Rank 1
Kirk Quinbar asked on 07 Dec 2010, 10:35 PM
I would like to know if the following code should work with RadUpload? meaning should i be able to trap the FileUploaded event with an EventTrigger? if not, is this by design or a bug?

basically i want to bind the FileUploaded event to a viewmodel.

<telerik:RadUpload Grid.Row="0" x:Name="ImagesRadUpload"
OverwriteExistingFiles="True"
IsMultiselect="False"
IsAutomaticUpload="False"
IsAppendFilesEnabled="False"
MaxFileCount="1"
UploadServiceUrl="{Binding UploadHandlerUrl}"
Filter="Image Files (*.jpg;*.png)|*.jpg;*.png"
Style="{StaticResource RadSimpleUploadStyle}"
ItemContainerStyle="{StaticResource RadSimpleUploadItemStyle}"
Width="Auto"
VerticalAlignment="Top"
Height="30"
Margin="0,4,0,0"
MaxHeight="30"
MinHeight="30" >

 

 

<i:Interaction.Triggers>
    <i:EventTrigger EventName="FileUploaded">
        <Mvvm:EventToCommand Command="{Binding Path=DataContext.ImageGalleryFileUploadedCommand, ElementName=ImageGalleryControl}" PassEventArgsToCommand="True"/>
    </i:EventTrigger>
</i:Interaction.Triggers>

 

 

 

</telerik:RadUpload>

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Alex Fidanov
Telerik team
answered on 08 Dec 2010, 09:15 AM
Hello Kirk Quinbar,

In Q3 release, we have made almost all of the events of the RadUpload RoutedEvents, so you should have no problems using the interaction triggers to hook up to them. You just have to make sure that the Interaction Trigger manages to find its source object and the action (command) resolves correctly.

Greetings,
Alex Fidanov
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
Upload
Asked by
Kirk Quinbar
Top achievements
Rank 1
Answers by
Alex Fidanov
Telerik team
Share this question
or