This project is read-only.

Physics/CustomBlocks, What am I missing here?

Jan 26, 2011 at 7:00 PM

Been looking at bling ui for a little while now.  Seems pretty expressive and concise.
I am interested in the physics portion of bling ui.  I have had success doing the simple hello world label with thumbs and lighting within my own project.

However, I can not figure out what I am doing wrong when it comes to using Physics/CustomBlocks within my own project.

Maybe I am creating the view incorrectly?
I am using a tabcontrol with a tabControl_SelectionChanged event, and creating my view like so:

namedtabitem.Content=new Strip();

Where Strip() is the same class as is found in Bling.UI Physics.Tutorial, except where it references images, it now references images within my own custom solution.
The PhysicsCanvas shows normal image controls, thumbs, sliders, etc outside of PhysicsBlocks fine.  But the controls within my PhysicsBlocks don't seem to show up.

I am confused, what I'm missing?

Any insight would be appreciated!

Jan 30, 2011 at 8:28 AM

Could you port or send me the code in question?


Jan 30, 2011 at 9:52 PM

I threw together a sample of what I was talking about.  Let me know what you think. 


Jan 31, 2011 at 6:54 AM

The examples are probably a bit too magical, you have to start the physic canvases timer manually (the slide holder in the tutorial does this automatically):


namespace BlingUITabControlTest
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
        public MainWindow()
            Strip s = new Strip();
            tabItem1.Content = s;



Jan 31, 2011 at 1:52 PM

That was my missing piece.  Works just as it should now.
Thank you!

Jan 31, 2011 at 3:04 PM

Looking now at the physics page @:

It does say "This page out of date! I'll have to redo the tutorial for physics. The abstractions have changed in Bling 3, for the better mostly."

I believe that I am using what would be considered "trunk": "wpfsignals-blingui.svn\Bling\Presentation\bin\Release\Bling.dll"  Is this considered Bling 3 or something else?
The examples are wonderful, and yes magical.  I've got quite a bit more playing to do, I don't yet fully understand how everything works...awesome stuff though.
Might I suggest that we add a mention of the need for Start() on this physics page or on the other "redo" of the tutorial.

Would it be possible to provide placement/view for PhysicsCanvas when Start() has not been called?  Maybe perform calcs for initial placement and then freeze....
Or is it it more complex than that?  (The need for a call to Start() is no issue for me, I ask out of curiosity) 

There is quite a bit of code and example there to consume so I expect much of my questions to be answered there...given some time.

Thanks again,