共用方式為


SecondaryTile 建構函式

定義

多載

SecondaryTile()

建立 SecondaryTile 物件。 接著,呼叫端必須透過 物件設定任何強制屬性,再嘗試釘選、更新或刪除磚。

在傳統型應用程式中,在以顯示 UI 的方式使用這個類別的實例之前,您必須將物件與其擁有者的視窗控制碼產生關聯。 如需詳細資訊和程式碼範例,請參閱 顯示相依于 CoreWindow 的 WinRT UI 物件

SecondaryTile(String)

建立具有特定識別碼的 SecondaryTile 物件。 這個形式的建構函式應該用來建立次要磚物件,以執行磚更新或刪除。

在傳統型應用程式中,在以顯示 UI 的方式使用這個類別的實例之前,您必須將物件與其擁有者的視窗控制碼產生關聯。 如需詳細資訊和程式碼範例,請參閱 顯示相依于 CoreWindow 的 WinRT UI 物件

SecondaryTile(String, String, String, Uri, TileSize)

建立 SecondaryTile 物件,其中包含建立中型磚所需的所有必要屬性。

在傳統型應用程式中,在以顯示 UI 的方式使用這個類別的實例之前,您必須將物件與其擁有者的視窗控制碼產生關聯。 如需詳細資訊和程式碼範例,請參閱 顯示相依于 CoreWindow 的 WinRT UI 物件

SecondaryTile(String, String, String, String, TileOptions, Uri)

注意

在Windows 8.1之後,此建構函式可能會改變或無法使用。 請改用 SecondaryTile.SecondaryTile (String、String、String、Uri、TileSize)

建立 SecondaryTile 物件做為中型磚。

在傳統型應用程式中,在以顯示 UI 的方式使用這個類別的實例之前,您必須將物件與其擁有者的視窗控制碼產生關聯。 如需詳細資訊和程式碼範例,請參閱 顯示相依于 CoreWindow 的 WinRT UI 物件

SecondaryTile(String, String, String, String, TileOptions, Uri, Uri)

注意

在Windows 8.1之後,此建構函式可能會改變或無法使用。 請改用 SecondaryTile.SecondaryTile (String、String、String、Uri、TileSize) ,並透過 SecondaryTile.VisualElements 方法提供其他磚大小和選項。

建立 SecondaryTile 物件做為寬圖格。

在傳統型應用程式中,在以顯示 UI 的方式使用這個類別的實例之前,您必須將物件與其擁有者的視窗控制碼產生關聯。 如需詳細資訊和程式碼範例,請參閱 顯示相依于 CoreWindow 的 WinRT UI 物件

在 Windows Phone 8.1 上,包括次要磚在內的所有磚都會釘選為中型磚,之後使用者就可以調整大小。 此建構函式提供調整為寬圖格的選項。

SecondaryTile()

建立 SecondaryTile 物件。 接著,呼叫端必須透過 物件設定任何強制屬性,再嘗試釘選、更新或刪除磚。

在傳統型應用程式中,在以顯示 UI 的方式使用這個類別的實例之前,您必須將物件與其擁有者的視窗控制碼產生關聯。 如需詳細資訊和程式碼範例,請參閱 顯示相依于 CoreWindow 的 WinRT UI 物件

public:
 SecondaryTile();
 SecondaryTile();
public SecondaryTile();
function SecondaryTile()
Public Sub New ()

備註

強制磚屬性,例如顯示名稱,必須透過呼叫這個類別的其他方法來設定,才能啟用磚。

適用於

SecondaryTile(String)

建立具有特定識別碼的 SecondaryTile 物件。 這個形式的建構函式應該用來建立次要磚物件,以執行磚更新或刪除。

在傳統型應用程式中,在以顯示 UI 的方式使用這個類別的實例之前,您必須將物件與其擁有者的視窗控制碼產生關聯。 如需詳細資訊和程式碼範例,請參閱 顯示相依于 CoreWindow 的 WinRT UI 物件

public:
 SecondaryTile(Platform::String ^ tileId);
 SecondaryTile(winrt::hstring const& tileId);
public SecondaryTile(string tileId);
function SecondaryTile(tileId)
Public Sub New (tileId As String)

參數

tileId
String

Platform::String

winrt::hstring

字串,可唯一識別應用程式內的磚。 選擇對您應用程式具有描述性且有意義的唯一識別碼。 如果您提供與現有次要磚相同的識別碼,則會覆寫現有的次要磚。

備註

您用來建立此圖格的唯一識別碼可在稍後更新或刪除。

其他強制磚屬性,例如顯示名稱,必須透過呼叫這個類別的其他方法來設定,才能啟用磚。

適用於

SecondaryTile(String, String, String, Uri, TileSize)

建立 SecondaryTile 物件,其中包含建立中型磚所需的所有必要屬性。

在傳統型應用程式中,在以顯示 UI 的方式使用這個類別的實例之前,您必須將物件與其擁有者的視窗控制碼產生關聯。 如需詳細資訊和程式碼範例,請參閱 顯示相依于 CoreWindow 的 WinRT UI 物件

public:
 SecondaryTile(Platform::String ^ tileId, Platform::String ^ displayName, Platform::String ^ arguments, Uri ^ square150x150Logo, TileSize desiredSize);
 SecondaryTile(winrt::hstring const& tileId, winrt::hstring const& displayName, winrt::hstring const& arguments, Uri const& square150x150Logo, TileSize const& desiredSize);
public SecondaryTile(string tileId, string displayName, string arguments, System.Uri square150x150Logo, TileSize desiredSize);
function SecondaryTile(tileId, displayName, arguments, square150x150Logo, desiredSize)
Public Sub New (tileId As String, displayName As String, arguments As String, square150x150Logo As Uri, desiredSize As TileSize)

參數

tileId
String

Platform::String

winrt::hstring

字串,可唯一識別應用程式套件內的磚。 選擇對您應用程式具有描述性且有意義的唯一識別碼。 其限制為 64 個字元,開頭必須是數位或字母,且由 a-z、A-Z、0-9、句號 (.) 或底線 (_) 字元組成。 如果您提供與現有次要磚相同的識別碼,則會覆寫現有的次要磚。 可以透過 TileId 屬性來設定或擷取。

displayName
String

Platform::String

winrt::hstring

要顯示在磚上、磚工具提示中,以及顯示小型磚時的名稱,例如在 [應用程式 ] 或搜尋結果畫面上。 此字串相當於主要磚資訊清單中指定的顯示名稱。 限制為 256 個字元,但實際上應該保持簡短以避免截斷。 這個值可以透過 DisplayName 屬性來設定或擷取。

顯示名稱只會顯示在 Windows Phone 8.1 的寬次要磚上。

arguments
String

Platform::String

winrt::hstring

對呼叫應用程式有意義的應用程式定義字串。 從次要磚啟動應用程式時,此引數字串會傳回應用程式。 它會在 2048 個字元之後截斷。 可以透過 Arguments 屬性來設定或擷取。

注意

此參數必須是Windows Phone Silverlight 8.1 應用程式的 URL 編碼。 所有其他應用程式類型都可以使用自己的結構。

square150x150Logo
Uri Uri

儲存在統一資源識別項 (URI) 的中型標誌影像參考。 可以透過 SecondaryTileVisualElements.Square150x150Logo 屬性來設定或擷取。 您可以使用下列其中一個配置來表示此值:已部署應用程式套件內的 ms-appx:/// A 路徑。 此路徑會針對應用程式所支援的語言和 DPI 穩定狀態進行解析。 ms-appdata:///local/ 在個別使用者應用程式儲存體中找到的檔案。

desiredSize
TileSize

要釘選的磚大小。 此值必須是 預設 (,以提供 Windows 8 行為) 、 Square150x150Wide310x150。 任何其他 TileSize 值都會在執行時間期間擲回例外狀況。

Windows Phone 8.1 上會忽略desiredSize參數。 在手機上,包括次要磚在內的所有磚都會釘選為中型磚,之後使用者就可以調整大小。

適用於

SecondaryTile(String, String, String, String, TileOptions, Uri)

注意

在Windows 8.1之後,此建構函式可能會改變或無法使用。 請改用 SecondaryTile.SecondaryTile (String、String、String、Uri、TileSize)

建立 SecondaryTile 物件做為中型磚。

在傳統型應用程式中,在以顯示 UI 的方式使用這個類別的實例之前,您必須將物件與其擁有者的視窗控制碼產生關聯。 如需詳細資訊和程式碼範例,請參閱 顯示相依于 CoreWindow 的 WinRT UI 物件

public:
 SecondaryTile(Platform::String ^ tileId, Platform::String ^ shortName, Platform::String ^ displayName, Platform::String ^ arguments, TileOptions tileOptions, Uri ^ logoReference);
/// [Windows.Foundation.Metadata.Deprecated("SecondaryTile(string, string, string, string, Windows.UI.StartScreen.TileOptions, Windows.Foundation.Uri) may be altered or unavailable for releases after Windows Phone 8.1. Instead, use SecondaryTile(string, string, string, Windows.Foundation.Uri, Windows.UI.StartScreen.TileSize).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
 SecondaryTile(winrt::hstring const& tileId, winrt::hstring const& shortName, winrt::hstring const& displayName, winrt::hstring const& arguments, TileOptions const& tileOptions, Uri const& logoReference);
/// [Windows.Foundation.Metadata.Deprecated("SecondaryTile(string, string, string, string, Windows.UI.StartScreen.TileOptions, Windows.Foundation.Uri) may be altered or unavailable for releases after Windows Phone 8.1. Instead, use SecondaryTile(string, string, string, Windows.Foundation.Uri, Windows.UI.StartScreen.TileSize).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
 SecondaryTile(winrt::hstring const& tileId, winrt::hstring const& shortName, winrt::hstring const& displayName, winrt::hstring const& arguments, TileOptions const& tileOptions, Uri const& logoReference);
[Windows.Foundation.Metadata.Deprecated("SecondaryTile(string, string, string, string, Windows.UI.StartScreen.TileOptions, Windows.Foundation.Uri) may be altered or unavailable for releases after Windows Phone 8.1. Instead, use SecondaryTile(string, string, string, Windows.Foundation.Uri, Windows.UI.StartScreen.TileSize).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
public SecondaryTile(string tileId, string shortName, string displayName, string arguments, TileOptions tileOptions, System.Uri logoReference);
[Windows.Foundation.Metadata.Deprecated("SecondaryTile(string, string, string, string, Windows.UI.StartScreen.TileOptions, Windows.Foundation.Uri) may be altered or unavailable for releases after Windows Phone 8.1. Instead, use SecondaryTile(string, string, string, Windows.Foundation.Uri, Windows.UI.StartScreen.TileSize).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
public SecondaryTile(string tileId, string shortName, string displayName, string arguments, TileOptions tileOptions, System.Uri logoReference);
function SecondaryTile(tileId, shortName, displayName, arguments, tileOptions, logoReference)
Public Sub New (tileId As String, shortName As String, displayName As String, arguments As String, tileOptions As TileOptions, logoReference As Uri)

參數

tileId
String

Platform::String

winrt::hstring

字串,可唯一識別應用程式套件內的磚。 選擇對您應用程式具有描述性且有意義的唯一識別碼。 其限制為 64 個字元,開頭必須是數位或字母,且由 a-z、A-Z、0-9、句號 (.) 或底線 (_) 字元組成。 如果您提供與現有次要磚相同的識別碼,則會覆寫現有的次要磚。 可以透過 TileId 屬性來設定或擷取。

shortName
String

Platform::String

winrt::hstring

如果應用程式選擇這麼做,則直接顯示在磚上的簡短名稱。 超過 40 個字元的任何專案都會被截斷。 使用者可以選擇在釘選程式期間變更此值。 可以透過 ShortName 屬性來設定或擷取。

注意

這個值只會用於 Windows 8 中,並取代為較新版本中的 displayName

displayName
String

Platform::String

winrt::hstring

要顯示在磚上、磚工具提示中,以及顯示小型磚時的名稱,例如在 [應用程式 ] 或搜尋結果畫面上。 此字串相當於主要磚資訊清單中指定的顯示名稱。 限制為 256 個字元,但實際上應該保持簡短以避免截斷。 這個值可以透過 DisplayName 屬性來設定或擷取。

顯示名稱只會顯示在 Windows Phone 8.1 的寬次要磚上。

arguments
String

Platform::String

winrt::hstring

對呼叫應用程式有意義的應用程式定義字串。 從次要磚啟動應用程式時,此引數字串會傳回應用程式。 它會在 2048 個字元之後截斷。 可以透過 Arguments 屬性來設定或擷取。

tileOptions
TileOptions

值,指定各種選項,例如是否要在次要磚上顯示名稱。 可以透過 TileOptions 屬性來設定或擷取。

logoReference
Uri Uri

儲存在統一資源識別項 (URI) 之方形標誌影像的參考。 可以透過 Logo 屬性來設定或擷取。 您可以使用下列其中一個配置來表示此值:已部署應用程式套件內的 ms-appx:/// A 路徑。 此路徑會針對應用程式所支援的語言和 DPI 穩定狀態進行解析。 ms-appdata:///local/ 在個別使用者應用程式儲存體中找到的檔案。

屬性

適用於

SecondaryTile(String, String, String, String, TileOptions, Uri, Uri)

注意

在Windows 8.1之後,此建構函式可能會改變或無法使用。 請改用 SecondaryTile.SecondaryTile (String、String、String、Uri、TileSize) ,並透過 SecondaryTile.VisualElements 方法提供其他磚大小和選項。

建立 SecondaryTile 物件做為寬圖格。

在傳統型應用程式中,在以顯示 UI 的方式使用這個類別的實例之前,您必須將物件與其擁有者的視窗控制碼產生關聯。 如需詳細資訊和程式碼範例,請參閱 顯示相依于 CoreWindow 的 WinRT UI 物件

在 Windows Phone 8.1 上,包括次要磚在內的所有磚都會釘選為中型磚,之後使用者就可以調整大小。 此建構函式提供調整為寬圖格的選項。

public:
 SecondaryTile(Platform::String ^ tileId, Platform::String ^ shortName, Platform::String ^ displayName, Platform::String ^ arguments, TileOptions tileOptions, Uri ^ logoReference, Uri ^ wideLogoReference);
/// [Windows.Foundation.Metadata.Deprecated("SecondaryTile(string, string, string, string, Windows.UI.StartScreen.TileOptions, Windows.Foundation.Uri, Windows.Foundation.Uri) may be altered or unavailable for releases after Windows Phone 8.1. Instead, use SecondaryTile(string, string, string, Windows.Foundation.Uri, Windows.UI.StartScreen.TileSize).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
 SecondaryTile(winrt::hstring const& tileId, winrt::hstring const& shortName, winrt::hstring const& displayName, winrt::hstring const& arguments, TileOptions const& tileOptions, Uri const& logoReference, Uri const& wideLogoReference);
/// [Windows.Foundation.Metadata.Deprecated("SecondaryTile(string, string, string, string, Windows.UI.StartScreen.TileOptions, Windows.Foundation.Uri, Windows.Foundation.Uri) may be altered or unavailable for releases after Windows Phone 8.1. Instead, use SecondaryTile(string, string, string, Windows.Foundation.Uri, Windows.UI.StartScreen.TileSize).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
 SecondaryTile(winrt::hstring const& tileId, winrt::hstring const& shortName, winrt::hstring const& displayName, winrt::hstring const& arguments, TileOptions const& tileOptions, Uri const& logoReference, Uri const& wideLogoReference);
[Windows.Foundation.Metadata.Deprecated("SecondaryTile(string, string, string, string, Windows.UI.StartScreen.TileOptions, Windows.Foundation.Uri, Windows.Foundation.Uri) may be altered or unavailable for releases after Windows Phone 8.1. Instead, use SecondaryTile(string, string, string, Windows.Foundation.Uri, Windows.UI.StartScreen.TileSize).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
public SecondaryTile(string tileId, string shortName, string displayName, string arguments, TileOptions tileOptions, System.Uri logoReference, System.Uri wideLogoReference);
[Windows.Foundation.Metadata.Deprecated("SecondaryTile(string, string, string, string, Windows.UI.StartScreen.TileOptions, Windows.Foundation.Uri, Windows.Foundation.Uri) may be altered or unavailable for releases after Windows Phone 8.1. Instead, use SecondaryTile(string, string, string, Windows.Foundation.Uri, Windows.UI.StartScreen.TileSize).", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
public SecondaryTile(string tileId, string shortName, string displayName, string arguments, TileOptions tileOptions, System.Uri logoReference, System.Uri wideLogoReference);
function SecondaryTile(tileId, shortName, displayName, arguments, tileOptions, logoReference, wideLogoReference)
Public Sub New (tileId As String, shortName As String, displayName As String, arguments As String, tileOptions As TileOptions, logoReference As Uri, wideLogoReference As Uri)

參數

tileId
String

Platform::String

winrt::hstring

字串,可唯一識別應用程式套件內的磚。 選擇對您應用程式具有描述性且有意義的唯一識別碼。 其限制為 64 個字元,開頭必須是數位或字母,且由 a-z、A-Z、0-9、句號 (.) 或底線 (_) 字元組成。 如果您提供與現有次要磚相同的識別碼,則會覆寫現有的次要磚。 可以透過 TileId 屬性來設定或擷取。

shortName
String

Platform::String

winrt::hstring

如果應用程式選擇這麼做,則直接顯示在磚上的簡短名稱。 超過 40 個字元的任何專案都會被截斷。 使用者可以選擇在釘選程式期間變更此值。 可以透過 ShortName 屬性來設定或擷取。

注意

這個值只會用於 Windows 8 中,並取代為較新版本中的 displayName

displayName
String

Platform::String

winrt::hstring

要顯示在磚上、磚工具提示中,以及顯示小型磚時的名稱,例如在 [應用程式 ] 或搜尋結果畫面上。 此字串相當於主要磚資訊清單中指定的顯示名稱。 限制為 256 個字元,但實際上應該保持簡短以避免截斷。 這個值可以透過 DisplayName 屬性來設定或擷取。

顯示名稱只會顯示在 Windows Phone 8.1 的寬次要磚上。

arguments
String

Platform::String

winrt::hstring

對呼叫應用程式有意義的應用程式定義字串。 從次要磚啟動應用程式時,此引數字串會傳回應用程式。 它會在 2048 個字元之後截斷。 可以透過 Arguments 屬性來設定或擷取。

tileOptions
TileOptions

值,指定各種選項,例如是否要在次要磚上顯示名稱。 可以透過 TileOptions 屬性來設定或擷取。

logoReference
Uri Uri

儲存在統一資源識別項 (URI) 的中型標誌影像參考。 可以透過 Square150x150Logo 屬性來設定或擷取。 您可以使用下列其中一個配置來表示此值:已部署應用程式套件內的 ms-appx:/// A 路徑。 此路徑會針對應用程式所支援的語言和 DPI 穩定狀態進行解析。 ms-appdata:///local/ 在個別使用者應用程式儲存體中找到的檔案。

wideLogoReference
Uri Uri

儲存在統一資源識別項 (URI) 之寬標誌影像的參考。 可以透過 WideLogo 屬性來設定或擷取。 您可以使用下列其中一個配置來表示此值:已部署應用程式套件內的 ms-appx:/// A 路徑。 此路徑會針對應用程式所支援的語言和 DPI 穩定狀態進行解析。 ms-appdata:///local/ 在個別使用者應用程式儲存體中找到的檔案。

屬性

適用於