locked
How to invoke and use the default loading screen in a custom control? RRS feed

  • Question

  • Hi everyone,

    I have a custom control (a listbox) which gets programmatically filled with data. In any screen, there is some kind of a "loading mask", which shows up while the data is being fetched. Is there any chance to use this feature in Beta 1?

    Sunday, January 30, 2011 10:27 AM

Answers

  • Daniel,

    If you are trying to show the spinner while the data is loading there is a control you can wrap you custom control in.  It is the CancellableContentControl.  This has a property called ExecutableObject this gets set to the Choices.Loader.


    Derek
    Wednesday, February 2, 2011 5:38 PM

All replies

  • Can you be more specific?  Are you asking about events, ui transistions ?
    Derek
    Tuesday, February 1, 2011 8:23 PM
  • Daniel,

    If you are trying to show the spinner while the data is loading there is a control you can wrap you custom control in.  It is the CancellableContentControl.  This has a property called ExecutableObject this gets set to the Choices.Loader.


    Derek
    Wednesday, February 2, 2011 5:38 PM
  • This is exactly what I was looking for - thanks! :)
    Wednesday, February 2, 2011 5:53 PM
  • Hey, I tried to do the offered solution but was unable to! Can you please be more specific? I have tried creating a CancellableContentControl which has another control that implements IExecutable as its ExecutableObject, however Execute/AsyncExecute are never called! do I need to call them myself? can you please include a code example of usage? Thanks!
    Wednesday, February 9, 2011 8:13 PM
  • I believe so.  I have a similar situation whereby I have a control which implements IExcutable and could not figure out how to make it give me an execute method like a button does.  I then realized that the button has a SupportedContentItemKind of Command.  This would negate using that way as I don't think you can have 2 SupportedContentItemKind 's.  So I cast it as IExecutable and Call the execute method myself.


    Derek
    Wednesday, February 9, 2011 10:34 PM