FilterableAttribute.Filterable プロパティ

定義

FilterableAttribute 属性を適用するプロパティでデバイスのフィルター処理がサポートされているかどうかを示す値を取得します。

public:
 property bool Filterable { bool get(); };
public bool Filterable { get; }
member this.Filterable : bool
Public ReadOnly Property Filterable As Boolean

プロパティ値

Boolean

属性を適用するプロパティでデバイスのフィルター処理がサポートされていることを示す場合は true。それ以外の場合は、false

次のコード例では、カスタム コントロールのプロパティに属性を適用 FilterableAttribute して、プロパティがデバイス フィルター処理をサポートしていないことを示す方法を示します。


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Samples.AspNet.CS.Controls
{
    public class SimpleCustomControl : WebControl
    {
        private string _productID;

        // Set Filterable attribute to specify that this
        // property does not support device filtering.
        [Bindable(true)]
        [Filterable(false)]
        public string ProductID
        {
            get
            {
                return _productID;
            }
            set
            {
                _productID = value;
            }
        }
    }
}

Imports System.ComponentModel
Imports System.Web.UI

Namespace Samples.AspNet.VB.Controls

    Public Class SimpleCustomControl
        Inherits System.Web.UI.WebControls.WebControl

        Dim _productID As String

        ' Set Filterable attribute to specify that this
        ' property does not support device filtering.
        <Bindable(True), Filterable(False)> Property ProductID() As String
            Get
                Return _productID
            End Get

            Set(ByVal Value As String)
                _productID = Value
            End Set
        End Property
    End Class

End Namespace

注釈

このプロパティを Filterable 使用して、属性が適用される FilterableAttribute プロパティがデバイス フィルター処理をサポートしているかどうかを確認します。 プロパティがデバイス フィルター処理をサポートしている場合は、デバイス フィルターを指定することで、特定のデバイスのプロパティの値をオーバーライドできます。 詳細については、 特定のデバイスのカスタマイジングを参照してください。

適用対象

こちらもご覧ください