Skip to content

Commit 63fc5c3

Browse files
committed
Added an example of using the tool window's GetWindowFrame() method.
1 parent ae29085 commit 63fc5c3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

demo/VSSDK.TestExtension/ToolWindows/RunnerWindow.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.ComponentModel.Design;
3+
using System.Diagnostics;
34
using System.Runtime.InteropServices;
45
using System.Threading;
56
using System.Threading.Tasks;
@@ -30,6 +31,13 @@ public Pane()
3031
{
3132
BitmapImageMoniker = KnownMonikers.StatusInformation;
3233
ToolBar = new CommandID(PackageGuids.TestExtension, PackageIds.RunnerWindowToolbar);
34+
WindowFrameAvailable += (_, _) => Debug.WriteLine("RunnerWindow frame is now available");
35+
}
36+
37+
public override void OnToolWindowCreated()
38+
{
39+
base.OnToolWindowCreated();
40+
GetWindowFrame().OnShow += (_, args) => Debug.WriteLine($"RunnerWindow state changed: {args.Reason}");
3341
}
3442
}
3543
}

0 commit comments

Comments
 (0)