RecognizerGuide.Midline (Propiedad)
Actualización: noviembre 2007
Obtiene o establece el alto de la línea media. El alto de la línea media es la distancia de la línea base a la línea media del cuadro dibujado.
Espacio de nombres: Microsoft.Ink
Ensamblado: Microsoft.Ink (en Microsoft.Ink.dll)
Sintaxis
'Declaración
Public Property Midline As Integer
'Uso
Dim instance As RecognizerGuide
Dim value As Integer
value = instance.Midline
instance.Midline = value
public int Midline { get; set; }
public:
property int Midline {
int get ();
void set (int value);
}
/** @property */
public int get_Midline()
/** @property */
public void set_Midline(int value)
public function get Midline () : int
public function set Midline (value : int)
Valor de propiedad
Tipo: System.Int32
El alto de la línea media de la guía en unidades HIMETRIC.
Comentarios
El valor es 0 si la línea media no está presente.
Ejemplos
En este ejemplo, se crea una instancia del objeto RecognizerContext y se asigna la propiedad Guide creando un nuevo objeto RecognizerGuide.
' create a new RecognizerContext object
mRecognizerContext = New RecognizerContext()
' if the Recognizer supports LinedInput, set the Guide
If (mRecognizerContext.Recognizer.Capabilities And RecognizerCapabilities.LinedInput) <> 0 Then
' get the lower right corner in pixel units
Dim lowerRight As Point = New Point(mInkOverlay.AttachedControl.Width, mInkOverlay.AttachedControl.Height)
' convert to ink space units
mInkOverlay.Renderer.PixelToInkSpace(Me.CreateGraphics(), lowerRight)
' create Rectangles
Dim writingBox As Rectangle = New Rectangle(0, 0, lowerRight.X, lowerRight.Y)
Dim drawnBox As Rectangle = New Rectangle(0, 0, lowerRight.X, lowerRight.Y)
' shrink drawn box relative to writing box
drawnBox.Inflate(-100, -100)
' create Guide with 8 rows, zero columns, and no midline
Dim guide As RecognizerGuide = New RecognizerGuide(8, 0, 0, writingBox, drawnBox)
mRecognizerContext.Guide = guide
End If
// create a new RecognizerContext object
mRecognizerContext = new RecognizerContext();
// if the Recognizer supports LinedInput, set the Guide
if ((mRecognizerContext.Recognizer.Capabilities & RecognizerCapabilities.LinedInput) != 0)
{
// get the lower right corner in pixel units
Point lowerRight = new Point(mInkOverlay.AttachedControl.Width, mInkOverlay.AttachedControl.Height);
// convert to ink space units
mInkOverlay.Renderer.PixelToInkSpace(this.CreateGraphics(), ref lowerRight);
// create Rectangles
Rectangle writingBox = new Rectangle(0, 0, lowerRight.X, lowerRight.Y);
Rectangle drawnBox = new Rectangle(0, 0, lowerRight.X, lowerRight.Y);
// shrink drawn box relative to writing box
drawnBox.Inflate(-100, -100);
// create Guide with 8 rows, zero columns, and no midline
RecognizerGuide guide = new RecognizerGuide(8, 0, 0, writingBox, drawnBox);
mRecognizerContext.Guide = guide;
}
Plataformas
Windows Vista
.NET Framework y .NET Compact Framework no admiten todas las versiones de cada plataforma. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.
Información de versión
.NET Framework
Compatible con: 3.0