Created
October 20, 2012 18:07
-
-
Save kw0006667/3924230 to your computer and use it in GitHub Desktop.
將點擊選單後,會將選單關閉的事件寫入
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void pageTitle_Click_1(object sender, RoutedEventArgs e) | |
{ | |
// 若是第一次按,則將物件新增到 Popup 物件裡。 | |
if (!this.isAddedToPopup) | |
{ | |
this.headerMenuPopup = ShowPopup(this.pageTitle, this.headerMenuCtl); | |
this.headerMenuCtl.Tapped += headerMenuCtl_Tapped; | |
this.isAddedToPopup = true; | |
} | |
// 顯示 Popup | |
this.headerMenuPopup.IsOpen = true; | |
} | |
void headerMenuCtl_Tapped(object sender, TappedRoutedEventArgs e) | |
{ | |
this.headerMenuPopup.IsOpen = false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment