Skip to content

Commit

Permalink
support dragging images to note window when it's docked;
Browse files Browse the repository at this point in the history
remove PreviewDragEnter that seems to be redundant when PreviewDragOver is already present;
bump version;
  • Loading branch information
changbowen committed Nov 5, 2022
1 parent ce7e631 commit a957135
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:DesktopNote"
Title="Desktop Note" Height="350" Width="300" ShowInTaskbar="False" AllowsTransparency="True" WindowStyle="None" Background="{x:Null}"
ResizeMode="CanResizeWithGrip" UseLayoutRounding="True"
ResizeMode="CanResizeWithGrip" UseLayoutRounding="True" AllowDrop="True" PreviewDragOver="RTB_Main_PreviewDrag"
MouseEnter="Win_Main_MouseEnter" Loaded="Win_Main_Loaded">
<!--<Window.CacheMode>
<BitmapCache/>
Expand All @@ -28,7 +28,7 @@
<RichTextBox x:Name="RTB_Main" Margin="20" Background="{x:Null}" BorderBrush="{x:Null}" AcceptsTab="True" BorderThickness="0" IsInactiveSelectionHighlightEnabled="True"
TextChanged="RTB_Main_TextChanged" PreviewKeyDown="RTB_Main_PreviewKeyDown" PreviewMouseWheel="RTB_Main_PreviewMouseWheel"
GotKeyboardFocus="RTB_Main_GotKeyboardFocus" AllowDrop="True"
PreviewDragEnter="RTB_Main_PreviewDrag" PreviewDragOver="RTB_Main_PreviewDrag" PreviewDrop="RTB_Main_PreviewDrop"
PreviewDragOver="RTB_Main_PreviewDrag" PreviewDrop="RTB_Main_PreviewDrop"
ContextMenuOpening="RTB_Main_ContextMenuOpening" PreviewMouseDown="RTB_Main_PreviewMouseDown">
<!--<wtk:RichTextBoxFormatBarManager.FormatBar>
<wtk:RichTextBoxFormatBar/>
Expand Down
2 changes: 2 additions & 0 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ private void RTB_Main_PreviewMouseDown(object sender, MouseButtonEventArgs e)
private void RTB_Main_PreviewDrag(object sender, DragEventArgs e)
{
e.Effects = DragDropEffects.Copy;
UnDock();

e.Handled = true;
}

Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
[assembly: AssemblyVersion("1.6.1.0")]
[assembly: AssemblyFileVersion("1.6.1.0")]

0 comments on commit a957135

Please sign in to comment.