The Sample Program

Windows Forms User's Guide > Howto: Use XML Files

The sample program has only one menu item, which is Open File.... Looking at the source code reveals nothing unusual: The main difference to the Open File routine in other Text Control sample programs is the Load method being called with the StreamType value XMLFormat as a parameter, so that the Open File dialog box will only display XML files:

private void mnuFile_Open_Click(object sender, System.EventArgs e)
[Visual Basic]
Private Sub mnuFile_Open_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles mnuFile_Open.Click
End Sub

There is quite a bit happeing behind the scenes, however. If you load the TestFile.xml sample file, Text Control will not only load the xml file, but will

Let us take a closer look at the 3 files involved.