XsdSchemaFileEditorとは? わかりやすく解説

XsdSchemaFileEditor クラス

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

XML スキーマ定義ファイル選択するためのデザインユーザー インターフェイス提供します

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

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

カスタム コントロール格納されプロパティXsdSchemaFileEditor クラスインスタンスアクセスする方法次のコード例示しますデザイン サーフェイスコントロールプロパティ編集する場合XsdSchemaFileEditor クラスは、プロパティ値の XML スキーマ定義ファイル名を選択および編集するためのユーザー インターフェイス提供します

Imports Microsoft.VisualBasic
Imports System
Imports System.ComponentModel
Imports System.ComponentModel.Design
Imports System.Web.UI
Imports System.Web.UI.Design
Imports System.Web.UI.Design.WebControls
Imports System.Web.UI.WebControls
Imports System.IO

Namespace ControlDesignerSamples.VB


    ' Define a simple text control, derived from the 
    ' System.Web.UI.WebControls.Label class.

    <Designer(GetType(TextControlDesigner))> _
    Public Class SimpleTextControl
        Inherits Label

        ' Define a private member to store the file name value in the
 control.
        Private _filename As String
 = ""
        Private _internalText As String
 = ""

        ' Define the public XSD schema file name property.  Indicate
 that the
        ' property can be edited at design-time with the XsdSchemaFileEditor
 class.
        <EditorAttribute(GetType(System.Web.UI.Design.XsdSchemaFileEditor),
 _
                         GetType(System.Drawing.Design.UITypeEditor))>
 _
        Public Property SchemaFileName() As
 String
            Get
                Return _filename
            End Get

            Set(ByVal value As
 String)
                _filename = value
            End Set
        End Property

        ' Define a property that returns the timestamp
        ' for the selected file.
        Public ReadOnly Property
 LastChanged() As String
            Get
                If Not _filename Is
 Nothing AndAlso _filename.Length > 0 Then
                    If File.Exists(_filename) Then
                        Dim lastChangedStamp As
 DateTime
                        lastChangedStamp = File.GetLastWriteTime(_filename)
                        Return lastChangedStamp.ToLongDateString()
                    End If
                End If

                Return String.Empty

            End Get

        End Property

        ' Override the control Text property, setting the default
        ' text to the LastChanged string value for the selected
        ' file name.  If the file name has not been set in the
        ' design view, then default to an empty string.
        Public Overrides Property
 Text() As String
            Get
                If _internalText.Length = 0 And
 LastChanged.Length > 0 Then
                    ' If the internally stored value hasn't been set
,
                    ' and the file name property has been set,
                    ' return the last changed timestamp for the file.

                    _internalText = LastChanged
                End If
                Return _internalText
            End Get

            Set(ByVal value As
 String)
                If Not value Is
 Nothing AndAlso value.Length > 0 Then
                    _internalText = value
                Else
                    _internalText = String.Empty
                End If

            End Set
        End Property

    End Class
End Namespace
using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Web.UI;
using System.Web.UI.Design;
using System.Web.UI.Design.WebControls;
using System.Web.UI.WebControls;
using System.IO;

namespace ControlDesignerSamples.CS
{
    // Define a simple text control, derived from the 
    // System.Web.UI.WebControls.Label class.
    [
        Designer(typeof(TextControlDesigner))
    ]
    public class SimpleTextControl : Label
    {
        // Define a private member to store the file name value in the
 control.
        private string _filename = "";
        private string _internalText = "";

        // Define the public XML schema file property.  Indicate that
 the
        // property can be edited at design-time with the XsdSchemaFileEditor
 class.
        [EditorAttribute(typeof(System.Web.UI.Design.XsdSchemaFileEditor), 
                         typeof(System.Drawing.Design.UITypeEditor))]
        public string SchemaFileName
        {
            get
            {
                return _filename;
            }
            set
            {
                _filename = value;
            }
        }

        // Define a property that returns the timestamp
        // for the selected file.
        public string LastChanged
        {
            get
            {
                if ((_filename != null) &&
 (_filename.Length > 0))
                {
                    if (File.Exists(_filename))
                    {
                        DateTime lastChangedStamp = File.GetLastWriteTime(_filename);
                        return lastChangedStamp.ToLongDateString();
                    }
                }
                return "";
            }
            
        }

        // Override the control Text property, setting the default
        // text to the LastChanged string value for the selected
        // file name.  If the file name has not been set in the
        // design view, then default to an empty string.
        public override string Text
        {
            get
            {
                if ((_internalText == "") &&
 (LastChanged.Length > 0))
                {
                    // If the internally stored value hasn't been set
,
                    // and the file name property has been set,
                    // return the last changed timestamp for the file.
                    _internalText = LastChanged;
                } 
                return _internalText;
            }

            set
            {
                if ((value != null) &&
 (value.Length > 0))
                {
                    _internalText = value;
                }
                else {
                    _internalText = "";
                }
            }
        }
    }

}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
継承階層継承階層
System.Object
   System.Drawing.Design.UITypeEditor
     System.Web.UI.Design.UrlEditor
      System.Web.UI.Design.XsdSchemaFileEditor
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
XsdSchemaFileEditor メンバ
System.Web.UI.Design 名前空間
UrlEditor クラス
EditorAttribute
System.Web.UI.WebControls.XmlDataSource.SchemaFile
その他の技術情報
Web フォームデザインサポート

XsdSchemaFileEditor コンストラクタ


XsdSchemaFileEditor プロパティ


XsdSchemaFileEditor メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド参照)
  名前 説明
パブリック メソッド EditValue  オーバーロードされます指定したオブジェクトの値を編集します。 ( UrlEditor から継承されます。)
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 ( Object から継承されます。)
パブリック メソッド GetEditStyle  オーバーロードされます。 EditValue メソッド編集スタイル取得します。 ( UrlEditor から継承されます。)
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 ( Object から継承されます。)
パブリック メソッド GetPaintValueSupported  オーバーロードされますエディタオブジェクトの値の視覚的な表現描画できるかどうか示します。 ( UITypeEditor から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 ( Object から継承されます。)
パブリック メソッド PaintValue  オーバーロードされますオブジェクトの値の視覚的な表現描画ます。 ( UITypeEditor から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 ( Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String返します。 ( Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

XsdSchemaFileEditor クラス
System.Web.UI.Design 名前空間
UrlEditor クラス
EditorAttribute
System.Web.UI.WebControls.XmlDataSource.SchemaFile

その他の技術情報

Web フォームデザインサポート

XsdSchemaFileEditor メンバ

XML スキーマ定義ファイル選択するためのデザインユーザー インターフェイス提供します

XsdSchemaFileEditor データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド XsdSchemaFileEditor XsdSchemaFileEditor クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
( プロテクト プロパティ参照)
  名前 説明
パブリック プロパティ IsDropDownResizable  ユーザーがドロップダウン エディタサイズ変更できるかどうかを示す値を取得します。(UITypeEditor から継承されます。)
プロテクト プロパティプロテクト プロパティ
パブリック メソッドパブリック メソッド
( プロテクト メソッド参照)
  名前 説明
パブリック メソッド EditValue  オーバーロードされます指定したオブジェクトの値を編集します。 (UrlEditor から継承されます。)
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 (Object から継承されます。)
パブリック メソッド GetEditStyle  オーバーロードされます。 EditValue メソッド編集スタイル取得します。 (UrlEditor から継承されます。)
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 (Object から継承されます。)
パブリック メソッド GetPaintValueSupported  オーバーロードされますエディタオブジェクトの値の視覚的な表現描画できるかどうか示します。 (UITypeEditor から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 (Object から継承されます。)
パブリック メソッド PaintValue  オーバーロードされますオブジェクトの値の視覚的な表現描画ます。 (UITypeEditor から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String返します。 (Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

XsdSchemaFileEditor クラス
System.Web.UI.Design 名前空間
UrlEditor クラス
EditorAttribute
System.Web.UI.WebControls.XmlDataSource.SchemaFile

その他の技術情報

Web フォームデザインサポート



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

辞書ショートカット

すべての辞書の索引

「XsdSchemaFileEditor」の関連用語

XsdSchemaFileEditorのお隣キーワード
検索ランキング

   

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



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

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

©2025 GRAS Group, Inc.RSS