File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 41
41
<BitmapImage x : Key =" Play" UriSource =" Resources/control_play_blue.png" />
42
42
<BitmapImage x : Key =" VS" UriSource =" Resources/visual_studio_purple.png" />
43
43
44
+ <ContextMenu x : Key =" JustCopyContextMenu" >
45
+ <MenuItem Header =" Copy" Command =" ApplicationCommands.Copy" />
46
+ </ContextMenu >
47
+
44
48
<Style TargetType =" {x:Type local:SearchableTextControl}" >
45
49
<Setter Property =" Template" >
46
50
<Setter .Value>
47
51
<ControlTemplate TargetType =" {x:Type local:SearchableTextControl}" >
48
52
<Border Background =" {TemplateBinding Background}"
49
- BorderBrush =" {TemplateBinding BorderBrush}"
50
- BorderThickness =" {TemplateBinding BorderThickness}"
51
- Padding =" {TemplateBinding Padding}" >
53
+ BorderBrush =" {TemplateBinding BorderBrush}"
54
+ BorderThickness =" {TemplateBinding BorderThickness}"
55
+ Padding =" {TemplateBinding Padding}" >
52
56
<TextBlock TextWrapping =" Wrap" x : Name =" PART_TEXT" />
53
57
</Border >
54
58
</ControlTemplate >
55
59
</Setter .Value>
56
60
</Setter >
61
+ <Style .Triggers>
62
+ <Trigger Property =" IsSelectable" Value =" True" >
63
+ <Setter Property =" ContextMenu" Value =" {StaticResource JustCopyContextMenu}" />
64
+ </Trigger >
65
+ </Style .Triggers>
57
66
</Style >
58
67
59
68
<Style TargetType =" Image" >
Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
92
92
ResetSelectionTextRange ( ) ;
93
93
Point mouseDownPoint = e . GetPosition ( this ) ;
94
94
StartSelectPosition = displayTextBlock . GetPositionFromPoint ( mouseDownPoint , true ) ;
95
+ EndSelectPosition = StartSelectPosition ;
95
96
isSelecting = true ;
96
97
}
97
98
}
You can’t perform that action at this time.
0 commit comments