private void dodajTipBtn_Click(object sender, RoutedEventArgs e) { id_Eror = false; naziv_Error = false; opis_Error = false; ikonica_Error = false; textB_id.GetBindingExpression(TextBox.TextProperty).UpdateSource(); textB_naziv.GetBindingExpression(TextBox.TextProperty).UpdateSource(); textB_opis.GetBindingExpression(TextBox.TextProperty).UpdateSource(); textB_ikonica.GetBindingExpression(TextBox.TextProperty).UpdateSource(); if (id_Eror == false && opis_Error == false && naziv_Error == false && ikonica_Error == false) { textB_id.GetBindingExpression(TextBox.TextProperty).UpdateSource(); textB_naziv.GetBindingExpression(TextBox.TextProperty).UpdateSource(); textB_ikonica.GetBindingExpression(TextBox.TextProperty).UpdateSource(); textB_opis.GetBindingExpression(TextBox.TextProperty).UpdateSource(); Podaci.dodajTip(tip); Close(); } }