Binding in BusyContentTemplate

4 posts, 0 answers
  1. Garry
    Garry avatar
    205 posts
    Member since:
    Nov 2010

    Posted 07 Aug 2010 Link to this post

    I can get static content to work all day long in the template, but it doesn't seem to pick up my binding.

    Any ideas what I'm doing wrong?

    Template
    <DataTemplate x:Key="busyTemplate">
                    <StackPanel Orientation="Vertical">
                        <Label Content="Synchronizing EliteLive.sdf with the remote database."/>
                        <TextBlock Text="{Binding SyncStatus}" TextWrapping="Wrap"/>
                    </StackPanel>
                </DataTemplate>

    BusyIndicator
    <telerik:RadBusyIndicator x:Name="busyIndicator" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                    IsBusy="True"
                    IsIndeterminate="True"
                    ProgressValue="{Binding PercentageComplete}"
                    BusyContentTemplate="{StaticResource busyTemplate}" >
                </telerik:RadBusyIndicator>
  2. Pana
    Admin
    Pana avatar
    748 posts

    Posted 10 Aug 2010 Link to this post

    Hello Garry,

    The DataContext of the BusyContentTemplate is the BusyContent of the RadBusyIndicator. I don't see you setting the BusyContent property. Perhaps you should bind it to an instance of the class that has that SyncStatus property.

    Sincerely yours,
    Panayot
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Garry
    Garry avatar
    205 posts
    Member since:
    Nov 2010

    Posted 11 Aug 2010 Link to this post

    Panayot,
    Thanks for the replay and by adding BusyContent="{Binding}"my template binding now works. Just in case someone else misses this subtle fact.
  5. Pana
    Admin
    Pana avatar
    748 posts

    Posted 11 Aug 2010 Link to this post

    Hi Garry,

    I am glad I could help. If you have further problems do not hesitate to contact us again.

    Sincerely yours,
    Panayot
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top