private void Conselhos_Text_Loaded(object sender, RoutedEventArgs e) { Conselhos_TextBlock = sender as TextBlock; Classes.Conteudo_Tema Conselhos = dbtemas.ReadTemaTitle("Conselhos de Segurança"); /*binding3.Source = Conselhos; * binding3.Path = new PropertyPath("Titulo"); * BindingOperations.SetBinding(Conselhos_TextBlock, TextBlock.TextProperty, binding);*/ Conselhos_TextBlock.Text = Conselhos.Titulo as string; }
private void Problema_Text_Loaded(object sender, RoutedEventArgs e) { Problema_TextBlock = sender as TextBlock; Classes.Conteudo_Tema Problema = dbtemas.ReadTemaTitle("Tive um Problema"); /*binding2.Source = Problema; * binding2.Path = new PropertyPath("Titulo"); * BindingOperations.SetBinding(Problema_TextBlock, TextBlock.TextProperty, binding);*/ Problema_TextBlock.Text = Problema.Titulo as string; }
private void Vitima_Text_Loaded(object sender, RoutedEventArgs e) { Vitima_TextBlock = sender as TextBlock; Classes.Conteudo_Tema Vitima = dbtemas.ReadTemaTitle("Fui Vítima de Crime"); /*binding.Source = Vitima; * binding.Path = new PropertyPath("Titulo"); * BindingOperations.SetBinding(Vitima_TextBlock, TextBlock.TextProperty, binding);*/ Vitima_TextBlock.Text = Vitima.Titulo as string; }
private void listBoxobj_SelectionChanged(object sender, SelectionChangedEventArgs e) { Classes.Conteudo_Tema m = new Classes.Conteudo_Tema(); m = listBoxobj.SelectedItem as Classes.Conteudo_Tema; // If selected index is -1 (no selection) do nothing if (listBoxobj.SelectedIndex == -1) { return; } // Navigate to the new page Frame.Navigate(typeof(Pages.Topicos), m.parent_tema.Titulo); // Reset selected index to -1 (no selection) listBoxobj.SelectedIndex = -1; }