对 ControlTemplate 进行逆向工程
Windows Workflow Foundation 4 包含一个类似于 Winforms 的 WPF 属性网格。顶部的工具栏有一个 CLEAR 按钮,而不是 Visual Studio 显示的 X。该控件有一个 ControlTemplate 属性,该属性在运行时不为 null。该模板使用了工具栏按钮的各种字形。
是否有任何工具或技术可以让我提取此模板?我想检查和修改 XAML 以重新设计工具栏(主要是更改按钮标签)。
我可以通过编程方式访问模板对象,但我不确定如何将其序列化为 XAML。
Windows Workflow Foundation 4 contains a WPF property grid similar to the one available for Winforms. The toolbar up the top has a CLEAR button rather than the X shown by Visual Studio. This control has a ControlTemplate property that is not null at runtime. The template makes use of various glyphs for toolbar buttons.
Are there any tools or techniques that will allow me to extract this template? I would like to examine and modify the XAML to restyle the toolbar (mostly just change the button label).
I have programmatic access to the template object but I'm not sure how to serialize this into XAML.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过简单地使用
XamlWriter.Save
?例如
Have you tried simply using
XamlWriter.Save
?e.g.
你试过Red Gate的Reflector吗?当然,如果程序集被混淆了,它可能并没有多大帮助。
have you tried Red Gate's Reflector? Of course, if the assembly is obfuscated it may not really be of much help.