Поделиться через


InkCollector.MarginY - свойство

Обновлен: Ноябрь 2007

Gets or sets the margins along the y-axis, in pixels.

Пространство имен:  Microsoft.Ink
Сборка:  Microsoft.Ink (в Microsoft.Ink.dll)

Синтаксис

'Декларация
Public Property MarginY As Integer
'Применение
Dim instance As InkCollector
Dim value As Integer

value = instance.MarginY

instance.MarginY = value
public int MarginY { get; set; }
public:
property int MarginY {
    int get ();
    void set (int value);
}
/** @property */
public int get_MarginY()
/** @property */
public  void set_MarginY(int value)
public function get MarginY () : int
public function set MarginY (value : int)

Значение свойства

Тип: System.Int32
The margins along the y-axis, in pixels.

Value

Meaning

DefaultMargin property

The DefaultMargin field of the InkCollector control.

Int32

The application-defined margins along the y-axis.

Заметки

This margin provides a buffer around the edge of the ink window. The DefaultMargin field specifies the default margin that the MarginY property uses.

This property is most commonly used with nonintegrated tablet devices. The buffer gives users a margin of error when writing on a device that may not map directly to the size of the display screen.

A positive margin extends outside the bounds of the InkCollector object, a negative margin extends inside the bounds of the control, and a value of zero produces no margin. Ink is collected if the stroke starts within the margin.

This behavior does not clip the ink. The bounds of the control are either the GetWindowInputRectangle property or the client rectangle for the window.

The margin is effective only within the application's window. If the pen is applied outside the application's window, then the application loses focus and cannot collect ink.

ms571718.alert_note(ru-ru,VS.90).gifПримечание.

Ink collection on the InkCollector object must be disabled before setting this property. To disable ink collection on the InkCollector object, set the Enabled property to false. You can then set the MarginY property, and re-enable ink collection on the control by setting the Enabled property to true. Alternatively, use SetWindowInputRectangle to change the input area while the InkCollector is enabled.

Примеры

The following example sets the y-axis margin of a window rectangle for an InkCollector to five pixels.

mInkCollector.Enabled = False
mInkCollector.MarginY = 5
mInkCollector.Enabled = True
mInkCollector.Enabled = false;
mInkCollector.MarginY = 5;
mInkCollector.Enabled = true;

Платформы

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

InkCollector Класс

InkCollector - члены

Microsoft.Ink - пространство имен

InkCollector.DefaultMargin

InkCollector.Enabled

InkCollector.MarginX