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

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

DeviceSpecificChoiceCollection クラス

DeviceSpecific クラス選択項目のコレクション表します

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

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

DeviceSpecificChoiceCollection クラス使用して、DeviceSpecific/Choice 構成要素選択項目にアクセスする方法次のコード例コード例示します参考のため、フィルタ格納している Web.config ファイルコード例の後に記載してます。

メモメモ

次のコード サンプルはシングルファイル コード モデル使用しており、分離コード ファイル直接コピーされ場合正常に動作しない可能性あります。このコード サンプルは、拡張子.aspx の空のテキスト ファイルコピーする必要があります詳細については、「ASP.NET Web ページコード モデル」を参照してください

<%@ Page Language="VB" 
    Inherits="System.Web.UI.MobileControls.MobilePage"
 %>
<%@ Register TagPrefix="mobile" 
    Namespace="System.Web.UI.MobileControls"
 
    Assembly="System.Web.Mobile"
 %>
<%@ Import Namespace="System.Web.Mobile"
 %>

<script runat="server">
    Private Sub Page_Load(ByVal
 sender As Object, ByVal
 e As EventArgs)
        Dim count As Integer
 = Panel1.DeviceSpecific.Choices.Count
        Dim i As Integer
        
        ' Cycle through the DeviceSpecificChoiceCollection.
        For i = 0 To count - 1
            Dim txt1 As String
 = "Choice {0} has {1} Templates. "
            Dim txt2 As String
 = "Filter name is '{0}'. "
            
            Label1.Text &= String.Format(txt1, i, _
                Panel1.DeviceSpecific.Choices(i).Templates.Count)
            Label2.Text &= String.Format(txt2, _
                Panel1.DeviceSpecific.Choices(i).Filter)
        Next
    End Sub
    
    ' Add a DeviceSpecificChoice section programatically
    Protected Sub form1_Init(ByVal
 sender As Object, ByVal
 e As EventArgs)
        Dim devSpecific As DeviceSpecific =
 Panel1.DeviceSpecific
        Dim devChoiceHtml As DeviceSpecificChoice
 = New DeviceSpecificChoice()
        devChoiceHtml.Filter = "isCHTML10"
        devSpecific.Choices.Add(devChoiceHtml)
        CType(form1, IParserAccessor).AddParsedSubObject(devSpecific)
    End Sub
</script>

<html  >
<body>
    <mobile:form id="form1" runat="server">
        <mobile:Panel id="Panel1" Runat="server">
            <mobile:DeviceSpecific ID="DeviceSpecific1"
 Runat="server">
                <Choice Filter="isHTML32">
                    <ContentTemplate>
                        <!-- For HTML Browsers -->
                        <br />
                        <mobile:Label ID="Label3"
 Runat="server" 
                            Text="Visible in an HTML Browser"
 />
                        <br />
                    </ContentTemplate>
                </Choice>
                <Choice Filter="isWML11">
                    <ContentTemplate>
                        <!-- For WML Browsers -->
                        <br />
                        <mobile:Label ID="Label4"
 Runat="server" 
                            Text="Viewable in a WML browser"
 />
                        <br />
                    </ContentTemplate>
                </Choice>
            </mobile:DeviceSpecific>
        </mobile:Panel>
        <mobile:Label id="Label1" Runat="server"
 Font-Bold="true" />
        <mobile:Label ID="Label2" Runat="server"
 Font-Bold="true" />
    </mobile:form>
</body>
</html>
<br /><span space="preserve">...</span><br
 /><configuration>
    <system.web>
      <compilation debug="true" strict="false"
 explicit="true" />
      <authentication mode="Windows" />
      <pages>
            <namespaces>
                <clear />
                <add namespace="System"
 />
                <add namespace="System.Collections"
 />
                <add namespace="System.Web"
 />
                <add namespace="System.Web.UI"
 />
                <add namespace="System.Web.UI.WebControls"
 />
                <add namespace="System.Web.UI.HtmlControls"
 />
            </namespaces>
        </pages>

      <!-- Add the device filters used in the example -->
        <deviceFilters>
          <filter name="isHTML32" 
                  compare="PreferredRenderingType"
 
                  argument="html32" />
          <filter name="isWML11" 
                  compare="PreferredRenderingType"
 
                  argument="wml11" />
          <filter name="isCHTML10" 
                  compare="PreferredRenderingType"
 
                  argument="chtml10" />
        </deviceFilters>

    </system.web>
</configuration>
.NET Framework のセキュリティ.NET Frameworkセキュリティ
継承階層継承階層
System.Object
   System.Web.UI.MobileControls.ArrayListCollectionBase
    System.Web.UI.MobileControls.DeviceSpecificChoiceCollection
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DeviceSpecificChoiceCollection メンバ
System.Web.UI.MobileControls 名前空間
DeviceSpecificChoice クラス
その他の技術情報
DeviceSpecific コントロール概要
<DeviceSpecific> 要素
<Choice> 要素 (.NET Framework 開発者ガイド)



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

辞書ショートカット

すべての辞書の索引

「DeviceSpecificChoiceCollection クラス」の関連用語

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

   

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



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

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

©2024 GRAS Group, Inc.RSS