mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-14 13:16:38 +08:00
ReDo Undo Item ItemWidth 和 Angle 等工具栏设置完成
This commit is contained in:
@@ -31,8 +31,6 @@ namespace AIStudio.Wpf.DiagramApp
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.HookEvents();
|
||||
|
||||
MainWindowViewModel = new MainWindowViewModel();
|
||||
this.DataContext = MainWindowViewModel;
|
||||
this.Closing += MainWindow_Closing;
|
||||
@@ -44,32 +42,12 @@ namespace AIStudio.Wpf.DiagramApp
|
||||
e.Handled = MainWindowViewModel.KeyExecuted(e);
|
||||
}
|
||||
|
||||
private void HookEvents()
|
||||
{
|
||||
//this.PreviewMouseWheel += this.OnPreviewMouseWheel;
|
||||
}
|
||||
|
||||
private void ZoomSlider_OnValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||
{
|
||||
var textFormattingMode = e.NewValue > 1.0 || Math.Abs(e.NewValue - 1.0) < double.Epsilon ? TextFormattingMode.Ideal : TextFormattingMode.Display;
|
||||
TextOptions.SetTextFormattingMode(this, textFormattingMode);
|
||||
}
|
||||
|
||||
//private void OnPreviewMouseWheel(object sender, MouseWheelEventArgs e)
|
||||
//{
|
||||
// if (Keyboard.IsKeyDown(Key.LeftCtrl) == false
|
||||
// && Keyboard.IsKeyDown(Key.RightCtrl) == false)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// var newZoomValue = this.zoomSlider.Value + (e.Delta > 0 ? 0.1 : -0.1);
|
||||
|
||||
// this.zoomSlider.Value = Math.Max(Math.Min(newZoomValue, this.zoomSlider.Maximum), this.zoomSlider.Minimum);
|
||||
|
||||
// e.Handled = true;
|
||||
//}
|
||||
|
||||
private void btnPrint_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
PrintDialog printDialog = new PrintDialog();
|
||||
|
||||
Reference in New Issue
Block a user