mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-23 09:56:36 +08:00
最近精简代码,有些bug,修复
This commit is contained in:
@@ -2383,9 +2383,10 @@
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<ScrollViewer x:Name="designerScrollViewer"
|
||||
Background="{DynamicResource GrayBrush8}"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
Background="{DynamicResource GrayBrush8}"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
Focusable="False">
|
||||
<DockPanel x:Name="panel">
|
||||
<controls:Ruler x:Name="hruler"
|
||||
Unit="{Binding PageUnit,Converter={StaticResource RulerUnitConverter}}"
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace AIStudio.Wpf.DiagramApp
|
||||
|
||||
private void HookEvents()
|
||||
{
|
||||
this.PreviewMouseWheel += this.OnPreviewMouseWheel;
|
||||
//this.PreviewMouseWheel += this.OnPreviewMouseWheel;
|
||||
}
|
||||
|
||||
private void ZoomSlider_OnValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||
@@ -55,20 +55,20 @@ namespace AIStudio.Wpf.DiagramApp
|
||||
TextOptions.SetTextFormattingMode(this, textFormattingMode);
|
||||
}
|
||||
|
||||
private void OnPreviewMouseWheel(object sender, MouseWheelEventArgs e)
|
||||
{
|
||||
if (Keyboard.IsKeyDown(Key.LeftCtrl) == false
|
||||
&& Keyboard.IsKeyDown(Key.RightCtrl) == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
//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);
|
||||
// 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);
|
||||
// this.zoomSlider.Value = Math.Max(Math.Min(newZoomValue, this.zoomSlider.Maximum), this.zoomSlider.Minimum);
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
// e.Handled = true;
|
||||
//}
|
||||
|
||||
private void btnPrint_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user