如何创建可定制的复杂WPF控件? [英] How to create customizable complex WPF control?

查看:79
本文介绍了如何创建可定制的复杂WPF控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个可定制的复合控件.控件具有特定的形状,并且具有三个可以具有不同内容的区域.对于每个内容,都有相关的命令.由于动画,区域之间存在依赖性.这 动画必须在不同区域触发属性.有什么可能?

I need to create a customizable composite control. The control is has specific shape and it has three regions which can have different content. For each content there are commands associated. There is dependency between the regions due to animations. The animations have to trigger properties in different regions. What are the possibilities?

谢谢

推荐答案

您好,viktorg1,

Hi viktorg1,

我认为您想创建一个自定义面板来放置控件,请参考Bob Bao的以下回答: http://social.msdn.microsoft.com/Forums /en-US/wpf/thread/9f037347-51de-42d4-b0a0-00fc76c81c8b

I think you want to create a custom panel to lay the controls, please refer to below answer from Bob Bao:http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/9f037347-51de-42d4-b0a0-00fc76c81c8b

参考: http://msdn.microsoft.com/zh-cn/library/ms745058.aspx#LayoutSystem_Measure_Arrange 和示例 Adorner 类来包装子级元素,并在装饰器上添加 调整大小手柄: http://www.codeproject.com/KB/WPF/WPFDiagramDesigner_Part1.aspx?msg=3168123

Refer to:http://msdn.microsoft.com/en-us/library/ms745058.aspx#LayoutSystem_Measure_Arrange and a sample Custom Radial Panel Sample. Then you could use the Adorner class to wrap the child elements and add the resize handles on the adorner: http://www.codeproject.com/KB/WPF/WPFDiagramDesigner_Part1.aspx?msg=3168123

顺便提一句,以下项目可能会为您提供帮助: http://avalondock.codeplex.com/

On a side note, the following project may help you:  http://avalondock.codeplex.com/

关于动画,在自定义控件"中没有什么不同,请参阅动画信息: http://msdn. microsoft.com/en-us/library/ms752312.aspx

About animation, it is no different in Custom Control, refer animation information:http://msdn.microsoft.com/en-us/library/ms752312.aspx

今天过得愉快.


这篇关于如何创建可定制的复杂WPF控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆