freezable

How can WPF objects deriving from Freezable be frozen in XAML?

Many types in WPF derive from Freezable. It provides immutability to mutable POCO objects and allows for improved performance in certain situations. So my question is, how can I freeze objects in XAML markup? (Note that I have posted a similar but different question too). ...

In what scenarios does freezing WPF objects benefit performance greatly?

Many types in WPF derive from Freezable. It provides immutability to mutable POCO objects and, apparently, allows for improved performance in certain situations. Has anyone found that freezing objects within their WPF application has greatly improved performance? If so, then which items gave the biggest performance difference when bei...

what does this error mean?

Hi All, I'm getting this error: Cannot use a DependencyObject that belongs to a different thread than its parent Freezable What does that even mean? Is it in English? Is the parent frozen, or is it just freezable? Any way to make a parent not freezable, if it makes the error go away? What's happening: I have two opengl winforms ...

Why is CompositeCollection not Freezable?

I am writing an application using the MVVM pattern. I am providing data to my view by setting my view's DataContext property to an instance of my ViewModel. Generally I just use Binding from there and go about my way. Recently, I tried to implement a ComboBox with an "extra" element beyond the collection my ViewModel provides that say...

The mysteries of extending the WPF animation classes

Silverlight has a property on its animation timelines (like DoubleAnimation) called EasingFunction which allows you to specify a function with which to interpolate two values. Even though it's coming in .NET 4, I'd like to port this to 3.5. After reading this, it seems pretty doable, but I'm having a weird issue. I'm extending DoubleAni...

Any "Gotchas" with using Freezable class outside of WPF?

I've been reading up on concurrency, and looking at things from a more "thread safe" point of view. WPF (or actually System.Windows.Freezable and others) has a freezable class, which can give "popsicle immutablity". Has anyone tried using this outside of WPF/Silverlight and would it be better to use this, or roll your own/use someone e...

WPF Merged ResourceDictionary inconsistencies

Hi everyone, I have a ResourceDictionary, which consists of a Brush object and a Style using this Brush object for several animated properties in its Template property (via StaticResource markup extension). The problem is; when I merge the dictionary with the global application ResourceDictionary (Application.Resources) the Brush does n...

How to debug this error when none of my code shows up in the stack ?

I'm sometimes getting the following error in my application: Cannot use a DependencyObject that belongs to a different thread than its parent Freezable I know how to solve this kind of error, but in that case I have no idea where it is happening, so I don't know what to fix... The exception's stack trace only contains .NET framewor...