Skip to content

Commit

Permalink
feat(macOS): Add SelectedRange on TextBox
Browse files Browse the repository at this point in the history
  • Loading branch information
ajpinedam committed Feb 5, 2022
1 parent 81e9ce8 commit fcaccd6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Uno.UI/UI/Xaml/Controls/TextBox/TextBoxView.macOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,17 @@ public Brush Foreground

public NSRange MarkedRange => throw new NotImplementedException();

public NSRange SelectedRange => throw new NotImplementedException();
public NSRange SelectedRange
{
get => CurrentEditor?.SelectedRange ?? new NSRange(start: 0, len: 0);
set
{
if (CurrentEditor != null)
{
CurrentEditor.SelectedRange = value;
}
}
}

public NSString[] ValidAttributesForMarkedText => null;

Expand Down

0 comments on commit fcaccd6

Please sign in to comment.