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

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

ControlAdapter.Control プロパティ

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

このコントロール アダプタ割り当てコントロールへの参照取得します

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

解説解説
使用例使用例

Control クラスからカスタム コントロール派生させ、ControlAdapter クラスから継承する対応するアダプタ作成する方法次のコード例示しますアダプタは、Control プロパティオーバーライドし、コントロールへの、厳密に指定した参照返します

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

Public Class CustomControl
    Inherits Control

    ' Add your custom control code.

End Class 'CustomControl

Public Class CustomControlAdapter
    Inherits ControlAdapter

    ' Return a strongly-typed reference to your custom control.
    Public Shadows ReadOnly
 Property Control() As CustomControl
        Get
            Return CType(MyBase.Control, CustomControl)
        End Get
    End Property

    ' Override other ControlAdapter member as necessary. 

End Class 'CustomControlAdapter
 
using System;
using System.Web.UI;
using System.Web.UI.Adapters;
using System.Web.UI.WebControls;

public class CustomControl : Control
{
    // Add your custom control code.
}

public class CustomControlAdapter : ControlAdapter
{
    // Return a strongly-typed reference to your custom control.
    public new CustomControl Control
    {
        get
        {
            return (CustomControl)base.Control;
        }

        // Override other ControlAdapter members, as necessary. 
    }
}
#using <System.Web.Mobile.dll>
#using <System.dll>
#using <System.Web.dll>

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

public ref class CustomControl: public
 Control{};

public ref class CustomControlAdapter: public
 ControlAdapter
{
public:

   property System::Web::UI::Control^ Control 
   {
      // Return a strongly-typed reference to your custom control.
      System::Web::UI::Control^ get()
      {
         return (CustomControl^)ControlAdapter::Control;
      }
   }
   // Override other ControlAdapter members, as necessary. 
};
package SimpleControlProperty; 

import System.*;
import System.Web.UI.*;
import System.Web.UI.Adapters.*;
import System.Web.UI.WebControls.*;

public class CustomControl extends Control
{
    // Add your custom control code.
} //CustomControl

public class CustomControlAdapter extends ControlAdapter
{
    // Declare the inherited property as your custom type.
    /** @property 
     */
    public Control get_Control()
    {
        // Cast the base call to your custom control.
        return (Control)super.get_Control();
    } //get_Control

    // Any device-specific adapters that inherit from 
    // this one can have a reference to your custom control 
    // by using super.get_Control() to access the inherited property.
} //CustomControlAdapter 
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ControlAdapter クラス
ControlAdapter メンバ
System.Web.UI.Adapters 名前空間
Control クラス

ControlAdapter.Control プロパティ

関連するコントロールへの厳密に指定され参照返します

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

Dim instance As ControlAdapter
Dim value As MobileControl

value = instance.Control

instance.Control = value
public MobileControl Control { get; set;
 }
public:
virtual property MobileControl^ Control {
    MobileControl^ get () sealed;
    void set (MobileControl^ value) sealed;
}
/** @property */
public final MobileControl get_Control ()

/** @property */
public final void set_Control (MobileControl
 value)

プロパティ
関連するコントロールへの、厳密に指定され参照

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



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2024 GRAS Group, Inc.RSS