Forum Cross Platform with Xamarin


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

How to generate xib.cs extension


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.




  • EternalBardEternalBard BRBeta ✭✭

    I think I got it...

    Inside are the xft.xml file templates, so I modified view controller files for iPhone and iPad in 2 places:


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


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


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


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