首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >饼图上的DropShadow效果

饼图上的DropShadow效果
EN

Stack Overflow用户
提问于 2012-07-01 16:19:38
回答 1查看 481关注 0票数 0

我想做一个具有DropShadow效果的饼图,所以我试图将该效果放在PieDataPoint对象上,但它不起作用-饼的每一片都在其邻居上绘制自己的阴影,如下图所示:

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-07-02 18:52:05

最后,我在图表模板内的EdgePanel上设置了DropShadow效果,它起作用了。

代码语言:javascript
复制
     <Charting:Chart.Template>
            <ControlTemplate  TargetType="Charting:Chart">
                <Border>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>


                            <chartingprimitives:EdgePanel x:Name="ChartArea" Style="{TemplateBinding ChartAreaStyle}">
                            <chartingprimitives:EdgePanel.Effect>
                                <DropShadowEffect
                                    ShadowDepth = "5"
                                    Direction = "330"
                                    Color = "Gray"
                                    Opacity = "0.5"
                                    BlurRadius = "10">
                                </DropShadowEffect>
                            </chartingprimitives:EdgePanel.Effect>
                        </chartingprimitives:EdgePanel>

                            <charting:Legend x:Name="Legend" BorderThickness="0" Grid.Row="1" HorizontalAlignment="Center"/>

                        </Grid>
                </Border>
            </ControlTemplate>
        </Charting:Chart.Template>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11280516

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档