I'm trying to optimize my WPF/VB.net program, and I'm considering freezing some objects. However, while I know that an object that is animated in any way cannot be frozen, I need to know...can you change the visibility of a frozen object?
Thank you!
I'm trying to optimize my WPF/VB.net program, and I'm considering freezing some objects. However, while I know that an object that is animated in any way cannot be frozen, I need to know...can you change the visibility of a frozen object?
Thank you!
Copyright © 2021 Jogjafile Inc.
Freezing a
Freezableobject conceptually makes it immutable so an attempt to write to any writable properties should throw an exception, includingVisibility. You can however implicitly affect aFreezableobject's state by containing it in a non-freezable object. For example, you can use aGridor any otherPanelas a wrapper and toggle theVisibilityof the container and it will affect the seemingly immutable frozen object indirectly. That being said, freezing doesn't really buy you very much efficiency-wise unless you are making quite a lot of copies of the object.