About the Custom selection extension Sample
[C#]
ToggleDockWinBtn.cs
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Framework;
namespace SelectionSample
{
public class ToggleDockWinBtn : ESRI.ArcGIS.Desktop.AddIns.Button
{
public ToggleDockWinBtn()
{
}
protected override void OnClick()
{
IDockableWindow dockWindow = SelectionExtension.GetSelectionCountWindow();
if (dockWindow == null)
return;
dockWindow.Show(!dockWindow.IsVisible());
}
protected override void OnUpdate()
{
this.Enabled = SelectionExtension.IsExtensionEnabled();
}
}
}
[Visual Basic .NET]
ToggleDockWinBtn.vb
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.IO
Imports ESRI.ArcGIS.esriSystem
Imports ESRI.ArcGIS.Framework
Namespace SelectionSample
Public Class ToggleDockWinBtn
Inherits ESRI.ArcGIS.Desktop.AddIns.Button
Public Sub New()
End Sub
Protected Overrides Sub OnClick()
Dim dockWindow As ESRI.ArcGIS.Framework.IDockableWindow
dockWindow = SelectionExtension.GetSelectionCountWindow()
If dockWindow Is Nothing Then
Return
End If
dockWindow.Show((Not dockWindow.IsVisible()))
End Sub
Protected Overrides Sub OnUpdate()
Me.Enabled = SelectionExtension.IsExtensionEnabled()
End Sub
End Class
End Namespace