Al's BrainDump

RSS

Navigation





Quick Search
»
Advanced Search »

PoweredBy
UserControls can be set to have a fixed size so they display in visual studio for poking around and to make them fill parent container at run time, set following in parent window:
Width="auto" Height="auto"

  • "auto" means only take whatever space a child component needs
  • "*" means fill the leftover space
  • "2*" means weight the proportional filling. Only works if there are more than one asterisk\proportional element.

Static & Dynamic Resources

The difference between StaticResource and DynamicResource is how they are accessed by WPF. The semantics of StaticResource are "just read this value once, and don’t check for changes." It’s static as in not moving, not as it is in C#. StaticResources are good for things that don’t change, like Brushes or Styles, or read-only data.
DynamicResource on the other hand is a little more intensive for WPF, because it will track changes to the ResourceDictionary. So if the value of a DynamicResource changes, WPF knows about it and updates the control accordingly.

ScrewTurn Wiki version 3.0.5.600. Some of the icons created by FamFamFam.