FrameworkElement::FrameworkElement() { SetValue(HeightProperty, Int32::MinValue); SetValue(HorizontalAlignmentProperty, HorizontalAlignment::Stretch); SetValue(MarginProperty, Thickness(0)); SetValue(VerticalAlignmentProperty, VerticalAlignment::Stretch); SetValue(WidthProperty, Int32::MinValue); }
// Calculate the range of a particle with given energy double StopPow::Range(double E) throw(std::invalid_argument) { // sanity checking: if ( E < get_Emin() || E > get_Emax() ) { std::stringstream msg; msg << "Energy passed to StopPow::Range is bad: " << E; throw std::invalid_argument(msg.str()); } // use either self-defined range cutoff or Emin for the lower cutoff: double E2 = fmax( get_Emin() , 0 ); // sanity check: if( E <= E2 ) return 0; // use the Thickness method: return Thickness(E,E2); }
void DebugGuiWindowDebugProp::setLayoutParameters( DebugGuiVerticalLayout& layout ) { layout.setPadding( Thickness() ); layout.setExpandChildren( false ); }