次の方法で共有


DataListDesigner.TemplatesExist プロパティ

デザイナに関連付けられているテンプレートが現在存在するかどうかを示す値を取得します。

Protected ReadOnly Property TemplatesExist As Boolean
[C#]
protected bool TemplatesExist {get;}
[C++]
protected: __property bool get_TemplatesExist();
[JScript]
protected function get TemplatesExist() : Boolean;

プロパティ値

テンプレートが存在する場合またはデザイナがテンプレート モードである場合は true 。それ以外の場合は false

使用例

[Visual Basic] TemplatesExist プロパティの値を使用して、 AllowResize プロパティの値を確認する方法のコード例を次に示します。この場合、 TemplatesExist プロパティまたは InTemplateMode プロパティが true に設定されていれば、 AllowResize プロパティも true に設定されています。なお、両方のプロパティが false に設定されている場合は、 AllowResize プロパティも false に設定されています。

 
' Override the AllowResize property so that if 
' templates are not defined, the control cannot be resized.
Public Overrides ReadOnly Property AllowResize() As Boolean
   Get
      Return TemplatesExist OrElse InTemplateMode
   End Get
End Property

[C#, C++, JScript] C#、C++、および JScript のサンプルはありません。Visual Basic のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 2000, Windows XP Professional, Windows Server 2003 ファミリ

.NET Framework セキュリティ:

参照

DataListDesigner クラス | DataListDesigner メンバ | System.Web.UI.Design.WebControls 名前空間