DropShadowPanel和边角半径

时间:2017-07-20 09:42:01

标签: c# xaml uwp uwp-xaml windows-community-toolkit

我想用边框控件制作投影效果。我正在使用UWP工具包。

                <article class="col-md-3 col-sm-6 col-xs-12 member-column">
                <div class="inner-box">
                    <figure class="image">
                        <?php the_post_thumbnail('convo_size_team');?>
                    </figure>
                    <div class="member-title">
                        <h4><?php the_title();?></h4>
                        <p><?php echo convo_set($teams_meta, 'designation');?></p>
                    </div>
                    <div class="member-desc">
                        <p><?php echo convo_trim(get_the_excerpt(), $text_limit);?></p>
                    </div>
                    <?php if($socials = convo_set($teams_meta, 'bunch_team_social')):?>
                    <ul class="social-links clearfix">

                        <?php foreach($socials as $key => $value):?>
                                    <li><a href="<?php echo esc_url(convo_set($value, 'social_link'));?>" class="fa <?php echo convo_set($value, 'social_icon');?>"></a></li>
                            <?php endforeach;?>
                    </ul>
                    <?php endif;?>
                </div>
            </article>

但它不能识别角半径,结果如下:

我需要它看起来像这样:

任何想法如何实现这一目标?

1 个答案:

答案 0 :(得分:5)

你需要掩饰它。目前,您只能从TextBlockShapeImage获取掩码。在这种情况下,只需将Border替换为Rectangle

<controls:DropShadowPanel x:Name="dspShadow"
                          BlurRadius="10"
                          OffsetX="0"
                          OffsetY="0"
                          ShadowOpacity="0.8"
                          Color="Black">
    <Rectangle Width="100"
               Height="48"
               Fill="Red"
               RadiusX="10"
               RadiusY="10" />
</controls:DropShadowPanel>