wpf 这种形变的属性,如何用后台实现绑定啊~~

2024-12-12 17:30:11
推荐回答(1个)
回答1:

Transform后台只提供了SetValue和SetCurrentValue没有提供SetBinding。建议用Slider事件去做。
前台:











后台:
private void s1_ValueChanged(object sender, RoutedPropertyChangedEventArgs e)
{
Trans1.Angle = s1.Value;
}
private void s2_ValueChanged(object sender, RoutedPropertyChangedEventArgs e)
{
Trans2.ScaleX = s2.Value;
Trans2.ScaleY = s2.Value;
}