1
I have the following code on XAML
:
<Button Grid.Column="0" Grid.Row="1" x:Name="btnSete" Click="btn_Click">
<ContentControl>
<Viewbox Margin="3">
<TextBlock Text="7"/>
</Viewbox>
</ContentControl>
</Button>
and in code Behind:
private void btn_Click(object sender, RoutedEventArgs e)
{
Button btn = (Button)sender;
//txbDisplay.Text = btn.ContentStringFormat.ToString();
}
Doubt now is, how do I stop at the Click
take the content that is within:
<ContentControl>
<Viewbox Margin="3">
<TextBlock Text="7"/>
</Viewbox>
</ContentControl>
button?
I want to show in the txbDisplay
the value that is in <TextBlock Text="7"/>
.