ControlAdapter.OnInit メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ControlAdapter.OnInit メソッドの意味・解説 

ControlAdapter.OnInit メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

関連付けられたコントロールの OnInit メソッドオーバーライドます。

名前空間: System.Web.UI.Adapters
アセンブリ: System.Web (system.web.dll 内)
構文構文

Protected Friend Overridable
 Sub OnInit ( _
    e As EventArgs _
)
Dim e As EventArgs

Me.OnInit(e)
protected internal virtual void OnInit (
    EventArgs e
)
protected public:
virtual void OnInit (
    EventArgs^ e
)
protected void OnInit (
    EventArgs e
)
protected internal function
 OnInit (
    e : EventArgs
)

パラメータ

e

イベント データ格納している EventArgs。

解説解説
使用例使用例

次のコード例では、ControlAdapter クラスからカスタム コントロール アダプタ派生させています。その後OnInit メソッドオーバーライドして、関連付けられたコントロールプロパティ設定し基本メソッド呼び出してコントロール初期化完了してます。

Imports System
Imports System.Web.UI
Imports System.Web.UI.Adapters

Public Class CustomControlAdapter
    Inherits ControlAdapter

    ' Override the ControlAdapter default OnInit implementation.
    Protected Overrides Sub
 OnInit(ByVal e As EventArgs)

        ' Make the control invisible.
        Control.Visible = False

        ' Call the base method, which calls OnInit of the control, 
        ' which raises the control Init event.
        MyBase.OnInit(e)

    End Sub 'OnInit
End Class 'CustomControlAdapter
using System;
using System.Web.UI;
using System.Web.UI.Adapters;

public class CustomControlAdapter : ControlAdapter
{
    // Override the ControlAdapter default OnInit implementation.
    protected override void OnInit (EventArgs
 e)
    {
        // Make the control invisible.
        Control.Visible = false;

        // Call the base method, which calls OnInit of the control,
        // which raises the control Init event.
        base.OnInit(e);
    }
}
#using <System.Web.dll>
#using <System.dll>

using namespace System;
using namespace System::Web::UI;
using namespace System::Web::UI::Adapters;

public ref class CustomControlAdapter: public
 ControlAdapter
{
   // Override the ControlAdapter default OnInit implementation.
protected:
   virtual void OnInit( EventArgs^ e ) override
   {
      // Make the control invisible.
      Control->Visible = false;
      
      // Call the base method, which calls OnInit of the control,
      // which raises the control Init event.
      ControlAdapter::OnInit( e );
   }
};
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ControlAdapter クラス
ControlAdapter メンバ
System.Web.UI.Adapters 名前空間
Control.Init イベント
Control.OnInit
Control クラス

ControlAdapter.OnInit メソッド

フォームまたはページなどのオブジェクト初期化された後で呼び出されます。

名前空間: System.Web.UI.MobileControls.Adapters
アセンブリ: System.Web.Mobile (system.web.mobile.dll 内)
構文構文

Public Overridable Sub OnInit
 ( _
    e As EventArgs _
)
Dim instance As ControlAdapter
Dim e As EventArgs

instance.OnInit(e)
public virtual void OnInit (
    EventArgs e
)
public:
virtual void OnInit (
    EventArgs^ e
)
public void OnInit (
    EventArgs e
)
public function OnInit (
    e : EventArgs
)

パラメータ

e

イベント データ格納している、EventArgs で定義されるオブジェクト

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

「ControlAdapter.OnInit メソッド」の関連用語

ControlAdapter.OnInit メソッドのお隣キーワード
検索ランキング

   

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



ControlAdapter.OnInit メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS