

SpriteBatch.DrawString(font, BackgroundColor.ToString(), new Vector2(11, 11), Color.White) SpriteBatch.DrawString(font, BackgroundColor.ToString(), new Vector2(10, 10), Color.Black) This is the control that will display the color being debugged.Īdd the following public field to the new ColorControl public Color BackgroundColor = Color.CornflowerBlue Ĭhange the contents of the ColorControl’s Draw method to contain: GraphicsDevice.Clear(BackgroundColor) We will be adding this control to the form later. While we have the properties window open, we can change the Assembly Name to XNAVisualizerĭelete the SpinningTriangleControl from the project. Under the Application tab change the Output Type from Windows Application to Class Library Rename all of the namespaces to XNAVisualizer.Ī shortcut for renaming all of the namespaces is to change one name and then click on the dropdown it makes and select “Rename ‘WinFormsGraphicsDevice’ to ‘XNAVisualizer’Ĭhange the project type from Windows Form to Windows Library.ĭouble click on the Properties node in the Solutions Explorer. Open the solution file and rename the project in the Solution Explorer Rename the solution file to XNAVisualizer.sln Start with the Educational Example: WinForms Series 1: Graphics DeviceĮxtract this to a new folder called XNAVisualizer We want our windows form to actually utilize XNA and there is no reason to reinvent the wheel. We will be altering the earlier steps a little since we are going to start off with a Creators Club Online Educational Example. Copying the compiled assembly into one of two folders so Visual Studio can load it and use it.

Add the assembly attribute DebuggerVisualizer setting the appropriate properties.Override the Show method from the abstract class.

