void box_CheckChanged( object sender, CheckBox box ) { patchPass.PolygonMode = ( box.IsChecked ? PolygonMode.Wireframe : PolygonMode.Solid ); }