Silverlight childwindow closing on 100%Progress completed

2 posts, 0 answers
  1. mahesh mack
    mahesh mack avatar
    1 posts
    Member since:
    Dec 2009

    Posted 17 Sep 2012 Link to this post


    I am using RadProgressBar control inside a silverlight child window for a DB search operation, 
    My requirement is to close the child window once the search is completed i.e when the progress becomes 100.

    i am setting the dialog result value using event trigger
            <ei:PropertyChangedTrigger Binding="{Binding CancelResult}">
                <ei:ChangePropertyAction TargetObject="{Binding ElementName=ProgressBarWindow}" PropertyName="DialogResult" Value="{Binding CancelResult}"/>

    I am able to close the child window using a button 

    <Button x:Name="CancelButton" Command="{Binding CancelSearchCommand}" Content="Cancel"   >
                        <i:EventTrigger EventName="Click">
                            <ei:ChangePropertyAction TargetObject="{Binding}" PropertyName="CancelResult" Value="False"/>

    But i want to close the window  once the progress completed. so i am setting the CancelResult property to false once 
    the progress becomes 100 from the ViewModel, but the window is not getting closed.
  2. Tina Stancheva
    Tina Stancheva avatar
    3299 posts

    Posted 19 Sep 2012 Link to this post

    Hello Mahesh,

    We believe the problem is that the ProgressBar.ValueChanged event in not RoutedEvent and this is preventing the Event Trigger from working. The ValueChanged is from the RangeBase build-in Silverlight control so we have no option to improve that. Also I think the reason for not being RoutedEvent is because this will degrade the performance of the ProgressBar.

    I would suggest you use different approach instead of EventTriggers.

    Kind regards,
    Tina Stancheva
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

Back to Top