fix:issue #3
This commit is contained in:
@@ -226,7 +226,7 @@
|
|||||||
<ui:SimpleStackPanel VerticalAlignment="Center">
|
<ui:SimpleStackPanel VerticalAlignment="Center">
|
||||||
<TextBlock Foreground="#fafafa" HorizontalAlignment="Center"
|
<TextBlock Foreground="#fafafa" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" FontSize="15" Margin="0,0,0,10"
|
VerticalAlignment="Center" FontSize="15" Margin="0,0,0,10"
|
||||||
Text="开发中..." />
|
Text="开发中...请不要点击,可能会导致ICC异常崩溃" />
|
||||||
<ui:SimpleStackPanel Spacing="5">
|
<ui:SimpleStackPanel Spacing="5">
|
||||||
<ui:SimpleStackPanel Spacing="5" Orientation="Horizontal"
|
<ui:SimpleStackPanel Spacing="5" Orientation="Horizontal"
|
||||||
HorizontalAlignment="Center">
|
HorizontalAlignment="Center">
|
||||||
|
|||||||
@@ -361,15 +361,17 @@ namespace Ink_Canvas {
|
|||||||
inkCanvas.Cursor = new Cursor(sri.Stream);
|
inkCanvas.Cursor = new Cursor(sri.Stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 触摸输入,通常隐藏光标
|
// 触摸输入,不隐藏光标
|
||||||
private void inkCanvas_TouchDown(object sender, TouchEventArgs e)
|
private void inkCanvas_TouchDown(object sender, TouchEventArgs e)
|
||||||
{
|
{
|
||||||
|
inkCanvas.ForceCursor = false;
|
||||||
System.Windows.Forms.Cursor.Show();
|
System.Windows.Forms.Cursor.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 触摸结束,恢复光标
|
// 触摸结束,恢复光标
|
||||||
private void inkCanvas_TouchUp(object sender, TouchEventArgs e)
|
private void inkCanvas_TouchUp(object sender, TouchEventArgs e)
|
||||||
{
|
{
|
||||||
|
inkCanvas.ForceCursor = false;
|
||||||
System.Windows.Forms.Cursor.Show();
|
System.Windows.Forms.Cursor.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
#region 主要的工具按鈕事件
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 计算任务栏高度,桌面模式下仅计算任务栏自身高度
|
||||||
|
/// </summary>
|
||||||
|
private double CalculateToolbarHeight(bool isDesktopMode)
|
||||||
|
{
|
||||||
|
if (isDesktopMode)
|
||||||
|
{
|
||||||
|
// 桌面模式: 任务栏高度 = 主屏幕高度 - 全屏可用高度
|
||||||
|
return SystemParameters.PrimaryScreenHeight - SystemParameters.FullPrimaryScreenHeight;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 其他模式: 原有计算方式(包含窗口标题栏)
|
||||||
|
return SystemParameters.PrimaryScreenHeight
|
||||||
|
- SystemParameters.FullPrimaryScreenHeight
|
||||||
|
- SystemParameters.WindowCaptionHeight;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public async void ViewboxFloatingBarMarginAnimation(int MarginFromEdge,
|
||||||
|
bool PosXCaculatedWithTaskbarHeight = false)
|
||||||
|
{
|
||||||
|
|
||||||
|
// 删除旧计算方式
|
||||||
|
// var toolbarHeight = System.Windows.SystemParameters.PrimaryScreenHeight - System.Windows.SystemParameters.FullPrimaryScreenHeight - System.Windows.SystemParameters.WindowCaptionHeight;
|
||||||
|
|
||||||
|
// 替换为新计算方式
|
||||||
|
var toolbarHeight = CalculateToolbarHeight(Topmost == false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public async void PureViewboxFloatingBarMarginAnimationInDesktopMode()
|
||||||
|
{
|
||||||
|
// 删除旧计算方式
|
||||||
|
// var toolbarHeight = System.Windows.SystemParameters.PrimaryScreenHeight - System.Windows.SystemParameters.FullPrimaryScreenHeight - System.Windows.SystemParameters.WindowCaptionHeight;
|
||||||
|
|
||||||
|
// 替换为新计算方式(桌面模式专用)
|
||||||
|
var toolbarHeight = System.Windows.SystemParameters.PrimaryScreenHeight
|
||||||
|
- System.Windows.SystemParameters.FullPrimaryScreenHeight;
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user