ElementRealizationOptions 列舉
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
public enum class ElementRealizationOptions
/// [Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=0)]
/// [System.Flags]
/// [Windows.Foundation.Metadata.Version(1)]
enum class ElementRealizationOptions
/// [System.Flags]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.XamlContract, 65536)]
enum class ElementRealizationOptions
[Microsoft.UI.Xaml.CustomAttributes.MUXContractProperty(version=0)]
[System.Flags]
[Windows.Foundation.Metadata.Version(1)]
public enum ElementRealizationOptions
[System.Flags]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.XamlContract), 65536)]
public enum ElementRealizationOptions
Public Enum ElementRealizationOptions
- 繼承
-
ElementRealizationOptions
- 屬性
-
Microsoft.UI.Xaml.CustomAttributes.MUXContractPropertyAttribute FlagsAttribute VersionAttribute ContractVersionAttribute
欄位
| 名稱 | 值 | Description |
|---|---|---|
| None | 0 | 未指定選項。 |
| ForceCreate | 1 | 新元素的創造是被迫的。 |
| SuppressAutoRecycle | 2 | 該元素會被自動回收邏輯忽略。 |
備註
當你呼叫 GetOrCreateElementAt(index, options) 時,可以指定是抑制自動回收的元素,或強制建立新元素。 自動回收抑制(SuppressAutoRecycle)後回收的元素,會被自動回收邏輯忽略,該邏輯會清除未作為當前佈局流程一部分回收的已實現元素。 你必須明確回收這些元素,透過傳入 RecycleElement 方法來避免記憶體洩漏。