I am trying to port my Windows 8 Store application from Developer Preview to RTM now and I got problems with importing old XAML layout into the newly created project (the old project isn't runnable anymore).
Whenever I import .xaml and .xaml.cs files, they are not recognized as a single file. Rather, two different files are added. How can I import both files as a single "entity", as it happens if I add a new XAML page to my project?
Code-behind is a term used to describe the code that is joined with markup-defined objects, when a XAML page is markup-compiled. This topic describes requirements for code-behind as well as an alternative inline code mechanism for code in XAML.
xaml. Go to Solution Explorer-->Your Project-->Portable-->Right click-->Add-->New Item (Ctrl+Shift+A). Now, select the Forms XAML page and give the name (SecondPage. xaml).
To open the XAML Designer, right-click a XAML file in Solution Explorer and choose View Designer. to switch which window appears on top: either the artboard or the XAML editor.
Corresponding .cs
or .vb
files are imported on import of .xaml
files,
but in VS2012 there is one catch:
you must import only one XAML file at a time
If you mark more than one file in file selector, XAML files are not paired correctly with their corresponding code files (even in case if you switch filter to All Files and then select both XAML and code files).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With