Windows에서 SearchBar 맞춤법 검사
이 .NET 다중 플랫폼 앱 UI(.NET MAUI) Windows 플랫폼별 UI를 사용하면 SearchBar 맞춤법 검사 엔진과 상호 작용할 수 있습니다. 연결된 속성을 boolean
값으로 설정 SearchBar.IsSpellCheckEnabled
하여 XAML에서 사용합니다.
<ContentPage ...
xmlns:windows="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific;assembly=Microsoft.Maui.Controls">
<StackLayout>
<SearchBar ... windows:SearchBar.IsSpellCheckEnabled="true" />
...
</StackLayout>
</ContentPage>
또는 흐름 API를 사용하여 C#에서 사용할 수 있습니다.
using Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific;
...
searchBar.On<Microsoft.Maui.Controls.PlatformConfiguration.Windows>().SetIsSpellCheckEnabled(true);
이 메서드는 SearchBar.On<Microsoft.Maui.Controls.PlatformConfiguration.Windows>
이 플랫폼별이 Windows에서만 실행되도록 지정합니다. 네임스페이 Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific
스의 메서드는 SearchBar.SetIsSpellCheckEnabled
맞춤법 검사er를 켜고 끕니다. 또한 메서드를 SearchBar.SetIsSpellCheckEnabled
사용하여 맞춤법 검사er를 사용할 수 있는지 여부를 반환하도록 메서드를 호출 SearchBar.GetIsSpellCheckEnabled
하여 맞춤법 검사er를 전환할 수 있습니다.
searchBar.On<Microsoft.Maui.Controls.PlatformConfiguration.Windows>().SetIsSpellCheckEnabled(!searchBar.On<Microsoft.Maui.Controls.PlatformConfiguration.Windows>().GetIsSpellCheckEnabled());
그 결과 입력 SearchBar 한 텍스트는 맞춤법이 검사 수 있으며, 잘못된 맞춤법이 사용자에게 표시됩니다.
.NET MAUI
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기