简体   繁体   English

从NIB生成控制C#代码并插入MonoTouch的designer.cs文件 - Visual Studio样式

[英]Generate control C# code from NIB's and insert into MonoTouch's designer.cs files - Visual Studio style

I've begun using MonoTouch 5.x. 我已经开始使用MonoTouch 5.x. I feel like I'm fighting NIB's to use inheritance. 我觉得我正在与NIB战斗以使用继承。

I want to use inheritance. 我想使用继承。 I want to use a designer to make my views. 我想用设计师来表达我的观点。 I want it all. 我全都要。

So I've been searching for a tool that generates xxx.designer.cs files like VS does it: inserting the controls in code on the fly when designing using IB. 所以我一直在寻找一个生成xxx.designer.cs文件的工具,就像VS一样:在使用IB设计时动态插入代码。 Reducing NIB's to a design-time feature. 将NIB减少为设计时功能。

As far as I can tell, this is the cleanest approach with the best performance that allows me to go full C#, "visual inheritance", etc. 据我所知,这是最干净的方法,具有最佳性能,可以让我完整的C#,“视觉继承”等。

Does anyone know of such an initiative? 有谁知道这样的倡议? In any form or shape? 任何形式或形状?

Thanks. 谢谢。

In Microsoft Visual Studio you are able to write an implementation of IVsSingleFileGenerator. 在Microsoft Visual Studio中,您可以编写IVsSingleFileGenerator的实现。 Which is then used as custom tool to generate files at design time. 然后将其用作自定义工具,以便在设计时生成文件。

Maybe there is a similar feature in monodevelop. 也许monodevelop中有类似的功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM