View2.Name Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the name of the view.
public:
property System::String ^ Name { System::String ^ get(); };
public string Name { get; }
member this.Name : string
Public ReadOnly Property Name As String
Property Value
Implements
Examples
In the following example the Name property of the ViewObject object is used to determine which view the user has switched to. If the view is the "Archive Customer" view, a note value is added to the form's underlying XML document:
if (thisXDocument.View.<span class="label">Name</span> == @"Archive Customer")
{
IXMLDOMNode notes = thisXDocument.DOM.selectSingleNode(@"/Customers/CustomerInfo/Notes");
IXMLDOMNode div = thisXDocument.DOM.createNode(1, "div", @"http://www.w3.org/1999/xhtml");
div.text = "Note recorded " + thisXDocument.Util.Date.Now().ToString();
notes.appendChild(div);
}
Remarks
To determine the default view use the IsDefault property of the ViewInfoObject object.