void MenuButtonChecked(object sender, EventArgs e) { _navigationMenuDisk = new FiveButtonDiskControl.FiveButtonDiskControl(); _navigationMenuDisk.InitializeControlData ( "Images/print.png", "Images/textToPhone.png", "Images/close.png", "Images/bluetooth.png", "Print", "", "Close", "BlueTooth" ); var translatePoint = menuButton.TranslatePoint(new Point(0, 0), FrameworkManager.Canvas); var top = translatePoint.Y + menuButton.ActualHeight / 2; var left = translatePoint.X + menuButton.ActualWidth / 2; _navigationMenuDisk.InitializeControl(FrameworkManager, left, top); _navigationMenuDisk.Expand(); _navigationMenuDisk.Collapsed += NavigationMenuDiskCollapsed; _navigationMenuDisk.BottomRightButtonClick += NavigationMenuDiskCloseButtonClick; }
void NavigationMenuDiskCollapsed(object sender, EventArgs e) { _navigationMenuDisk.Collapsed -= NavigationMenuDiskCollapsed; _navigationMenuDisk.Close(); _navigationMenuDisk = null; menuButton.IsChecked = false; }