using System.Windows; using System.Windows.Controls; using System.Windows.Media; namespace Venus_MainPages.Views { /// /// OverView.xaml 的交互逻辑 /// public partial class OverView : UserControl { public OverView() { InitializeComponent(); fl1.IsFlowing = true; fl1.FlowColor = new SolidColorBrush(Colors.Red); fl2.IsFlowing = true; fl3.IsFlowing = true; fl4.IsFlowing = true; flv.IsOpen = false; } bool isreserve; private void Button_Click(object sender, RoutedEventArgs e) { fl1.IsFlowing = !fl1.IsFlowing; fl2.IsFlowing = !fl2.IsFlowing; fl3.IsFlowing = !fl3.IsFlowing; fl4.IsFlowing = !fl4.IsFlowing; flv.IsOpen = !flv.IsOpen; } private void Button_Click_1(object sender, RoutedEventArgs e) { if (isreserve == true) { fl1.FlowDirection = FlowDirection.LeftToRight; fl2.FlowDirection = FlowDirection.LeftToRight; fl3.FlowDirection = FlowDirection.LeftToRight; fl4.FlowDirection = FlowDirection.LeftToRight; } else { fl1.FlowDirection = FlowDirection.RightToLeft; fl2.FlowDirection = FlowDirection.RightToLeft; fl3.FlowDirection = FlowDirection.RightToLeft; fl4.FlowDirection = FlowDirection.RightToLeft; } isreserve = !isreserve; } } }