将xaml对象转换为cs [英] Convert xaml objects into cs

查看:285
本文介绍了将xaml对象转换为cs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将在Microsoft Expression中创建并保存为xaml文件的对象转换为cs格式,以便可以将它们作为对象添加到我的visual studio工具箱中



< b>我尝试了什么:



此时卡住了



我该怎么办?转换在Microsoft Expression中创建并作为xaml文件保存为cs格式的对象,以便它们可以作为对象添加到我的visual studio工具箱中

How can I convert objects created in Microsoft Expression and saved as xaml files to cs format so that they can be added as objects in my visual studio toolbox

What I have tried:

stuck at this point

How can I convert objects created in Microsoft Expression and saved as xaml files to cs format so that they can be added as objects in my visual studio toolbox

推荐答案

你已经领先于自己。



任何XAML用户控件(在Blend或VS中创建)将自动显示在工具箱上(如果它们在范围内)(项目文件夹和/或者类库。)
You're getting ahead of yourself.

Any XAML "user controls" (created in Blend or VS) will "automatically" show up on the toolbox if they are in scope (project folders and / or class libraries).


我不知道任何自动转换器,所以据我所知,你最好的办法是简单地创建包含你的XAML形式的控件的WPF类库。我一直这样做。



我想不出把XAML转换成C#的任何实际好处......
I am not aware of any automated converter, so as far as I know, your best bet is to simply create WPF class libraries that contain your controls in their XAML form. I do it all the time.

I can't think of any tangible benefit to putting converting XAML to C#...


这篇关于将xaml对象转换为cs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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