void AssociatedObject_ColorPicked(object sender, ColorChosenEventArgs e) { ControlTreeHelper helper = new ControlTreeHelper(); Popup popup = helper.FindParentControl <Popup>(AssociatedObject); if (popup == null) { return; } DropDownButton dropDownButton = popup.Tag as DropDownButton; if (dropDownButton == null) { return; } MapTipsConfig mapTipsConfig = helper.FindAncestorOfType <MapTipsConfig>(dropDownButton); if (mapTipsConfig != null) { mapTipsConfig.MapTipBorder = new SolidColorBrush(e.Color); } dropDownButton.ClosePopup(); }
void popupButton_Click(object sender, RoutedEventArgs e) { if (mapTipsConfig == null) { mapTipsConfig = new MapTipsConfig() { Width = 350, MaxHeight = 400, Layer = Layer, Style = ResourceUtility.LoadEmbeddedStyle("Themes/MapTipsConfig.Theme.xaml", "MapTipsConfigStyle"), Margin = new Thickness(10) }; } MapApplication.Current.ShowWindow(Resources.Strings.ConfigurePopups, mapTipsConfig, true, null, null, WindowType.DesignTimeFloating); }
private void popupButton_Click(object sender, RoutedEventArgs e) { if (mapTipsConfig == null) { ArcGISDynamicMapServiceLayer dummyLayer = new ArcGISDynamicMapServiceLayer(); ESRI.ArcGIS.Mapping.Core.LayerExtensions.SetLayerInfos(dummyLayer, LayerInfos); mapTipsConfig = new MapTipsConfig() { VerticalAlignment = VerticalAlignment.Stretch, Layer = dummyLayer, Style = ResourceUtility.LoadEmbeddedStyle("Themes/MapTipsConfig.Theme.xaml", "MapTipsConfigStyle"), Margin = new Thickness(10) }; } MapApplication.Current.ShowWindow(Resources.Strings.ConfigurePopups, mapTipsConfig, true, null, null, WindowType.DesignTimeFloating); }