1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
<Window x:Class="binding_sur_window.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:binding_sur_window"
Title="Window1" Height="300" Width="590">
<Grid>
<Button HorizontalAlignment="Left" Margin="25,82,0,122" Name="button1" Width="143" Click="button1_Click">Button</Button>
<TextBlock Height="21" HorizontalAlignment="Left" Margin="25,40,0,0" Name="textBlock1" VerticalAlignment="Top"
Text="{Binding Path=IsConnected,
RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:Window1}}}"
Width="143" Background="Cyan" />
</Grid>
</Window> |
Partager