# Where is the hidden XNA code????



## MrSeanKon (Feb 24, 2009)

When you make a Windows form application opening Design.cs file has the necessary statements which appear the default form (contol colour for background, Form1 for text etc)...
Clicking on the toolbox & adding a button for example on form you see what code is added.
This is useful for newbies & impatient programmers cos I have learned much reading the Design.cs files.
But for a XNA C# game where are all of them???
For example when you make a default XNA game the window's title is WindowGame1.
This statement

```
Window.Title="Hello world";
```
changes the game title. But you must know it!
Otherwise you must ask guys (like me)


----------



## Kreij (Feb 25, 2009)

In C#, when you create a windows form application it puts all of the code for controls that are dragged and dropped in your design window in the forms designer file (ie. Form1.designer.cs). You will notice that the class in your form is defined as both public and partial.

```
public partial class Form1
```
.. and that in the designer file, the class is "partial class Form1", making an extension of the Form1 class created in the forms code file.

Since XNA does not use a toolbox and design window, there is no designer code file.
So in answer to your question, there is no hidden code. What you are seeing to the default values that the code uses for the windows creation, which I do believe it gets from the AssemblyInfo.cs file. I could be mistaken on that, however. It's pretty early here.


----------

