private void CustomRegion_Checked(object sender, RoutedEventArgs e) { RegionOfInterest roi = new RegionOfInterest(x_, y_, w_, h_, xb_, yb_); RegionOfInterest[] regions = { roi }; if (CameraExist) { experiment_.SetCustomRegions(regions); } }