LightBuzz / Vitruvius

A set of easy-to-use Kinect utilities that will speed-up the development of your projects.
http://vitruviuskinect.com
Apache License 2.0
229 stars 82 forks source link

Joint selector #22

Open birbilis opened 8 years ago

birbilis commented 8 years ago

was comparing the WPF and WinRT versions of Joint selector (I know you've told me they've been merged now, but I don't see the merged version uploaded yet) and did some code cleanup there and noticed two things:

1) there are some foreach loops that seem to be useless (have marked them with comments if you merge the pull request that is pending). Most probably those should be removed or add code to them if they need indeed to do something for each selector (if they all need to do the same then move the loop in some protected method and call it from everywhere)

2) the WinRT version misses the BodyBackground property of the WPF one and I see in the winrt XAML it binds the background of the body path to the Background property of the UserControl instead (that property isn't used at all by UserControl [doesn't paint its background] as I have found out some time ago talking to some VS program manager after related feedback I had sent). Not sure what you opted for in the merged version.

I think it is cleaner to have a BodyBackground property and maybe bind the Background property of the UserControl to the Background property of your layout grid (which is now transparent).

Care should be taken though with propagation of mouse events on the background of the control (if somebody might care about them), they differ if a control has Null to when it has Transparent Background property. In such a case one might have to set a default value to the background of the UserControl in the XAML (say set it explicitly to Transparent and then bind to it from the layout grid's Background property [and have the path's background bind to BodyBackground in WinRT version too as I write above])