mcpField
S
syncfusion-winforms-statusstrip

syncfusion-winforms-statusstrip

github.com/syncfusionデザイン・UI277 回インストール1 週間前に更新
リポジトリ

syncfusion-winforms-statusstrip について

Windows Forms 開発者向けの、フォームや Ribbon の下部にステータスバーを設ける Syncfusion StatusStripEx の実装ガイドです。多様な項目、Office テーマ、配色、サイズ変更グリップの設定を扱います。

主な機能

  1. 01ラベル、ボタン、ドロップダウン、トラックバーの追加
  2. 02プログレスバーと通知項目の表示
  3. 03Office2007 と Office2016 のスタイル適用
  4. 04配色とコンテキストメニューのカスタマイズ
  5. 05サイズ変更グリップの設定

活用シーン

  1. 01文書エディターでページ、語数、ズームを表示
  2. 02データアプリで接続状態とレコード数を表示
  3. 03バックグラウンドタスクの進捗を表示
  4. 04Ribbon アプリにステータスバーを追加

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/syncfusion/winforms-ui-components-skills --skill syncfusion-winforms-statusstrip

インストール後、Claude Code で/syncfusion-winforms-statusstripを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

references/
getting-started.md
sizing-grip.md
status-items.md
styling-and-appearance.md

詳細

Syncfusion WinForms StatusStripEx の実装

StatusStripEx コントロールは、フォームや Ribbon コントロールの下部に追加できる、拡張されたステータスストリップです。さまざまな項目の種類、Office テーマ、カスタムカラー、柔軟な配置に対応しており、プロフェッショナルなステータスバーを作成できます。

このスキルを使用する場面

次のようなニーズがある場合に、このスキルを使用してください。

  • アプリケーションのステータスバー: フォーム下部にアプリケーションの状態、ユーザー情報、またはシステムの状態を表示する
  • 進行状況インジケーター: ステータスストリップにプログレスバーや読み込みインジケーターを表示する
  • Ribbon のステータスストリップ: RibbonControlAdv の下部にステータスバーを追加する
  • 左寄せ/右寄せ: 左寄せ(通知)と右寄せ(ステータス)で異なる項目の種類を使用する
  • テーマ付きステータスバー: Office2007(Silver/Blue/Black)または Office2016 のテーマを使用する
  • カスタムステータス項目: ボタン、ラベル、ドロップダウン、分割ボタン、プログレスバー、トラックバーを使用する
  • サイズ変更グリップ: 外観をカスタマイズできる、フォームのサイズ変更インジケーターを使用する
  • ステータス情報: ファイル情報、レコード数、ズームレベル、接続状態を表示する
  • Word スタイルのコンテキストメニュー: ステータス項目用のカスタムコンテキストメニューを使用する

コンポーネントの概要

StatusStripEx(Syncfusion.Windows.Forms.Tools.StatusStripEx)は、次の機能に対応した拡張ステータスストリップコントロールです。

  • 2 種類の項目:
    • StatusControl 項目: 右寄せ(StatusLabel、ProgressBar、DropDownButton、SplitButton、PanelItem、TrackBarItem)
    • 通知項目: 左寄せ(StatusStripButton、StatusStripLabel、StatusStripProgressBar など)
  • Office2007 の配色: Silver、Blue、Black
  • Office2016 のビジュアルスタイル: Colorful、White、Black、DarkGray
  • カスタム管理色: カスタムカラーテーマを適用できます
  • サイズ変更グリップ: 右下隅のサイズ変更グリップをカスタマイズできます
  • スマートタグ対応: デザイナーから項目をすばやく追加できます
  • カスタムコンテキストメニュー: Word2007 スタイルのステータスバーコンテキストメニューを使用できます
  • Ribbon との統合: RibbonControlAdv とシームレスに連携します

主な名前空間: Syncfusion.Windows.Forms.Tools

アセンブリ: Syncfusion.Tools.Windows.dll(および依存関係)


ドキュメントとナビゲーションガイド

はじめに

📄 参照: references/getting-started.md

参照する場面: StatusStripEx のインストール、構成、または初めての作成が必要な場合です。

内容:

  • アセンブリの配置と NuGet パッケージのインストール
  • デザイナー(ツールボックス)からの StatusStripEx の追加
  • コードからの StatusStripEx の追加
  • フォームまたは Ribbon の下部へのドッキング
  • 項目を追加するための Items コレクションエディター
  • 項目をすばやく追加するためのスマートタグ対応
  • 基本的なステータスストリップの設定
ステータス項目とコレクション

📄 参照: references/status-items.md

参照する場面: ステータスラベル、プログレスバー、ボタンの追加や、項目の配置について確認する場合です。

内容:

  • StatusControl 項目(右寄せ):StatusLabel、ProgressBar、DropDownButton、SplitButton、PanelItem、TrackBarItem
  • 通知項目(左寄せ):StatusStripButton、StatusStripLabel、StatusStripProgressBar、StatusStripDropDownButton など
  • StatusControl 項目と通知項目の違い
  • Items コレクションを使用した項目のプログラムによる追加
  • 項目の配置と整列の方法
  • 各種項目を効果的に使用する方法
サイズ変更グリップのカスタマイズ

📄 参照: references/sizing-grip.md

参照する場面: サイズ変更グリップの表示/非表示や、外観のカスタマイズが必要な場合です。

内容:

  • サイズ変更グリップの概要と目的
  • SizingGrip プロパティ(true/false)
  • GripStyle プロパティ(Visible、Hidden)
  • 間隔を設定する GripMargin プロパティ
  • グリップの外観のカスタマイズ
  • サイズ変更グリップを表示または非表示にするタイミング
スタイルと外観

📄 参照: references/styling-and-appearance.md

読むタイミング: Office2007/2016 のテーマや、カスタムのステータスバーの色を設定する場合。

扱うトピック:

  • Office2007 の配色(Silver、Blue、Black)
  • OfficeColorScheme プロパティの使い方
  • Office2016 のビジュアルスタイル(Colorful、White、Black、DarkGray)
  • VisualStyle プロパティの設定
  • ApplyManagedColors を使ったカスタムの管理色
  • カスタムのコンテキストメニュー(Word2007 風)
  • コンテキストメニュー項目の StatusString プロパティ

クイックスタートの例

項目を含む基本的な StatusStripEx
using Syncfusion.Windows.Forms.Tools;
using System.Windows.Forms;

// Create StatusStripEx
StatusStripEx statusStripEx1 = new StatusStripEx();

// Create status label (right-aligned)
ToolStripStatusLabel statusLabel = new ToolStripStatusLabel();
statusLabel.Text = "Ready";

// Create progress bar (right-aligned)
ToolStripProgressBar progressBar = new ToolStripProgressBar();
progressBar.Value = 50;

// Add items to StatusStripEx
statusStripEx1.Items.AddRange(new ToolStripItem[] {
    statusLabel,
    progressBar
});

// Dock to bottom
statusStripEx1.Dock = DockStyleEx.Bottom;

// Add to form
this.Controls.Add(statusStripEx1);
Office2016 テーマを使用した StatusStripEx
// Apply Office2016 Colorful theme
statusStripEx1.VisualStyle = StatusStripExStyle.Office2016Colorful;

// Enable sizing grip
statusStripEx1.SizingGrip = true;
statusStripEx1.GripStyle = ToolStripGripStyle.Visible;

一般的なパターン

複数の項目を含むアプリケーションのステータスバー
// Create StatusStripEx
StatusStripEx statusBar = new StatusStripEx();
statusBar.Dock = DockStyleEx.Bottom;

// Left-aligned notification item
ToolStripStatusLabel notificationLabel = new ToolStripStatusLabel();
notificationLabel.Text = "Connection: Active";
notificationLabel.Spring = true;  // Fill available space

// Right-aligned status items
ToolStripStatusLabel recordLabel = new ToolStripStatusLabel();
recordLabel.Text = "Records: 1,234";

ToolStripProgressBar loadingProgress = new ToolStripProgressBar();
loadingProgress.Visible = false;  // Show when loading

ToolStripStatusLabel zoomLabel = new ToolStripStatusLabel();
zoomLabel.Text = "Zoom: 100%";

// Add all items
statusBar.Items.AddRange(new ToolStripItem[] {
    notificationLabel,
    recordLabel,
    loadingProgress,
    zoomLabel
});

this.Controls.Add(statusBar);

使用する場面: さまざまなアプリケーションの状態を表示する、多目的なステータスバーです。

ステータスバーの進行状況インジケーター
// Status bar with progress tracking
StatusStripEx statusBar = new StatusStripEx();

ToolStripStatusLabel statusText = new ToolStripStatusLabel();
statusText.Text = "Processing...";

ToolStripProgressBar progressBar = new ToolStripProgressBar();
progressBar.Style = ProgressBarStyle.Continuous;
progressBar.Maximum = 100;

statusBar.Items.AddRange(new ToolStripItem[] { statusText, progressBar });
statusBar.Dock = DockStyleEx.Bottom;

// Update progress
void UpdateProgress(int percent)
{
    progressBar.Value = percent;
    statusText.Text = $"Processing... {percent}%";
}

使用する場面: 進行状況のフィードバックが必要な、時間のかかる処理です。

StatusStripEx を含むリボン
// StatusStripEx at bottom of Ribbon form
StatusStripEx ribbonStatusBar = new StatusStripEx();
ribbonStatusBar.Dock = DockStyleEx.Bottom;

// Apply matching Office2016 theme
ribbonStatusBar.VisualStyle = StatusStripExStyle.Office2016Colorful;

// Add status items
ToolStripStatusLabel pageLabel = new ToolStripStatusLabel();
pageLabel.Text = "Page 1 of 10";

ToolStripStatusLabel wordCount = new ToolStripStatusLabel();
wordCount.Text = "Words: 245";

ribbonStatusBar.Items.AddRange(new ToolStripItem[] { pageLabel, wordCount });

// Add to form (ensure it's added after Ribbon)
this.Controls.Add(ribbonStatusBar);

使用する場面: ステータス情報が必要な、リボンベースのアプリケーションです。

カスタムテーマのステータスバー
// Apply custom managed color
statusStripEx1.OfficeColorScheme = ToolStripEx.ColorScheme.Managed;
Office2007Colors.ApplyManagedColors(this, Color.DarkBlue);

// Custom context menu for status items
ToolStripStatusLabel statusLabel = new ToolStripStatusLabel();
statusLabel.Text = "Pages";
statusLabel.StatusString = "1/1";  // Shows in Word-style context menu

使用する場面: カスタムの配色を使用する、ブランドイメージに合わせたアプリケーションです。


主なプロパティ

コアプロパティ
プロパティ型説明使用する場面
ItemsToolStripItemCollectionステータス項目のコレクションステータスストリップの項目を追加/管理する
DockDockStyleExドッキング位置(Bottom)ステータスストリップを下部に配置する
SizingGripboolサイズ変更グリップを表示/非表示にするフォームのサイズ変更インジケーターを有効にする
GripStyleToolStripGripStyleグリップの表示スタイルグリップの外観をカスタマイズする
GripMarginPaddingグリップの余白グリップの位置を調整する
スタイル設定プロパティ
プロパティ型説明使用する場面
VisualStyleStatusStripExStyleOffice2016 のビジュアルスタイルOffice2016 のテーマを適用する
OfficeColorSchemeColorSchemeOffice2007 の配色Silver/Blue/Black のテーマを適用する
項目の種類

StatusControl 項目(右揃え):

  • StatusLabel - ステータス情報を表示するテキストラベル
  • ProgressBar - 進行状況インジケーター
  • DropDownButton - オプション用のドロップダウンボタン
  • SplitButton - ドロップダウン付きの分割ボタン
  • PanelItem - カスタムパネルコンテナー
  • TrackBarItem - スライダーコントロール

通知項目(左揃え):

  • StatusStripButton - ボタンコントロール
  • StatusStripLabel - テキストラベル
  • StatusStripProgressBar - 進行状況インジケーター
  • StatusStripDropDownButton - ドロップダウンボタン
  • StatusStripSplitButton - 分割ボタン
  • StatusStripPanelItem - カスタムパネル

一般的な使用例

1. ドキュメントエディターのステータスバー

シナリオ: ページ数、単語数、ズーム倍率を表示する、Word のようなエディターです。

  • ページ番号(例:「Page 1 of 5」)に StatusLabel を追加する
  • 単語数(例:「Words: 1,234」)に StatusLabel を追加する
  • ズーム操作用に TrackBarItem を追加する
  • モダンな外観にするため、Office2016Colorful テーマを使用する
  • 参照: status-items.md、styling-and-appearance.md
2. レコード数を表示するデータアプリケーション

シナリオ: レコード数と接続状態を表示するデータベースアプリケーションです。

  • 接続状態用に、左揃えの通知ラベルを使用する
  • レコード数用に、右揃えのラベルを使用する
  • データ読み込み処理に ProgressBar を使用する
  • 参照: status-items.md
3. ステータス情報を表示するファイルマネージャー

シナリオ: 選択した項目や合計サイズを表示するファイルマネージャーです。

  • StatusLabel:「5 items selected」
  • StatusLabel:「Total: 2.5 GB」
  • StatusLabel:「Free space: 150 GB」
  • 参照: getting-started.md
4. バックグラウンドタスクを実行するアプリケーション

シナリオ: バックグラウンドタスクの進行状況をステータスバーに表示します。

  • StatusStripLabel:タスクの説明(左揃え)
  • StatusStripProgressBar:タスクの進行状況(左揃え)
  • タスクの完了後に進行状況を非表示にする
  • 参照: status-items.md
5. ブランドに合わせたアプリケーションのステータスバー

シナリオ: ブランドアイデンティティに合ったカスタムカラーテーマを使用します。

  • OfficeColorScheme を Managed に設定します
  • ApplyManagedColors でカスタムカラーを適用します
  • ステータスバーをアプリケーションのテーマに合わせます
  • 参照:styling-and-appearance.md
6. Ribbon アプリケーションのステータスバー

シナリオ: RibbonControlAdv アプリケーション向けのステータスバーです。

  • StatusStripEx を下部にドッキングします
  • VisualStyle を Ribbon のテーマに合わせます
  • 関連するステータス項目(ページ、ズームなど)を追加します
  • 参照:getting-started.md、styling-and-appearance.md

ベストプラクティス

  1. 項目の配置: 右揃えには StatusControl 項目を、左揃えには Notification 項目を使用します
  2. テーマの一貫性: StatusStripEx のスタイルをアプリケーションのテーマ(Office2007/2016)に合わせます
  3. サイズ変更グリップ: サイズ変更可能なフォームでは有効にし、固定サイズのフォームでは無効にします
  4. 進行状況インジケーター: 操作中のみ ProgressBar を表示し、完了したら非表示にします
  5. Spring プロパティ: 左側の項目に Spring=true を設定して、右側の項目を右に押し出します
  6. 項目数: わかりやすさを保つため、ステータスバーの項目数は最小限(3~6 項目)にします
  7. テキストの更新: アプリケーションの状態を反映するよう、ステータステキストを動的に更新します
  8. Ribbon との互換性: 適切にドッキングできるよう、Ribbon の後に StatusStripEx を追加します

関連項目

コメント