private void btnPosalji_Click(object sender, RoutedEventArgs e) { //Sledeca verzija mora da ima konektivnost sa bazom if (txtIme.Text != "") { if (txtKomentar.Text != "") { StackPanel panel = new StackPanel(); panel.Margin = new Thickness(10, 3, 10, 10); TextBlock komentar = new TextBlock(); komentar.Text = txtKomentar.Text; komentar.FontSize = 20; komentar.Foreground = new SolidColorBrush(Color.FromRgb(255, 255, 255)); komentar.TextWrapping = TextWrapping.Wrap; CultureInfo c = new CultureInfo(0x0C1A); TextBlock autor = new TextBlock(); autor.FontSize = 15; autor.Foreground = new SolidColorBrush(Color.FromRgb(215, 255, 255)); autor.HorizontalAlignment = HorizontalAlignment.Right; autor.Text = "Аутор: " + txtIme.Text + ", Написано: " + DateTime.Now.Date.ToString("D", c); Border border = new Border(); border.BorderThickness = new Thickness(0, 0, 0, 1); border.BorderBrush = new SolidColorBrush(Color.FromRgb(255, 255, 255)); panel.Children.Add(komentar); panel.Children.Add(autor); panel.Children.Add(border); //pnlKomentari.Children.Add(panel); //pnlKomentari.RowDefinitions.Add(new RowDefinition()); Animate.AddChildSP(panel, pnlKomentari, 200); txtIme.Text = ""; txtKomentar.Text = ""; } else { MessageBox.Show("Морате унети своји коментар!"); } } else { MessageBox.Show("Морате унети своје име!"); } }
void pgVesti_Loaded(object sender, RoutedEventArgs e) { for (int i = 0; i < 10; i++) { VestiShowItem temp = new VestiShowItem(new VestiItem()); if (temp.vest.tip == TipVesti.OPSTE) { } else if (temp.vest.tip == TipVesti.ISTAKNUTO) { } else { } Animate.AddChildSP(new VestiShowItem(new VestiItem()), Osnovne, i * 100); } }