Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这对你来说很简单:我想创建一个包含两个 .cs 文件的页面:
MainPage.cs MainPage.xaml MainPage.xaml.cs
我该怎么做?提前致谢!
部分类定义允许您在多个文件之间传播类。
http://msdn.microsoft.com/en-us/library/wa80x488.aspx
您可以像这样创建两个文件。
//MainPage.cs public partial class MainPage { private void DoSomething() { } } //MainPage2.aspx public partial class MainPage { public void GetSomething() { DoSomething(); } }