This is a migrated thread and some comments may be shown as answers.
Silverlight childwindow closing on 100%Progress completed
1 Answer 22 Views
This is a migrated thread and some comments may be shown as answers.
mahesh mack
Top achievements
Rank 1
mahesh mack asked on 17 Sep 2012, 09:37 AM
Hi

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
 <i:Interaction.Triggers>
        <ei:PropertyChangedTrigger Binding="{Binding CancelResult}">
            <ei:ChangePropertyAction TargetObject="{Binding ElementName=ProgressBarWindow}" PropertyName="DialogResult" Value="{Binding CancelResult}"/>
        </ei:PropertyChangedTrigger>       
    </i:Interaction.Triggers>

I am able to close the child window using a button 

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

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.

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 19 Sep 2012, 04:00 PM
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.

Asked by
mahesh mack
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or