private bool IsValidProduct() { CbProduct.GetBindingExpression(ComboBox.SelectedItemProperty).UpdateSource(); CbOption.GetBindingExpression(ComboBox.SelectedItemProperty).UpdateSource(); TbAmount.GetBindingExpression(TextBox.TextProperty).UpdateSource(); return(!Validation.GetHasError(CbProduct) && !Validation.GetHasError(CbOption) && !Validation.GetHasError(TbAmount)); }
void ReleaseDesignerOutlets() { if (BtnAdd != null) { BtnAdd.Dispose(); BtnAdd = null; } if (LblAmountNormalized != null) { LblAmountNormalized.Dispose(); LblAmountNormalized = null; } if (LblConversion != null) { LblConversion.Dispose(); LblConversion = null; } if (LblDescription != null) { LblDescription.Dispose(); LblDescription = null; } if (LblTotalAmount != null) { LblTotalAmount.Dispose(); LblTotalAmount = null; } if (PickerCategory != null) { PickerCategory.Dispose(); PickerCategory = null; } if (PickerCurrency != null) { PickerCurrency.Dispose(); PickerCurrency = null; } if (TbAmount != null) { TbAmount.Dispose(); TbAmount = null; } if (TbDescription != null) { TbDescription.Dispose(); TbDescription = null; } }