■ FrameworkElement 엘리먼트 : DataContext 속성 사용하기

----------------------------------------------------------------------------------------------------

<StackPanel
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   DataContext="{Binding ElementName=scrollBar}">
   <ScrollBar
       Name="scrollBar"
      Margin="24"
       Orientation="Horizontal"
       Minimum="1"
       Maximum="100"
       SmallChange="1"
       LargeChange="10" />
   <Label
       HorizontalAlignment="Center"
       Content="{Binding Path=Value, Mode=OneWay}" />
   
<Button
       Margin="24"
       HorizontalAlignment="Center"
       FontSize="{Binding Path=Value, Mode=OneWay}">
       Bound Button
   
</Button>
</
StackPanel>
----------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker
TAG

댓글을 달아 주세요