PenInputPanel.VisibleChanged - событие
Обновлен: Ноябрь 2007
Deprecated. Occurs when the PenInputPanel object has shown or hidden itself. PenInputPanel has been replaced by Microsoft.Ink.TextInput.
Пространство имен: Microsoft.Ink
Сборка: Microsoft.Ink (в Microsoft.Ink.dll)
Синтаксис
'Декларация
Public Event VisibleChanged As PenInputPanelVisibleChangedEventHandler
'Применение
Dim instance As PenInputPanel
Dim handler As PenInputPanelVisibleChangedEventHandler
AddHandler instance.VisibleChanged, handler
public event PenInputPanelVisibleChangedEventHandler VisibleChanged
public:
event PenInputPanelVisibleChangedEventHandler^ VisibleChanged {
void add (PenInputPanelVisibleChangedEventHandler^ value);
void remove (PenInputPanelVisibleChangedEventHandler^ value);
}
/** @event */
public void add_VisibleChanged (PenInputPanelVisibleChangedEventHandler value)
/** @event */
public void remove_VisibleChanged (PenInputPanelVisibleChangedEventHandler value)
JScript не поддерживает события.
Заметки
The event handler receives an argument of type PenInputPanelVisibleChangedEventArgs, containing data about this event.
The VisibleChanged event is raised when:
The hover target for the PenInputPanel object appears in the user interface (UI).
The UI for the full PenInputPanel object disappears.
However, this event is not raised when the hover target expands to show the UI for the full PenInputPanel object.
![]() |
---|
If using under partial trust, this event requires SecurityPermissionFlag.AllFlags permission, in addition to the permissions required by PenInputPanel. See Security and Trust for more information. |
Примеры
This Microsoft® Visual C#® example creates a PenInputPanel object, thePenInputPanel, and attaches it to an InkEdit control, theInkEdit. It adds a VisibleChanged event handler, VisibleChanged_Event, to the form for the PenInputPanel. In the event handler, if the pen input panel is visible, its position is changed to screen coordinates 100, 100 by calling the MoveTo method.
[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 PenInputPanelVisibleChanged 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;
// If the panel has become visible...
if (e.NewVisibility)
{
// Move the pen input panel to
// screen position 100, 100
theSenderPanel.MoveTo(100, 100);
}
}
}
This Microsoft Visual Basic® .NET example creates a PenInputPanel object, thePenInputPanel, and attaches it to an InkEdit control, theInkEdit. It adds a VisibleChanged event handler, VisibleChanged_Event, to the form for the PenInputPanel. In the event handler, if the pen input panel is visible, its position is changed to screen coordinates 100, 100 by calling the MoveTo method.
[Visual Basic]
'...
' Declare the PenInputPanel object
Dim thePenInputPanel As PenInputPanel
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
' Create and attach the new PenInputPanel to an InkEdit control.
thePenInputPanel = New PenInputPanel(theInkEdit)
' Add a PenInputPanelVisibleChanged 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)
' If the panel has become visible...
If e.NewVisibility Then
' Move the pen input panel to
' screen position 100, 100
theSenderPanel.MoveTo(100, 100)
End If
End If
End Sub 'VisibleChanged_Event
Платформы
Windows Vista
Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.
Сведения о версии
.NET Framework
Поддерживается в версии: 3.0