是否可以使用传统的c#和NOT xaml在WPF中定义控件? [英] Is it possible to define controls in WPF using traditional c# and NOT xaml?

查看:80
本文介绍了是否可以使用传统的c#和NOT xaml在WPF中定义控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ac #project,我完全用C#编写了Windows窗体,我想将它转换为WPF,使其更具视觉吸引力,但我不想重写控件并与设计师合作(我总是以编程方式创建和定义我的控件。

解决方案

是的,你可以。虽然我认为要获得更好的外观和感觉,你需要使用混合或一些设计工具在XAML中制作一些模板,如果你想从代码中全部制作,你就不会有问题。

检查这个链接。可以帮到你:
http://blogs.msdn.com/kirillosenkov/archive/2009/09/02/ui-without-code-or-xaml-propertygrid-dataform-etc.aspx

I have a c# project i wrote completely in C# for Windows forms and I'd like to convert it to WPF to make it more visually appealing but i dont want to have to rewrite the controls and work with the designer (i always create and define my controls programmatically).

解决方案

Yes you can. Althought I think to get a better look and feel, you will need make some templates in XAML using blend or some design tool, if you want make all from code, you will not have problem.

Check this link. May be can help you:
http://blogs.msdn.com/kirillosenkov/archive/2009/09/02/ui-without-code-or-xaml-propertygrid-dataform-etc.aspx


这篇关于是否可以使用传统的c#和NOT xaml在WPF中定义控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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