共用方式為


Popup.Opened 事件

定義

IsOpen 屬性變更為 true 時發生。

public:
 event EventHandler ^ Opened;
public event EventHandler Opened;
member this.Opened : EventHandler 
Public Custom Event Opened As EventHandler 

事件類型

範例

下列範例示範如何定義 事件的事件處理常式 Opened

private void PopupOpening(object sender, EventArgs e)
{
    //Code to execute when Popup opens
}
Private Sub PopupOpening(ByVal sender As Object, ByVal e As EventArgs)
    'Code to execute when Popup opens
End Sub
<DockPanel>
  <Popup Opened="PopupOpening">
    <TextBlock Background="Yellow">Popup Text</TextBlock>
  </Popup>
</DockPanel>

備註

開啟 Popup 並關閉 ,方法是切換 IsOpen 屬性。

適用於

另請參閱