3D投影效果求助
最近在做GIS开发点击地图打点的时候希望参考Google Map里面的投影效果,但是不知道如何才能实现这种3D投影效果,特来求助各位。
DropShadowEffect无法满足3D的投影效果,只能进行平面投影偏移。具体实现方法你们是怎么做的呢?
[解决办法]
<Grid x:Name="LayoutRoot" Canvas.ZIndex="999" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" RenderTransformOrigin="0,0">
<Path Fill="White" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="Fill" Stroke="#FF494646" Height="239.5" Width="332" Data="M0.5,10.5 C0.5,4.9771523 4.9771523,0.5 10.5,0.5 L321.5,0.5 C327.02286,0.5 331.5,4.9771523 331.5,10.5 L331.5,157.5 C331.5,163.02284 327.02286,167.5 321.5,167.5 L243,167.5 L148,239 L198,167.5 L10.5,167.5 C4.9771523,167.5 0.5,163.02284 0.5,157.5 z" UseLayoutRounding="False" Canvas.ZIndex="1"/>
<Path Stretch="Fill" HorizontalAlignment="Left" VerticalAlignment="Top" Opacity="1" RenderTransformOrigin="0,0.7" StrokeThickness="1" Fill="#59000000" Margin="-28.398,-30.999,0,0" Stroke="Black" Height="239.5" Width="332" UseLayoutRounding="False" Data="M0.5,10.5 C0.5,4.9771523 4.9771523,0.5 10.5,0.5 L321.5,0.5 C327.02286,0.5 331.5,4.9771523 331.5,10.5 L331.5,157.5 C331.5,163.02284 327.02286,167.5 321.5,167.5 L243,167.5 L148,239 L198,167.5 L10.5,167.5 C4.9771523,167.5 0.5,163.02284 0.5,157.5 z">
<Path.Effect>
<BlurEffect Radius="10"/>
</Path.Effect>
<Path.Projection>
<PlaneProjection RotationX="-37"/>
</Path.Projection>
<Path.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="0.85" ScaleY="0.5"/>
<SkewTransform AngleX="-49" AngleY="0"/>
<RotateTransform Angle="0"/>
<TranslateTransform X="117" Y="60"/>
</TransformGroup>
</Path.RenderTransform>
</Path>
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" x:Name="tipContext" Margin="17,17,34,17" Width="281" Height="132" Canvas.ZIndex="1"/>
<HyperlinkButton Height="15" TargetName="" HorizontalAlignment="Left" Margin="300,5,3,0" VerticalAlignment="Top" Width="28" Canvas.ZIndex="1">
<!--<HyperlinkButton.Background>
<ImageBrush ImageSource="close.png" Stretch="Fill"/>
</HyperlinkButton.Background>-->
<HyperlinkButton.Content>
<TextBlock Text="X" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Red" FontSize="14"/>
</HyperlinkButton.Content>
</HyperlinkButton>
</Grid>