InPlace编辑模板。 [英] InPlace editing of templates.

查看:83
本文介绍了InPlace编辑模板。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有自定义控件。它的控件模板包含几个部分,例如它包含2个按钮。我的控件有2个ControlTemplate类型的依赖项属性,这个属性用于ControlTemplate中的2个按钮。每个按钮都将其Template属性绑定到此DependencyProperty之一。
接下来 - 我尝试在EditAdditionalTemplates菜单中编辑这两个ControlTemplates之一并遇到问题。模板编辑在新选项卡中打开 - 但我需要在同一选项卡中的自定​​义控件模板的上下文中编辑此模板。那么什么是 需要额外的模板来编辑它们,而不是在新标签中。例如 - TabItem的Header模板的编辑不会在新选项卡中打开 - 您可以在同一选项卡中的TabItem上编辑此模板。

在其中编辑其他模板非常重要。

解决方案

你好,如果我正确理解你的问题,那么只有在风格上才能进行编辑和或模板是当前主机文件的本地模板。因此,当你去编辑某些东西时,你可以在本地编辑一份副本,这样可以解决你的问题。

我一直在为一个更加流畅的方法而尖叫,所以我觉得你很痛苦点。

干杯

Hi,
I have a custom control. It's control template contains of several parts, for example it contains 2 button. My control have 2 dependency properties of type ControlTemplate and this properties used for 2 buttons in ControlTemplate. Each of this buttons binds its Template property to one of this DependencyProperty.
Next - i trying to edit one of this 2 ControlTemplates in EditAdditionalTemplates Menu and got a problem. The Template editing is open in new tab- but I need to edit this template in context of Template of my custom control, in the same tab. So what is the requirement for additinal templates to edit them inplace, but not in new tab. For example - editing of Header template for TabItem not opens in new tab - you can edit this template right on TabItem in the same tab.

It's very important to edit additional templates inplace.

解决方案

Howdy,

If I am understanding your issue correctly, in place editing only happens when the style and or template is local to the current host file. So when you go to edit something, you can edit a copy locally and that should solve your problem.

Ive been screaming out for a more fluid approach to this for some time now, so I feel your pain.

Cheers


这篇关于InPlace编辑模板。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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