实现控件与控件的绑定效果
- OneWay
Source影响着Target,但是Target却应县不到Sourcw。 - OneWayToSource
Target影响Source,而Source却影响不到Target。 - TwoWay
Source与Target相互影响。 - OneTime
在TwoWay的基础生延伸了一个OneTime,仅绑定一次。
XAML代码所示:
<Window x:Class=“WPFdemo.控件到控件的绑定”
xmlns=“http://schemas.microsoft.com/winfx/2006/xaml/presentation”
xmlns:x=“http://schemas.microsoft.com/winfx/2006/xaml”
Title="控件到控件的绑定" Height="350" Width="525">
<!--<! ‐‐页面画布布局‐‐>-->
<Canvas>
<ScrollBar Height="24" Name="scrollBar1" Width="237"
Orientation=“Horizontal” Canvas.Left=“103” Canvas.Top=“51”
Minimum=“1” Maximum=“100” SmallChange=“1” />
效果: