updated screenshots

This commit is contained in:
Trevi Awater
2026-04-02 13:24:11 +02:00
parent edeac88a92
commit ea24c9eed5
7 changed files with 12 additions and 4 deletions

View File

@@ -12,6 +12,7 @@ using System.Collections.Generic;
using System.Text.RegularExpressions;
using CoreGraphics;
using Foundation;
using Microsoft.Maui;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Handlers;
using Microsoft.Maui.Platform;
@@ -22,6 +23,15 @@ namespace Xamarin.Neo4j.iOS.CustomRenderers
{
public class QueryEditorHandler : EditorHandler
{
public QueryEditorHandler()
{
Mapper.AppendToMapping(nameof(Editor.Text), (handler, _) =>
{
if (handler is QueryEditorHandler qeh && handler.PlatformView is MauiTextView textView)
HighlightWords(textView, qeh._keyWords);
});
}
private readonly string[] _keyWords =
[
// Clauses
@@ -141,8 +151,6 @@ namespace Xamarin.Neo4j.iOS.CustomRenderers
AutoCapitalizeKeywords(platformView, _keyWords);
HighlightWords(platformView, _keyWords);
};
HighlightWords(platformView, _keyWords);
}
private static void HighlightWords(UITextView platformView, IEnumerable<string> wordsToHighlight)