Beispiel #1
0
        private QuickAccessMenuItem GetQuickAccessMenuItem(object header, ICommand command, string iconPath, string largeIconPath, object toolTip = null, RibbonControlSize size = RibbonControlSize.Large)
        {
            QuickAccessMenuItem quickAccessMenuItem = new QuickAccessMenuItem()
            {
                IsChecked = true,
                Target    = ControlExtensions.GetFluentButton(header, command, iconPath, largeIconPath, toolTip, size)
            };

            return(quickAccessMenuItem);
        }
Beispiel #2
0
        private RibbonGroupBox GetLayerRibbonGoupBox()
        {
            RibbonGroupBox ribbonGroupBox = new RibbonGroupBox()
            {
                Header = "图层"
            };

            ribbonGroupBox.Items.Add(ControlExtensions.GetFluentButton("添加", GetAddLayersCommand(), "pack://application:,,,/EM.GIS.Resources;Component/Images/Add16.png", "pack://application:,,,/EM.GIS.Resources;Component/Images/Add32.png", "添加图层"));
            ribbonGroupBox.Items.Add(ControlExtensions.GetFluentButton("移除", GetRemoveLayersCommand(), "pack://application:,,,/EM.GIS.Resources;Component/Images/Remove16.png", "pack://application:,,,/EM.GIS.Resources;Component/Images/Remove32.png", "移除图层"));
            return(ribbonGroupBox);
        }
Beispiel #3
0
        private BackstageTabItem GetSaveMapBackstageTabItem()
        {
            BackstageTabItem backstageTabItem = new BackstageTabItem()
            {
                Header  = "保存",
                Icon    = new BitmapImage(new Uri("pack://application:,,,/EM.GIS.Resources;Component/Images/Save32.png", UriKind.RelativeOrAbsolute)),
                Content = ControlExtensions.GetFluentButton("保存", GetSaveProjectCommand(), "pack://application:,,,/EM.GIS.Resources;Component/Images/Folder16.png", "pack://application:,,,/EM.GIS.Resources;Component/Images/Folder32.png", "保存工程")
            };

            return(backstageTabItem);
        }
Beispiel #4
0
        private RibbonGroupBox GetNavigateRibbonGoupBox()
        {
            RibbonGroupBox ribbonGroupBox = new RibbonGroupBox()
            {
                Header = "导航"
            };

            ribbonGroupBox.Items.Add(ControlExtensions.GetFluentButton("平移", GetActivePanToolCommand(), "pack://application:,,,/EM.GIS.Resources;Component/Images/Pan16.png", "pack://application:,,,/EM.GIS.Resources;Component/Images/Pan32.png", "平移工具"));
            ribbonGroupBox.Items.Add(ControlExtensions.GetFluentButton("全图", GetZoomToMaxExtentCommand(), "pack://application:,,,/EM.GIS.Resources;Component/Images/Global16.png", "pack://application:,,,/EM.GIS.Resources;Component/Images/Global32.png", "缩放至全图", RibbonControlSize.Middle));
            ribbonGroupBox.Items.Add(ControlExtensions.GetFluentButton("放大", GetActiveZoomInToolCommand(), "pack://application:,,,/EM.GIS.Resources;Component/Images/ZoomIn16.png", "pack://application:,,,/EM.GIS.Resources;Component/Images/ZoomIn32.png", "放大工具", RibbonControlSize.Middle));
            ribbonGroupBox.Items.Add(ControlExtensions.GetFluentButton("后退", GetZoomToPreviousViewCommand(), "pack://application:,,,/EM.GIS.Resources;Component/Images/Pre16.png", "pack://application:,,,/EM.GIS.Resources;Component/Images/Pre32.png", "后退至前一视图", RibbonControlSize.Middle));
            ribbonGroupBox.Items.Add(ControlExtensions.GetFluentButton("识别", GetActiveIdentifyToolCommand(), "pack://application:,,,/EM.GIS.Resources;Component/Images/Identify16.png", "pack://application:,,,/EM.GIS.Resources;Component/Images/Identify32.png", "识别工具", RibbonControlSize.Middle));
            ribbonGroupBox.Items.Add(ControlExtensions.GetFluentButton("缩小", GetActiveZoomOutToolCommand(), "pack://application:,,,/EM.GIS.Resources;Component/Images/ZoomOut16.png", "pack://application:,,,/EM.GIS.Resources;Component/Images/ZoomOut32.png", "缩小工具", RibbonControlSize.Middle));
            ribbonGroupBox.Items.Add(ControlExtensions.GetFluentButton("前进", GetZoomToNextViewCommand(), "pack://application:,,,/EM.GIS.Resources;Component/Images/Next16.png", "pack://application:,,,/EM.GIS.Resources;Component/Images/Next32.png", "前进至后一视图", RibbonControlSize.Middle));
            return(ribbonGroupBox);
        }