123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Shapes;
- namespace SpacePlugin
- {
- /// <summary>
- /// WinSpaceBottom.xaml 的交互逻辑
- /// </summary>
- public partial class WinSpaceBottom : Window
- {
- public WinSpaceBottom()
- {
- InitializeComponent();
- }
- private void slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
- {
- scalTrans.ScaleX = this.slider.Value;
- scalTrans.ScaleY = this.slider.Value;
- }
- private void Canvas_OnMouseWheel(object sender, MouseWheelEventArgs e)
- {
- int delta = e.Delta;
- double sliderValue = this.slider.Value;
- double seed= this.slider.LargeChange;
- if (delta > 0)
- {
- //下滚
- sliderValue -= seed;
- }
- else
- {
- //上滚
- sliderValue += seed;
- }
- this.slider.Value=sliderValue;
- }
- }
- }
|