How to generate xib.cs extension

Hi,

I realized that in an almost 2 years project I have some XIB files with their associated xib.cs files and xib.designer.cs and newer XIB files associated to cs and designer cs. I never thought about this could be important.

Since ASP.NET generates it ASPX files with aspx.cs and aspx.designer.cs, how can I make MonoDevelop to create xib.cs files again and how can I rename those doesn't have xib.cs? (just rename?)

I see today that if I get a cs file shared between Visual Studio and MonoDevelop and on ASP.NET a aspx.cs file with exclusive things (like Page_Load) and on xib.cs file on MonoTouch with exclusive MonoTouch things (like ViewDidLoad) I can avoid some #if ASPNET #elif MonoTouch...

But as it is a bit messed on 40 xibs project being crossplatformed to ASPX/MonoDroid/Windows Phone... I must clean this.

Thanks,

Karl

Posts

  • EternalBardEternalBard BRBeta ✭✭

    I think I got it...

    Inside MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.IPhone/templates-file are the xft.xml file templates, so I modified view controller files for iPhone and iPad in 2 places:

    1:

    <File name="${Name}.${LanguageExtension}">
    

    to

    <File name="${Name}.xib.${LanguageExtension}">
    

    2:

    <File name="${Name}.designer.cs" AddStandardHeader="False" SuppressAutoOpen="True" DependsOn="${Name}.cs">
    

    to

    <File name="${Name}.xib.designer.cs" AddStandardHeader="False" SuppressAutoOpen="True" DependsOn="${Name}.xib.cs">
    
Sign In or Register to comment.