Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8427143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:43:01+00:00 2026-06-10T04:43:01+00:00

Let me explain my problem. Please excuse me for the long question. Here it

  • 0

Let me explain my problem. Please excuse me for the long question.
Here it goes.

I have a View (BusyProviderView)

<Grid>
    <xctk:BusyIndicator x:Name="aaa" IsBusy="{Binding IsRunning}" >
        <xctk:BusyIndicator.BusyContentTemplate>
            <DataTemplate>
                <Grid cal:Bind.Model="{Binding}">
                    <TextBlock Name="Message"/>
                </Grid>
            </DataTemplate>
        </xctk:BusyIndicator.BusyContentTemplate>
    </xctk:BusyIndicator>
</Grid>

Which has View model:

    public class BusyProviderViewModel : PropertyChangedBase, IBusyProvider
{
//two properties with INPC, Message and IsRunning
}

Again I have a Shell view

<Window x:Class="MvvmTest.ShellView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="ShellView" Height="300" Width="300">
<Grid>
    <Button Height="25" x:Name="Run">Run</Button>
    <ContentControl x:Name="BusyProvider"/>
</Grid>

Which has a view model

public class ShellViewModel : PropertyChangedBase, IShellViewModel
{
    private IBusyProvider busyProvider;

    public ShellViewModel(IBusyProvider busy)
    {
        this.BusyProvider = busy;
    }

    public IEnumerable<IResult> Run()
    {
        yield return new DummyOperation(this.BusyProvider);
    }

    public IBusyProvider BusyProvider
    {
        get
        {
            return this.busyProvider;
        }
        set
        {
            if (Equals(value, this.busyProvider))
            {
                return;
            }
            this.busyProvider = value;
            this.NotifyOfPropertyChange(() => this.BusyProvider);
        }
    }
}

DummyOperation Looks

public class DummyOperation : IResult
{
    public IBusyProvider Provider { get; set; }

    public DummyOperation(IBusyProvider provider)
    {
        Provider = provider;
    }

    public void Execute(ActionExecutionContext context)
    {
        BackgroundWorker worker = new BackgroundWorker();
        worker.DoWork += (a, b) =>
            {
                Provider.IsRunning = true;
                Provider.Message = "Working";
                Thread.Sleep(TimeSpan.FromSeconds(5));
                Provider.Message = "Stopping";
                Thread.Sleep(TimeSpan.FromSeconds(5));
                Provider.IsRunning = false;
            };
        worker.RunWorkerCompleted += (a, b) =>
            { Completed(this, new ResultCompletionEventArgs()); };
        worker.RunWorkerAsync();

    }

    public event EventHandler<ResultCompletionEventArgs> Completed;
}

Finally I have BootStrapper

public class AppBootstrapper : Bootstrapper<IShellViewModel>
{
    private Container container;

    protected override void Configure()
    {
        this.container = new Container();
        this.container.Register<IWindowManager,WindowManager>();
        this.container.Register<IShellViewModel,ShellViewModel>();
        this.container.Register<IBusyProvider, BusyProviderViewModel>();
    }

    protected override object GetInstance(Type serviceType, string key)
    {

        return this.container.GetInstance(serviceType);
    }


    protected override IEnumerable<object> GetAllInstances(Type serviceType)
    {
        return this.container.GetAllInstances(serviceType);
    }
    protected override void BuildUp(object instance)
    {
        this.container.Verify();
    }
}

Looks Like I have set everything,
But When I try to run it throws an exception.
enter image description here

I am sure the problem is causing by

 <DataTemplate>
            <Grid cal:Bind.Model="{Binding}">
                <TextBlock Name="Message"/>
            </Grid>
        </DataTemplate>

cal:Bind.Model=”{Binding}

Once I remove above statement the program runs without a crash but no binding.

If you look at the Image,

 protected override object GetInstance(Type serviceType, string key)
    {

        return this.container.GetInstance(serviceType);
    }

serviceType is passed as a NULL, and key is “Please Wait….” ,
Where that comes from ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T04:43:02+00:00Added an answer on June 10, 2026 at 4:43 am

    It seems by default the Extended Toolkit‘s BusyIndicator uses the string "Please Wait...." for the BusyContent. So inside the DataTemplate the DataContext will be the above mentioned string and this causes the confusion and exception in Caliburn.

    To fix it you need to set the BusyContent on the BusyIndicator to the current DataContext and it will work:

    <xctk:BusyIndicator x:Name="aaa" IsBusy="{Binding IsRunning}" 
                                     BusyContent="{Binding}" >
        <xctk:BusyIndicator.BusyContentTemplate>
            <DataTemplate>
                <Grid cal:Bind.Model="{Binding}">
                    <TextBlock Name="Message"/>
                </Grid>
            </DataTemplate>
        </xctk:BusyIndicator.BusyContentTemplate>
    </xctk:BusyIndicator>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So let me explain my problem a little better now (please reopen this question).
I have a problem with Facebook. Let me explain what I'm trying to do.
It is very difficult for me to explain this particular problem/question so please bear
I'm a newbie in Android development. Let me explain my problem. I've have a
I have some problem with generics, let me explain. I have a class which
I know this question sounds weird, but please, let me explain myself. I'm using
Let me explain the problem. We have a website in 2 languages: fr &
I have a problem about custom date range. let me explain it, for our
It might sound unnecessary, but let me explain my problem first. Probably then it
I'm struggling with add_custom_command. Let me explain the problem in detail. I've these set

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.