Skip to content

Commit 0428550

Browse files
committed
TokenHovering -> TokenPointerOver
1 parent bc95b9a commit 0428550

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

Microsoft.Toolkit.Uwp.SampleApp/SamplePages/RichSuggestBox/RichSuggestBoxPage.xaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public void OnXamlRendered(FrameworkElement control)
109109
{
110110
this._tsb.SuggestionChosen -= this.SuggestingBox_OnSuggestionChosen;
111111
this._tsb.SuggestionsRequested -= this.SuggestingBox_OnSuggestionsRequested;
112-
this._tsb.TokenHovering -= this.SuggestingBox_OnTokenHovering;
112+
this._tsb.TokenPointerOver -= this.SuggestingBox_OnTokenPointerOver;
113113
}
114114

115115
if (control.FindChild("SuggestingBox") is RichSuggestBox rsb)
@@ -124,7 +124,7 @@ public void OnXamlRendered(FrameworkElement control)
124124
this._tsb = tsb;
125125
this._tsb.SuggestionChosen += this.SuggestingBox_OnSuggestionChosen;
126126
this._tsb.SuggestionsRequested += this.SuggestingBox_OnSuggestionsRequested;
127-
this._tsb.TokenHovering += this.SuggestingBox_OnTokenHovering;
127+
this._tsb.TokenPointerOver += this.SuggestingBox_OnTokenPointerOver;
128128
}
129129

130130
if (control.FindChild("TokenListView1") is ListView tls1)
@@ -138,7 +138,7 @@ public void OnXamlRendered(FrameworkElement control)
138138
}
139139
}
140140

141-
private void SuggestingBox_OnTokenHovering(RichSuggestBox sender, RichSuggestTokenHoveringEventArgs args)
141+
private void SuggestingBox_OnTokenPointerOver(RichSuggestBox sender, RichSuggestTokenPointerOverEventArgs args)
142142
{
143143
var flyout = (Flyout)FlyoutBase.GetAttachedFlyout(sender);
144144
var pointerPosition = args.CurrentPoint.Position;

Microsoft.Toolkit.Uwp.UI.Controls.Input/RichSuggestBox/RichSuggestBox.Events.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public partial class RichSuggestBox
3232
/// <summary>
3333
/// Event raised when a pointer is hovering over a token.
3434
/// </summary>
35-
public event TypedEventHandler<RichSuggestBox, RichSuggestTokenHoveringEventArgs> TokenHovering;
35+
public event TypedEventHandler<RichSuggestBox, RichSuggestTokenPointerOverEventArgs> TokenPointerOver;
3636

3737
/// <summary>
3838
/// Event raised when text is changed, either by user or by internal formatting.

Microsoft.Toolkit.Uwp.UI.Controls.Input/RichSuggestBox/RichSuggestBox.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,9 @@ private void SuggestionList_GotFocus(object sender, RoutedEventArgs e)
258258
private void RichEditBox_OnPointerMoved(object sender, PointerRoutedEventArgs e)
259259
{
260260
var pointer = e.GetCurrentPoint(this);
261-
if (TokenHovering != null)
261+
if (this.TokenPointerOver != null)
262262
{
263-
this.InvokeTokenHovering(pointer);
263+
this.InvokeTokenPointerOver(pointer);
264264
}
265265
}
266266

@@ -473,7 +473,7 @@ private void InvokeTokenSelected(ITextSelection selection)
473473
});
474474
}
475475

476-
private void InvokeTokenHovering(PointerPoint pointer)
476+
private void InvokeTokenPointerOver(PointerPoint pointer)
477477
{
478478
var pointerPosition = TransformToVisual(_richEditBox).TransformPoint(pointer.Position);
479479
var padding = _richEditBox.Padding;
@@ -488,7 +488,7 @@ private void InvokeTokenHovering(PointerPoint pointer)
488488
if (hitTestRect.Contains(pointerPosition) && linkRange.Expand(TextRangeUnit.Link) > 0 &&
489489
TryGetTokenFromRange(linkRange, out var token))
490490
{
491-
this.TokenHovering.Invoke(this, new RichSuggestTokenHoveringEventArgs
491+
this.TokenPointerOver.Invoke(this, new RichSuggestTokenPointerOverEventArgs
492492
{
493493
Token = token,
494494
Range = linkRange,

Microsoft.Toolkit.Uwp.UI.Controls.Input/RichSuggestBox/RichSuggestTokenHoveringEventArgs.cs renamed to Microsoft.Toolkit.Uwp.UI.Controls.Input/RichSuggestBox/RichSuggestTokenPointerOverEventArgs.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
namespace Microsoft.Toolkit.Uwp.UI.Controls
1010
{
1111
/// <summary>
12-
/// Provides data for <see cref="RichSuggestBox.TokenHovering"/> event.
12+
/// Provides data for <see cref="RichSuggestBox.TokenPointerOver"/> event.
1313
/// </summary>
14-
public class RichSuggestTokenHoveringEventArgs : EventArgs
14+
public class RichSuggestTokenPointerOverEventArgs : EventArgs
1515
{
1616
/// <summary>
1717
/// Gets or sets the selected token.

0 commit comments

Comments
 (0)