DataGridViewRowPostPaintEventArgs.InheritedRowStyle プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DataGridViewRowPostPaintEventArgs.InheritedRowStyle プロパティの意味・解説 

DataGridViewRowPostPaintEventArgs.InheritedRowStyle プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

現在の DataGridViewRow に適用されるセル スタイル取得します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public ReadOnly Property
 InheritedRowStyle As DataGridViewCellStyle
Dim instance As DataGridViewRowPostPaintEventArgs
Dim value As DataGridViewCellStyle

value = instance.InheritedRowStyle
public DataGridViewCellStyle InheritedRowStyle { get;
 }
public:
property DataGridViewCellStyle^ InheritedRowStyle {
    DataGridViewCellStyle^ get ();
}
/** @property */
public DataGridViewCellStyle get_InheritedRowStyle ()
public function get InheritedRowStyle
 () : DataGridViewCellStyle

プロパティ
現在の DataGridViewRow適用されるセル スタイル格納している DataGridViewCellStyle。

解説解説

InheritedRowStyle プロパティには、行の現在の InheritedStyle プロパティと同じ値が格納されます。DataGridView の DataGridViewRow直接アクセスすると、パフォーマンス影響を及ぼす可能性あります。行の共有解除回避し最適なパフォーマンス維持するには、RowPostPaint イベントInheritedRowStyle使用します

InheritedRowStyle プロパティ読み取り専用です。InheritedRowStyle プロパティ通じて取得した DataGridViewCellStyleプロパティには新しい値を設定することもできますが、その設定無効になります

使用例使用例

InheritedRowStyle使用して内容描画するときに使用する色を決定する方法次のコード例示します変数 e の型が DataGridViewRowPostPaintEventArgs です。次のコード例は、「方法 : Windows フォームの DataGridView コントロールの行の外観カスタマイズする」で示されている例の一部です。

' Determine the foreground color.
If (e.State And DataGridViewElementStates.Selected)
 = _
    DataGridViewElementStates.Selected Then

    forebrush = New SolidBrush(e.InheritedRowStyle.SelectionForeColor)
Else
    forebrush = New SolidBrush(e.InheritedRowStyle.ForeColor)
End If
// Determine the foreground color.
if ((e.State & DataGridViewElementStates.Selected) ==
    DataGridViewElementStates.Selected)
{
    forebrush = new SolidBrush(e.InheritedRowStyle.SelectionForeColor);
}
else
{
    forebrush = new SolidBrush(e.InheritedRowStyle.ForeColor);
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridViewRowPostPaintEventArgs クラス
DataGridViewRowPostPaintEventArgs メンバ
System.Windows.Forms 名前空間
DataGridView クラス
DataGridView.RowPostPaint イベント
DataGridViewCellStyle クラス
DataGridViewRow クラス
DataGridViewRow.DefaultCellStyle プロパティ
その他の技術情報
Windows フォーム DataGridView コントロール拡張するための推奨される手順



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

DataGridViewRowPostPaintEventArgs.InheritedRowStyle プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DataGridViewRowPostPaintEventArgs.InheritedRowStyle プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS