Popup.Opened 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當 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 屬性。