Freezable.GetCurrentValueAsFrozen メソッド
定義
public:
System::Windows::Freezable ^ GetCurrentValueAsFrozen();
public System.Windows.Freezable GetCurrentValueAsFrozen ();
member this.GetCurrentValueAsFrozen : unit -> System.Windows.Freezable
Public Function GetCurrentValueAsFrozen () As Freezable
戻り値
Freezable の固定されたコピー。A frozen copy of the Freezable. コピーの IsFrozen プロパティは、true
に設定されます。The copy's IsFrozen property is set to true
.
注釈
このメソッドの使用は、を使用してコピーを作成し、メソッドを使用してそれを固定することと似てい CloneCurrentValue Freeze ます。Using this method is similar to creating a copy using the CloneCurrentValue and then freezing it with the Freeze method.
GetAsFrozenメソッドと GetCurrentValueAsFrozen メソッドは、既に固定されているサブオブジェクトを複製しないため、コピーのパフォーマンスを向上させることができます。これらは Freezable 参照渡しでのみコピーします。The GetAsFrozen and GetCurrentValueAsFrozen methods can improve copying performance because they do not clone Freezable sub-objects that are already frozen; they only copy them by reference.
次の表は、メソッドとメソッドの違いをまとめたもの GetAsFrozen GetCurrentValueAsFrozen です。The following table summarizes the differences between the GetAsFrozen and GetCurrentValueAsFrozen methods.
アクションAction | GetAsFrozen メソッドの動作GetAsFrozen method behavior | GetCurrentValueAsFrozen メソッドの動作GetCurrentValueAsFrozen method behavior |
---|---|---|
式を持つ依存関係プロパティのコピーCopying a dependency property that has an expression | メソッドは、 InvalidOperationException プロパティを持つことができないため、をスローし Freeze ます。The method throws an InvalidOperationException because it cannot Freeze the property. | 式の現在の値はコピーされますが、式自体はコピーされません。The current value of the expression is copied, but not the expression itself. |
アニメーション化した依存関係プロパティのコピーCopying an animated dependency property | プロパティの基本 (アニメーション化されていない) 値がコピーされます。The property's base (non-animated) value is copied. アニメーションはコピーされません。Animations are not copied. | プロパティの現在のアニメーション化された値がコピーされます。The property's current animated value is copied. アニメーションはコピーされません。Animations are not copied. |
未設定のプロパティはコピーされず、読み取り専用プロパティでもありません。Note that unset properties are not copied, nor are read-only properties.
固定されていないのコピーを作成するには、 Freezable メソッドを使用し CloneCurrentValue ます。To create a copy of the Freezable that is not frozen, use the CloneCurrentValue method.
注意 (継承者)
このメソッドは、仮想 GetCurrentValueAsFrozenCore(Freezable) メソッドを使用して複製を作成します。This method uses the virtual GetCurrentValueAsFrozenCore(Freezable) method to produce the clone.