Answer the question
In order to leave comments, you need to log in
How to display the value from the database with the desired id in the TextBlock when clicking on a tree element?
How to make that when selecting a tree element in a TextBlock, the name of the corresponding test topic is displayed
public partial class PageTest : Page
{
private Theme _currentTheme = new Theme();
public PageTest()
{
InitializeComponent();
DataContext = _currentTheme;
}
private void Test1_Expanded(object sender, RoutedEventArgs e)
{
if (_currentTheme.id_theme == 1)
{
}
}
<TextBlock Margin="20, 0,10,10" Name="TxbQuestion" Height="auto" Text="{Binding themeName}"></TextBlock>
<TreeViewItem Header=" Тест 1 " Name="Test1" Expanded="Test1_Expanded" >
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question