Mega Code Archive

 
Categories / VB.Net Tutorial / WPF
 

Bind a Property of an Element to Itself

<Window x: Class="WpfApplication1.Window1"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     Title="WPF" Height="100" Width="240">     <Grid>         <Slider Name="slider"                 Margin="4" Interval="1"                 TickFrequency="1"                 IsSnapToTickEnabled="True"                 Minimum="0" Maximum="100"                 ToolTip="{Binding                            RelativeSource=                             {RelativeSource Self},                               Path=Value}"/>     </Grid> </Window>