Skip to content

Commit 3e9bf56

Browse files
authored
修复 PPT 内进入画板问题
1 parent c054e85 commit 3e9bf56

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

Ink Canvas/MainWindow.xaml.cs

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,6 +1149,7 @@ private void BtnSwitch_Click(object sender, RoutedEventArgs e)
11491149
}
11501150
StackPanelPPTButtons.Visibility = Visibility.Visible;
11511151
}
1152+
Topmost = true;
11521153
BtnHideInkCanvas_Click(BtnHideInkCanvas, e);
11531154
}
11541155
else
@@ -1188,6 +1189,7 @@ private void BtnSwitch_Click(object sender, RoutedEventArgs e)
11881189
}
11891190

11901191
StackPanelPPTButtons.Visibility = Visibility.Visible;
1192+
Topmost = true;
11911193
break;
11921194
case 1: //黑板或白板模式
11931195
currentMode = 1;
@@ -1212,6 +1214,7 @@ private void BtnSwitch_Click(object sender, RoutedEventArgs e)
12121214
}
12131215

12141216
StackPanelPPTButtons.Visibility = Visibility.Collapsed;
1217+
Topmost = false;
12151218
break;
12161219
}
12171220
}
@@ -2241,7 +2244,15 @@ private void PptApplication_SlideShowBegin(SlideShowWindow Wn)
22412244
Application.Current.Dispatcher.Invoke(() =>
22422245
{
22432246
// 退出画板模式
2247+
pointDesktop = new Point(ViewboxFloatingBar.Margin.Left, ViewboxFloatingBar.Margin.Top);
2248+
pointPPT = new Point(-1, -1);
2249+
2250+
StackPanelPPTControls.Visibility = Visibility.Visible;
2251+
BtnPPTSlideShow.Visibility = Visibility.Collapsed;
2252+
BtnPPTSlideShowEnd.Visibility = Visibility.Visible;
2253+
ViewBoxStackPanelMain.Margin = new Thickness(10, 10, 10, 10);
22442254
BtnSwitch_Click(null, null);
2255+
22452256
//调整颜色
22462257
double screenRatio = SystemParameters.PrimaryScreenWidth / SystemParameters.PrimaryScreenHeight;
22472258
if (Math.Abs(screenRatio - 16.0 / 9) <= -0.01)
@@ -2311,14 +2322,6 @@ private void PptApplication_SlideShowBegin(SlideShowWindow Wn)
23112322
}
23122323
}
23132324

2314-
pointDesktop = new Point(ViewboxFloatingBar.Margin.Left, ViewboxFloatingBar.Margin.Top);
2315-
pointPPT = new Point(-1, -1);
2316-
2317-
StackPanelPPTControls.Visibility = Visibility.Visible;
2318-
BtnPPTSlideShow.Visibility = Visibility.Collapsed;
2319-
BtnPPTSlideShowEnd.Visibility = Visibility.Visible;
2320-
ViewBoxStackPanelMain.Margin = new Thickness(10, 10, 10, 10);
2321-
23222325
if (Settings.PowerPointSettings.IsShowCanvasAtNewSlideShow && Main_Grid.Background == Brushes.Transparent)
23232326
{
23242327
if (currentMode != 0)
@@ -6968,8 +6971,6 @@ private void ImageBlackboard_MouseUp(object sender, MouseButtonEventArgs e)
69686971
if (currentMode == 0)
69696972
{
69706973
//进入黑板
6971-
Topmost = false;
6972-
69736974
if (BtnPPTSlideShowEnd.Visibility == Visibility.Collapsed)
69746975
{
69756976
pointDesktop = new Point(ViewboxFloatingBar.Margin.Left, ViewboxFloatingBar.Margin.Top);
@@ -7000,8 +7001,6 @@ private void ImageBlackboard_MouseUp(object sender, MouseButtonEventArgs e)
70007001
else
70017002
{
70027003
//关闭黑板
7003-
Topmost = true;
7004-
70057004
if (isInMultiTouchMode) BorderMultiTouchMode_MouseUp(null, null);
70067005

70077006
if (BtnPPTSlideShowEnd.Visibility == Visibility.Collapsed)

0 commit comments

Comments
 (0)