FileUploaded event and EventTrigger

2 posts, 0 answers
  1. Kirk Quinbar
    Kirk Quinbar avatar
    48 posts
    Member since:
    Nov 2007

    Posted 07 Dec 2010 Link to this post

    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>

     

     

     

     

     

  2. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 08 Dec 2010 Link to this post

    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
  3. DevCraft banner
Back to Top