Proprietà HTMLWindow.Parent
Ottiene l'oggetto padre immediato di un oggetto HTMLWindow.
Spazio dei nomi: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Sintassi
'Dichiarazione
ReadOnly Property Parent As Window
Window Parent { get; }
property Window^ Parent {
Window^ get ();
}
abstract Parent : Window with get
function get Parent () : Window
Valore proprietà
Tipo: EnvDTE.Window
Oggetto Window.
Note
La proprietà Parent restituisce il primo oggetto padre per l'oggetto o la raccolta.
Esempi
public void CodeExample(DTE2 dte, AddIn addin)
{
// Make sure you have an open HTML document before running this example.
try
{
if (dte.ActiveDocument.ActiveWindow.Object is HTMLWindow)
{
HTMLWindow htmlwin;
string msg = "";
htmlwin = dte.ActiveDocument.ActiveWindow.Object as HTMLWindow;
// Show the related application object's name.
msg += "The application containing this HTMLWindow is " + htmlwin.DTE.Name;
// Show the HTMLWindow's parent object.
msg += "\nThe HTMLWindow's parent object is " + htmlwin.Parent.Type.ToString();
MessageBox.Show(msg);
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
Sicurezza di .NET Framework
- Attendibilità totale per il chiamante immediato. Impossibile utilizzare questo membro in codice parzialmente attendibile. Per altre informazioni, vedere Utilizzo di librerie da codice parzialmente attendibile.
Vedere anche
Riferimenti
Altre risorse
Procedura: compilare ed eseguire gli esempi di codice del modello a oggetti di automazione