Setup using Code Behind only

4 posts, 0 answers
  1. Mikkel
    Mikkel avatar
    58 posts
    Member since:
    Aug 2012

    Posted 30 Sep 2011 Link to this post

    Hi there,

    Is it possible to bind the BusyIndicator to a DomainDataSource without setting it up in the XAML source - only using code behind?

    I've tried the following, and that works fine, however I would like to use binding if possible - eg. using

    BusyIndicator.SetBinding(XXX, XXX);

    .
    public TestGrid()
    {
       ..........
       _domainDataSource.LoadedData += new EventHandler<LoadedDataEventArgs>(_domainDataSource_LoadedData);
       _domainDataSource.LoadingData += new EventHandler<LoadingDataEventArgs>(_domainDataSource_LoadingData);
       ..........
    }
     
    void _domainDataSource_LoadingData(object sender, LoadingDataEventArgs e)
    {
       BusyIndicator.IsBusy = true;
    }
     
    private void _domainDataSource_LoadedData(object sender, System.Windows.Controls.LoadedDataEventArgs e)
    {
       BusyIndicator.IsBusy = false;
    }

  2. Pana
    Admin
    Pana avatar
    748 posts

    Posted 30 Sep 2011 Link to this post

    Hi,

    According to this the DomainDataSource has IsBusy property. It should be fine to bind the IsBusy of the RadBusyIndicator to the IsBusy of the DomainDataSource.

    Best wishes,
    Pana
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. DevCraft banner
  4. Mikkel
    Mikkel avatar
    58 posts
    Member since:
    Aug 2012

    Posted 30 Sep 2011 Link to this post

    But that property is not a DependencyProperty...? Which is required by your BusyIndicator.SetBinding method...?
  5. Pana
    Admin
    Pana avatar
    748 posts

    Posted 30 Sep 2011 Link to this post

    Hi,

    Please excuse my stupidity if it is not. Noone can bind to properties that do not implement DependencyProperty or implement INotifyProeprtyChange.

    Could you check that page. It says there is a IsBusyProperty DependencyProperty identifier for the IsBusy property. I have not actually tried to bind to so there could actually be some problems. If you can not bind using that just leave the event handlers. I think the MSDN documentation on that topic is poor.

    Best wishes,
    Pana
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Back to Top