如何在WPF中制作自定义异形面板? [英] How to make custom shaped panel in WPF?
问题描述
据我所知,我面临的问题以前已经在这里提出过.我读了其中大多数内容,但找不到正确的答案.
I am facing a problem that have kind of already been asked here before, as far as I have seen. I read most of these but didn't find the right answer.
这就是我需要的:
- 复杂形状的区域(即国家,州).
- 有可能在其上获取事件(尤其是鼠标事件)
- 可以在其中放置一些控件(即图像,按钮)
我看到有些使用用户控件,控件模板..但是,我应该如何处理这种形状?大多数问题是关于标准形状的一些基本组合.
(我看到Blend可以用笔制作路径对象,有没有办法用它来定义区域的形状?)
I saw that some uses usercontrols, controltemplates.. But how should I do for that kind of shape ? Most of questions was for some basic mix of standard shapes.
(I saw with Blend that we can make path object with a pen, is there a way to use this to define the shape of a zone ?)
谢谢.
推荐答案
您可以使用Expression Blend SDK中提供的 PathPanel
类.更多信息在这里
You can use the PathPanel
class that is provided in the Expression Blend SDK.
More information here
这篇关于如何在WPF中制作自定义异形面板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!