Window, interface

L'objet Window représente une fenêtre de l'environnement.

Espace de noms :  EnvDTE
Assembly :  EnvDTE (dans EnvDTE.dll)

Syntaxe

'Déclaration
<GuidAttribute("0BEAB46B-4C07-4F94-A8D7-1626020E4E53")> _
Public Interface Window
[GuidAttribute("0BEAB46B-4C07-4F94-A8D7-1626020E4E53")]
public interface Window
[GuidAttribute(L"0BEAB46B-4C07-4F94-A8D7-1626020E4E53")]
public interface class Window
[<GuidAttribute("0BEAB46B-4C07-4F94-A8D7-1626020E4E53")>]
type Window =  interface end
public interface Window

Le type Window expose les membres suivants.

Propriétés

  Nom Description
Propriété publique AutoHides Obtient ou définit une valeur indiquant si la fenêtre Outil peut être masquée.
Propriété publique Caption Obtient ou définit le titre de la fenêtre.
Propriété publique Collection Obtient la collection contenant l'objet Window qui prend en charge cette propriété.
Propriété publique ContextAttributes Obtient une collection ContextAttributes qui permet aux clients Automation d'ajouter de nouveaux attributs aux éléments actuellement sélectionnés dans la fenêtre Aide dynamique et de fournir une aide contextuelle pour les attributs supplémentaires.
Propriété publique Document Obtient l'objet Document associé à l'élément, le cas échéant.
Propriété publique DocumentData Infrastructure. Réservé à un usage interne Microsoft.
Propriété publique DTE Obtient l'objet d'extensibilité de niveau supérieur.
Propriété publique Height Obtient ou définit une valeur indiquant les dimensions de la fenêtre en pixels.
Propriété publique HWnd Infrastructure. Réservé à un usage interne Microsoft.
Propriété publique IsFloating Obtient ou définit une valeur indiquant si la fenêtre Outil flotte au-dessus des autres fenêtres.
Propriété publique Kind Obtient une chaîne indiquant le type de fenêtre.
Propriété publique Left Obtient ou définit la distance entre le bord interne gauche d'un objet et le bord gauche de son conteneur.
Propriété publique Linkable Obtient ou définit une valeur indiquant si la fenêtre Outil peut être ancrée avec d'autres fenêtres Outil.
Propriété publique LinkedWindowFrame Obtient un objet Window représentant le frame de fenêtre qui contient la fenêtre.
Propriété publique LinkedWindows Obtient une collection de toutes les fenêtres liées contenues dans le frame de fenêtre lié.
Propriété publique Object Obtient un objet accessible par nom au moment de l'exécution.
Propriété publique ObjectKind Obtient le type de l'objet Window. Il s'agit d'une chaîne GUID représentant l'outil contenu dans la fenêtre.
Propriété publique Project Obtient l'objet Project associé à l'objet Window.
Propriété publique ProjectItem Obtient l'objet ProjectItem associé à l'objet Window.
Propriété publique Selection Obtient un objet représentant la sélection actuelle sur l'objet Window.
Propriété publique Top Obtient ou définit la distance entre le bord interne supérieur d'un objet et le bord supérieur de son conteneur.
Propriété publique Type Infrastructure. Réservé à un usage interne Microsoft.
Propriété publique Visible Obtient ou définit la visibilité d'une fenêtre.
Propriété publique Width Obtient ou définit la largeur de la fenêtre en nombre de caractères.
Propriété publique WindowState Obtient ou définit l'état de la fenêtre, tel que réduite, normale, etc.

Début

Méthodes

  Nom Description
Méthode publique Activate Place le focus sur l'élément actuel.
Méthode publique Attach Infrastructure. Réservé à un usage interne Microsoft.
Méthode publique Close Ferme le document ouvert et l'enregistre éventuellement, ou ferme et détruit la fenêtre.
Méthode publique Detach Infrastructure. Réservé à un usage interne Microsoft.
Méthode publique SetFocus Infrastructure. Réservé à un usage interne Microsoft.
Méthode publique SetKind Infrastructure. Réservé à un usage interne Microsoft.
Méthode publique SetSelectionContainer Permet d'activer la définition d'objets dans la fenêtre Properties lorsque cette dernière est active.
Méthode publique SetTabPicture Définit l'image à afficher dans une fenêtre Outil.

Début

Exemples

Sub WindowExample()
   Dim Frame As Window
   Dim w1 As Window = DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer)
   Dim w2 As Window = DTE.Windows.Item(Constants.vsWindowKindOutput)
   Dim w3 As Window = DTE.Windows.Item(Constants.vsWindowKindCommandWindow)

   ' Create a linked window frame and dock Solution Explorer 
   ' and Ouput window together inside it.
   Frame = DTE.Windows.CreateLinkedWindowFrame(w1, w2, vsLinkedWindowType.vsLinkedWindowTypeDocked)
   MsgBox("Total number of windows in the linked window frame: " & Frame.LinkedWindows.Count)

   ' Add another tool window, the Command window, to the frame with 
   ' the other two.
   Frame.LinkedWindows.Add(w3)
   MsgBox("Total number of windows in the linked window frame: " & Frame.LinkedWindows.Count)

   ' Resize the entire linked window frame.
   Frame.Width = 500
   Frame.Height = 600
   MsgBox("Frame height and width changed. Now changing Command window height.")

   ' Resize the height of the Command window.
   Frame.LinkedWindows.Item(3).Height = 800
   MsgBox("Now undocking the Command window from the frame.")

   ' Undock the Command window from the frame.
   Frame.LinkedWindows.Remove(w3)
End Sub

Voir aussi

Référence

EnvDTE, espace de noms