Mouse Tracking Provider: TrackingArea

Sep 14, 2011 at 9:54 AM

Does anyone have an example of the XAML needed to use the Mouse Tracking Provider?

I'm struggling setting the TrackingArea property correctly - I can set it but it's not firing any events:

 

<ht:Headtracking3DDecorator x:Name="ht3dd" TargetPosition="0 0 3.5">   

  <Viewport3D ...>

  ...

  </Viewport3D>

  <ht:Headtracking3DDecorator.HeadtrackingProvider >

    <ht:MouseHeadtrackingProvider>

      <ht:MouseHeadtrackingProvider.TrackingArea >

        <Canvas x:Name="myTrackingArea" Height="1000" Width="1000" Background ="Red" />

      </ht:MouseHeadtrackingProvider.TrackingArea >

    </ht:MouseHeadtrackingProvider >

  </ht:Headtracking3DDecorator.HeadtrackingProvider >

</ht:Headtracking3DDecorator >

Any ideas??

Sep 14, 2011 at 10:02 AM

Never mind! Just set the TrackingArea = Application.Current.Windows[0] in code behind :)