Open alexlck opened 7 years ago
I met the same problem with you. Waiting for someone help us....
I ran into the same problem, but after some digging I managed to find what was the problem for me.
At some point you're asked to add SetupCurrentDisplay (DEFAULT_DISPLAYFRAMETYPE) to your newly declared MainPage_Loaded.
void MainPage_Loaded(object sender, RoutedEventArgs e)
{
SetupCurrentDisplay(DEFAULT_DISPLAYFRAMETYPE);
}
When you do this you this you also need to make sure that you remove the SetupCurrentDisplay (DEFAULT_DISPLAYFRAMETYPE) from the MainPage() (as mentioned in Lab8). I, sadly enough, forgot to do this and ended up declaring it twice.
That means that your MainPage() should go from this:
public MainPage()
{
this.kinectSensor = KinectSensor.GetDefault();
SetupCurrentDisplay(DEFAULT_DISPLAYFRAMETYPE);
this.coordinateMapper = this.kinectSensor.CoordinateMapper;
this.multiSourceFrameReader = this.kinectSensor.OpenMultiSourceFrameReader(
FrameSourceTypes.Infrared
| FrameSourceTypes.Color
| FrameSourceTypes.Depth
| FrameSourceTypes.BodyIndex
| FrameSourceTypes.Body);
// ...
To this:
public MainPage()
{
this.kinectSensor = KinectSensor.GetDefault();
this.coordinateMapper = this.kinectSensor.CoordinateMapper;
this.multiSourceFrameReader = this.kinectSensor.OpenMultiSourceFrameReader(
FrameSourceTypes.Infrared
| FrameSourceTypes.Color
| FrameSourceTypes.Depth
| FrameSourceTypes.BodyIndex
| FrameSourceTypes.Body);
// ...
If this was the case, then after changing this, everything should work as intended.
I hope this helps!
I think I have already removed it ...And I used the code offered by the author, the same problem happened..
when I run the code of lab 8,it was built successfully,but the mainwindow is black , I don't know what to do and anyone met the same problem with me?