Skip to content

Commit

Permalink
Added an example of using the tool window's GetWindowFrame() method.
Browse files Browse the repository at this point in the history
  • Loading branch information
reduckted committed Jun 3, 2023
1 parent ae29085 commit 63fc5c3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions demo/VSSDK.TestExtension/ToolWindows/RunnerWindow.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.ComponentModel.Design;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -30,6 +31,13 @@ public Pane()
{
BitmapImageMoniker = KnownMonikers.StatusInformation;
ToolBar = new CommandID(PackageGuids.TestExtension, PackageIds.RunnerWindowToolbar);
WindowFrameAvailable += (_, _) => Debug.WriteLine("RunnerWindow frame is now available");
}

public override void OnToolWindowCreated()
{
base.OnToolWindowCreated();
GetWindowFrame().OnShow += (_, args) => Debug.WriteLine($"RunnerWindow state changed: {args.Reason}");
}
}
}
Expand Down

0 comments on commit 63fc5c3

Please sign in to comment.