如何在文件后面向XAML文件添加第二个代码? [英] How do i add a second code behind file to a xaml file?

查看:67
本文介绍了如何在文件后面向XAML文件添加第二个代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio中,我想在文件后面的第二个代码添加到xaml窗口(我的主窗体)。我知道我可以有另一个(或多个)文件来构成类的部分部分,并且如果它们在同一个项目中,它们将被包括在内,但是我可以在扩展器中放置多个文件吗(在解决方案资源管理器中) ),当我扩展xaml文件以查看其背后的代码时?

In visual studio i want to add a second code behind file to a xaml window (my main form). i know i can have another (or as many) files that form partial parts of a class, and if they are in the same project they will be included, but can i make more than one file sit in the expander (in the solution explorer) when i expand the xaml file to see its code behind?

推荐答案

您的项目文件(例如.csproj)实际上是XML 。从打开文件对话框中打开.csproj文件,您将看到其结构。您可以从此处手动编辑项目文件。

Your project file (.csproj for example) is actually XML. Open the .csproj file from the open file dialog, and you will see how it is structured. You can hand edit the project file from there.

这篇关于如何在文件后面向XAML文件添加第二个代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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