AccessDataSourceDesigner クラスとは? わかりやすく解説

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

AccessDataSourceDesigner クラス

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

AccessDataSource Web サーバー コントロールを、ビジュアル デザイナで、デザイン時に使用できるようにします。

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

Public Class AccessDataSourceDesigner
    Inherits SqlDataSourceDesigner
Dim instance As AccessDataSourceDesigner
public class AccessDataSourceDesigner : SqlDataSourceDesigner
public ref class AccessDataSourceDesigner :
 public SqlDataSourceDesigner
public class AccessDataSourceDesigner extends
 SqlDataSourceDesigner
public class AccessDataSourceDesigner extends
 SqlDataSourceDesigner
解説解説
使用例使用例

このセクションには、2 つコード例用意されています。最初コード例は、AccessDataSourceDesigner クラス拡張する方法示してます。2 番目の例は、AccessDataSource クラスコピー派生してデザイナ関連付ける方法示してます。

AccessDataSourceDesigner クラス拡張する方法次のコード例示します。このコードでは、デザイン サーフェイス上のコントロールを表すプレースホルダを変更しプロパティを [プロパティ] グリッド追加してます。

' Shadow control properties with design time properties.
Protected Overrides Sub
 PreFilterProperties(ByVal properties As IDictionary)

    ' Call the base class method first.
    MyBase.PreFilterProperties(properties)

    ' Add the ConnectionString property to the property grid.
    Dim prop As PropertyDescriptor
    prop = CType(properties("ConnectionString"), PropertyDescriptor)

   Dim atts(1) As Attribute
    atts(0) = New BrowsableAttribute(True)
    atts(1) = New ReadOnlyAttribute(True)

    properties("ConnectionString") = TypeDescriptor.CreateProperty(
 _
        prop.GetType(), prop, atts)
End Sub
// Shadow control properties with design time properties.
protected override void PreFilterProperties(IDictionary
 properties)
{
    // Call the base class method first.
    base.PreFilterProperties(properties);

    // Add the ConnectionString property to the property grid.
    PropertyDescriptor property =
        (PropertyDescriptor)properties["ConnectionString"];
    Attribute[] attributes = new Attribute[]
    {
        new BrowsableAttribute(true),
        new ReadOnlyAttribute(true)
    };
    properties["ConnectionString"] = TypeDescriptor.CreateProperty(
        GetType(), property, attributes);
}

AccessDataSource クラスコピー派生して上記の例で定義したデザイナ関連付ける方法次のコード例示します

' Create a control and bind it to the ExampleAccessDataSourceDesigner.
<AspNetHostingPermission(System.Security.Permissions.SecurityAction.Demand, _
    Level:=System.Web.AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermission(System.Security.Permissions.SecurityAction.InheritanceDemand,
 _
    Level:=System.Web.AspNetHostingPermissionLevel.Minimal)> _
<Designer("CustomControls.Design.ExampleAccessDataSourceDesigner")>
 _
Public Class ExampleAccessDataSource
    Inherits AccessDataSource

    ' Does nothing extra
End Class
// Create a control and bind it to the ExampleAccessDataSourceDesigner.
[AspNetHostingPermission(System.Security.Permissions.SecurityAction.Demand,
    Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(System.Security.Permissions.SecurityAction.InheritanceDemand
,
    Level = AspNetHostingPermissionLevel.Minimal)]
[Designer(typeof(CustomControls.Design.ExampleAccessDataSourceDesigner))]
public class ExampleAccessDataSource : AccessDataSource
{
    // Does nothing extra
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
継承階層継承階層
System.Object
   System.ComponentModel.Design.ComponentDesigner
     System.Web.UI.Design.HtmlControlDesigner
       System.Web.UI.Design.ControlDesigner
         System.Web.UI.Design.DataSourceDesigner
           System.Web.UI.Design.WebControls.SqlDataSourceDesigner
            System.Web.UI.Design.WebControls.AccessDataSourceDesigner
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

「AccessDataSourceDesigner クラス」の関連用語

AccessDataSourceDesigner クラスのお隣キーワード
検索ランキング

   

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



AccessDataSourceDesigner クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS