views:

191

answers:

0

Hi All,

I have a Viewport2DVisual3D control that contains a MaterialGroup as its Viewport2DVisual3D.Material property:

<Viewport2DVisual3D.Material>
<MaterialGroup>
  <DiffuseMaterial Brush="{DynamicResource ImageBrush1}"/>
  <DiffuseMaterial Viewport2DVisual3D.IsVisualHostMaterial="True" Brush="White"/>
</MaterialGroup>
</Viewport2DVisual3D.Material>

But when I do this (i.e. have two instead of a single material which is IsVisualHostMaterial=True) the Visual property streches EVERYTHING inside of it to fit the mesh... why is this so?

i.e.

<Viewport2DVisual3D.Visual>
  <Canvas x:Name="shard1Grid">
  <Image Source="Particles Small_00054.png" 
    Width="150" 
    Height="150" />
  </Canvas>
</Viewport2DVisual3D.Visual>

The image is NOT 150 by 150, actually its streched to fill the mesh

Any help you give is greatly appreciated!

Cheers, Mark