// Menus private void ConstructMenus() { this.MenuListView.ItemClick += (s, e) => { if (e.ClickedItem is Retouch_Photo2.Menus.Icon value) { MenuType type = value.Type; FrameworkElement placementTarget = value; MenuExpander.ShowAt(type, placementTarget); } }; }
private void LayersRightTapped() { MenuExpander.ShowAt(MenuType.Layer, this.LayersScrollViewer); }
private void LayerRightTapped(ILayer layer) { MenuExpander.ShowAt(MenuType.Layer, layer.Control); }
// Strings private void ConstructStrings() { ResourceLoader resource = ResourceLoader.GetForCurrentView(); this.DocumentTextBlock.Text = resource.GetString("$DrawPage_Document"); this.DocumentUnSaveControl.Content = resource.GetString("$DrawPage_DocumentUnSave"); { this.ExportToolTip.Content = this.OverflowExportControl.Content = resource.GetString("$DrawPage_Export"); this.UndoToolTip.Content = this.OverflowUndoControl.Content = resource.GetString("$DrawPage_Undo"); //this.RedoToolTip.Content = this.OverflowRedoControl.Content = resource.GetString("$DrawPage_Redo"); this.SetupToolTip.Content = this.OverflowSetupControl.Content = resource.GetString("$DrawPage_Setup"); this.SnapToolTip.Content = this.OverflowSnapControl.Content = resource.GetString("$DrawPage_Snap"); //this.RulerToolTip.Content = this.OverflowRulerControl.Content = resource.GetString("$DrawPage_Ruler"); this.FullScreenToolTip.Content = this.OverflowFullScreenControl.Content = resource.GetString("$DrawPage_FullScreen"); this.OverflowTipControl.Content = resource.GetString("$DrawPage_Tip"); this.UnFullScreenToolTip.Content = resource.GetString("$DrawPage_UnFullScreen"); this.WireframeButton.Content = resource.GetString("$DrawPage_Wireframe"); } this.OverflowToolTip.Content = resource.GetString("$DrawPage_More"); this.SetupDialog.Title = resource.GetString("$DrawPage_SetupDialog_Title"); { this.SetupDialog.SecondaryButtonText = resource.GetString("$DrawPage_SetupDialog_Close"); this.SetupDialog.PrimaryButtonText = resource.GetString("$DrawPage_SetupDialog_Primary"); this.SetupSizePicker.WidthText = resource.GetString("$DrawPage_SetupDialog_SizePicker_Width"); this.SetupSizePicker.HeightText = resource.GetString("$DrawPage_SetupDialog_SizePicker_Height"); this.SetupAnchorCheckControl.Content = resource.GetString("$DrawPage_SetupDialog_Anchor"); } this.ExportDialog.Title = resource.GetString("$DrawPage_ExportDialog_Title"); { this.ExportDialog.SecondaryButtonText = resource.GetString("$DrawPage_ExportDialog_Close"); this.ExportDialog.PrimaryButtonText = resource.GetString("$DrawPage_ExportDialog_Primary"); this.ExportSizePicker.WidthText = resource.GetString("$DrawPage_ExportDialog_SizePicker_Width"); this.ExportSizePicker.HeightText = resource.GetString("$DrawPage_ExportDialog_SizePicker_Height"); this.ExportQualityTextBlock.Text = resource.GetString("$DrawPage_ExportDialog_Quality"); this.ExportFileFormatTextBlock.Text = resource.GetString("$DrawPage_ExportDialog_FileFormat"); } this.RenameDialog.Title = resource.GetString("$DrawPage_RenameDialog_Title"); { this.RenameDialog.SecondaryButtonText = resource.GetString("$DrawPage_RenameDialog_Close"); this.RenameDialog.PrimaryButtonText = resource.GetString("$DrawPage_RenameDialog_Primary"); this.RenameTextBox.PlaceholderText = resource.GetString("$DrawPage_RenameDialog_PlaceholderText"); } this.GalleryDialog.Title = resource.GetString("$DrawPage_Gallery"); { this.GalleryDialog.PrimaryButtonContent = resource.GetString("$DrawPage_GalleryDialog_Primary"); } this.DrawLayout.GalleryToolTipContent = resource.GetString("$DrawPage_Gallery"); this.DrawLayout.WidthToolTipContent = resource.GetString("$DrawPage_WidthTip"); { this.TransformGroupHeader.Content = resource.GetString("More_Transform"); this.RatioControl.Content = resource.GetString("More_Transform_Ratio"); this.SnapToTickControl.Content = resource.GetString("More_Transform_SnapToTick"); this.CreateGroupHeader.Content = resource.GetString("More_Create"); this.SquareControl.Content = resource.GetString("More_Create_Square"); this.CenterControl.Content = resource.GetString("More_Create_Center"); this.OperateGroupHeader.Content = resource.GetString("More_Operate"); this.WheelToRotateControl.Content = resource.GetString("More_Operate_WheelToRotate"); } // Menus foreach (KeyValuePair <MenuType, MenuExpander> item in MenuExpander.Dictionary) { MenuType type = item.Key; MenuExpander expander = item.Value; expander.Title = resource.GetString($"Menus_{type}"); } }