首页 > 代码库 > WPF Command

WPF Command

<StackPanel>
<Slider x:Name="slider1" />
<Slider x:Name="slider2"/>
<Button Content="Increase" x:Name="firstBtn" Command="Slider.IncreaseLarge" CommandTarget="{Binding ElementName=slider1}"/>
<Button Content="Decrease" x:Name="secondBtn" Command="Slider.DecreaseLarge" CommandTarget="{Binding ElementName=slider2}"/>
</StackPanel>

WPF Command