void ConfigureButton_Click(object sender, RoutedEventArgs e)
        {
            BaseMapsConfigControl configControl = new BaseMapsConfigControl()
            {
                Description        = "",
                BaseMaps           = BaseMaps,
                Width              = 450,
                ScrollViewerHeight = 295,
                Margin             = new Thickness(15, 10, 15, 20),
                OkButtonText       = ESRI.ArcGIS.Mapping.Controls.Resources.Strings.Close,
            };
            Binding b = new Binding("BingMapsAppId")
            {
                Source = ViewerApplicationControl.Instance.ViewerApplication
            };

            b.Mode = BindingMode.OneWay;
            BindingOperations.SetBinding(configControl, BaseMapsConfigControl.BingMapsAppIDProperty, b);
            configControl.OkButtonCommand = new DelegateCommand((args) =>
            {
                MapApplication.Current.HideWindow(configControl);
            });
            MapApplication.Current.ShowWindow(ESRI.ArcGIS.Mapping.Controls.Resources.Strings.ConfigureBasemaps,
                                              configControl, true, null, null, WindowType.DesignTimeFloating);
        }
示例#2
0
        /// <summary>
        /// BaseMapsProperty property changed handler.
        /// </summary>
        /// <param name="d">BaseMapsConfigControl that changed its BaseMaps.</param>
        /// <param name="e">Event arguments.</param>
        private static void OnBaseMapsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            BaseMapsConfigControl source = d as BaseMapsConfigControl;

            source.setItemsSourceAndSelectedItemForBaseMapsList();
        }
        void ConfigureButton_Click(object sender, RoutedEventArgs e)
        {
            BaseMapsConfigControl configControl = new BaseMapsConfigControl()
            { 
                Description = "",
                BaseMaps = BaseMaps,
                Width = 450,
                ScrollViewerHeight = 295,
                Margin = new Thickness(15, 10, 15, 20),
				OkButtonText = ESRI.ArcGIS.Mapping.Controls.Resources.Strings.Close,
            };
            Binding b = new Binding("BingMapsAppId") { Source = ViewerApplicationControl.Instance.ViewerApplication };
            b.Mode = BindingMode.OneWay;
            BindingOperations.SetBinding(configControl, BaseMapsConfigControl.BingMapsAppIDProperty, b);
			configControl.OkButtonCommand = new DelegateCommand((args) =>
            {
                MapApplication.Current.HideWindow(configControl);
            });
			MapApplication.Current.ShowWindow(ESRI.ArcGIS.Mapping.Controls.Resources.Strings.ConfigureBasemaps, 
                configControl, true, null, null, WindowType.DesignTimeFloating);
        }