Skip to content

Instantly share code, notes, and snippets.

@belsrc
Created November 23, 2012 23:55
Show Gist options
  • Save belsrc/4137754 to your computer and use it in GitHub Desktop.
Save belsrc/4137754 to your computer and use it in GitHub Desktop.
Measuring container height before collapsing - C#
private void Window_Loaded( object sender, RoutedEventArgs e ) {
container.Measure( new Size( Double.PositiveInfinity, Double.PositiveInfinity ) );
this._containHeight = container.DesiredSize.Height;
container.Height = 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment