'how to display the value from the database with the desired id in the TextBlock when clicking on the TreeViewItem?
how to display the value from the themeName table with id_theme = 1?
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="Test1" Name="Test1" Expanded="Test1_Expanded" >
how to display the value from the database with the desired id in the TextBlock when clicking on the TreeViewItem?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
