如何将控件[如图像]剪切为路径/形状[如星/圆]

时间:2013-04-03 15:00:41

标签: c# windows-phone-7 xaml windows-phone-8

clipped Image control加入Border,其中包含blog

示例xaml代码

        <Border Behaviors:ImageClip.ToBounds="True">
            <Image  Source="{Binding Image}"/>
        </Border>

但我如何clipImage Control加入Path / Shape [喜欢星/椭圆]。我尝试过以前的方法。但是由于路径没有{{}而没有成功1}}属性,以便我们无法将Content设置为Image Clip Behaviour

我试过Path Fill。但这不适合我的情况因为我必须实现一些ImageBrush像Pinch&amp;放大behaviours

因此被卡住了。 有人可以帮我提出任何建议或样品吗?

1 个答案:

答案 0 :(得分:0)

您是否考虑过拍摄路径/形状并将背景或填充属性设置为图像画笔?

请参阅:How to Use an image as ImageBrush on a Line or Path in WPF