Oharra
Baimena behar duzu orria atzitzeko. Direktorioetan saioa has dezakezu edo haiek alda ditzakezu.
Baimena behar duzu orria atzitzeko. Direktorioak alda ditzakezu.
En el ejemplo siguiente se muestra cómo habilitar la revisión ortográfica en tiempo real mediante la propiedad TextBox de la clase IsEnabled.
Ejemplo
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel>
<TextBox SpellCheck.IsEnabled="True" Name="myTextBox"></TextBox>
</StackPanel>
</Page>
using System;
using System.Windows;
using System.Windows.Controls;
namespace SDKSample
{
public partial class SpellCheckExample : Page
{
public SpellCheckExample()
{
StackPanel myStackPanel = new StackPanel();
//Create TextBox
TextBox myTextBox = new TextBox();
myTextBox.Width = 200;
// Enable spellchecking on the TextBox.
myTextBox.SpellCheck.IsEnabled = true;
// Alternatively, the SetIsEnabled method could be used
// to enable or disable spell checking like this:
// SpellCheck.SetIsEnabled(myTextBox, true);
myStackPanel.Children.Add(myTextBox);
this.Content = myStackPanel;
}
}
}
Imports System.Windows
Imports System.Windows.Controls
Namespace SDKSample
Partial Public Class SpellCheckExample
Inherits Page
Public Sub New()
Dim myStackPanel As New StackPanel()
'Create TextBox
Dim myTextBox As New TextBox()
myTextBox.Width = 200
' Enable spellchecking on the TextBox.
myTextBox.SpellCheck.IsEnabled = True
' Alternatively, the SetIsEnabled method could be used
' to enable or disable spell checking like this:
' SpellCheck.SetIsEnabled(myTextBox, True)
myStackPanel.Children.Add(myTextBox)
Me.Content = myStackPanel
End Sub
End Class
End Namespace
Consulte también
- Usar revisión ortográfica con un menú contextual
- Información general sobre TextBox
- Información general sobre RichTextBox
Jardun lankidetzan gurekin GitHub-en
Eduki honen iturburua GitHub-en aurki daiteke, bertan arazoak eta aldaketak egiteko eskaerak sortu eta berrikus ditzakezu. Informazio gehiagorako, ikusi gure kolaboratzaileen gida.
.NET Desktop feedback