UIElement.PersistId 屬性

定義

警告

PersistId is an obsolete property and may be removed in a future release. The value of this property is not defined.

取得值,這個值可唯一識別此項目。

C#
[System.Obsolete("PersistId is an obsolete property and may be removed in a future release.  The value of this property is not defined.")]
public int PersistId { get; }

屬性值

這個項目的唯一識別項。

屬性

備註

PersistId 可唯一識別每個元素。 每次載入相同的可延伸應用程式標記語言 (XAML) 時,元素都會保持相同 PersistId , (包括二進位標記法) 。 此識別碼用於內部載入、剖析和序列化需求。 它不適合供您的應用程式程式碼使用。

此屬性與任何指定實例的結果沒有關聯 GetHashCode 性。

適用於

產品 版本 (已過時)
.NET Framework (3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1)
Windows Desktop (3.0, 3.1, 5, 6, 7, 8, 9)