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


PenInputPanel.Visible - свойство

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

Deprecated. Gets or sets a value that indicates whether the PenInputPanel object is visible. PenInputPanel has been replaced by Microsoft.Ink.TextInput.

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

Синтаксис

'Декларация
Public Property Visible As Boolean
'Применение
Dim instance As PenInputPanel
Dim value As Boolean

value = instance.Visible

instance.Visible = value
public bool Visible { get; set; }
public:
property bool Visible {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_Visible()
/** @property */
public  void set_Visible(boolean value)
public function get Visible () : boolean
public function set Visible (value : boolean)

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

Тип: System.Boolean
true if the pen input panel is visible; otherwise, false.

Заметки

You can set the Visible property to true only when the attached control has focus. Otherwise, setting this property generates an error.

ms571984.alert_security(ru-ru,VS.90).gifПримечание о безопасности.

If using under partial trust, this property requires SecurityPermissionFlag.AllFlags permission, in addition to the permissions required by PenInputPanel. See Security and Trust for more information.

Примеры

This C# example creates a PenInputPanel object, thePenInputPanel, and attaches it to an InkEdit control, theInkEdit. It then attaches a VisibleChanged event handler, VisibleChanged_Event. The event handler adds a sentence to the content of theInkEdit if the Visible property is set to true.

[C#]

//...

// Delcare the PenInputPanel object
PenInputPanel thePenInputPanel;

public Form1()
{
    // Required for Windows Form Designer support
    InitializeComponent();

    // Create and attach the new PenInputPanel to an InkEdit control.
    thePenInputPanel = new PenInputPanel(theInkEdit);

    // Add a VisibleChanged event handler
    thePenInputPanel.VisibleChanged +=
        new PenInputPanelVisibleChangedEventHandler(VisibleChanged_Event);
}

//...

public void VisibleChanged_Event(object sender,
                                 PenInputPanelVisibleChangedEventArgs e)
{
    // Make sure the object that generated
    // the event is a PenInputPanel object
    if (sender is PenInputPanel)
    {
        PenInputPanel theSenderPanel = (PenInputPanel)sender;

        // When the panel has become visible...
        if (theSenderPanel.Visible)
        {
            // Display a message in the attached edit control
            theSenderPanel.AttachedEditControl.Text += "The panel is visible." + Environment.NewLine;
        }
    }
}

This Microsoft® Visual Basic® .NET example creates a PenInputPanel object, thePenInputPanel, and attaches it to an InkEdit control, theInkEdit. It then attaches a VisibleChanged event handler, VisibleChanged_Event. The event handler adds a sentence to the content of theInkEdit if the Visible property is set to true.

[Visual Basic]

'...

' Declare the PenInputPanel object
Dim thePenInputPanel As PenInputPanel

Public Sub New()
    MyBase.New()

    ' Required for Windows Form Designer support
    InitializeComponent()

    ' Create and attach the new PenInputPanel to an InkEdit control.
    thePenInputPanel = New PenInputPanel(theInkEdit)

    ' Add a VisibleChanged event handler
    AddHandler thePenInputPanel.VisibleChanged, _
               AddressOf VisibleChanged_Event
End Sub 'New

'...

Public Sub VisibleChanged_Event(sender As Object, e As _
                                PenInputPanelVisibleChangedEventArgs)
    ' Make sure the object that generated
    ' the event is a PenInputPanel object
    If TypeOf sender Is PenInputPanel Then
       Dim theSenderPanel As PenInputPanel = CType(sender, PenInputPanel)

       ' When the panel has become visible...
       If theSenderPanel.Visible Then
          ' Display a message in the attached edit control
          theSenderPanel.AttachedEditControl.Text &= _
                   "The panel is visible." & Environment.NewLine
       End If
    End If
End Sub 'VisibleChanged_Event

Платформы

Windows Vista

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

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

.NET Framework

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

См. также

Ссылки

PenInputPanel Класс

PenInputPanel - члены

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

PenInputPanel.AutoShow