private void axSymbologyControl1_OnItemSelected(object sender, ESRI.ArcGIS.Controls.ISymbologyControlEvents_OnItemSelectedEvent e) { //Get the selected item m_StyleGalleryItem = axSymbologyControl1.GetStyleClass(axSymbologyControl1.StyleClass).GetSelectedItem(); //Enable ok button button1.Enabled = true; }
private void SymbologyControl_OnItemSelected(object sender, ESRI.ArcGIS.Controls.ISymbologyControlEvents_OnItemSelectedEvent e) { ESRI.ArcGIS.Display.IStyleGalleryItem galleryItem = e.styleGalleryItem as ESRI.ArcGIS.Display.IStyleGalleryItem; if (galleryItem.Item is ESRI.ArcGIS.Display.IMarkerSymbol) { m_SymbolObject.InitClassSymbol(galleryItem.Item as ESRI.ArcGIS.Display.ISymbol); } else if (galleryItem.Item is ESRI.ArcGIS.Display.ILineSymbol) { m_SymbolObject.InitClassSymbol(galleryItem.Item as ESRI.ArcGIS.Display.ISymbol); } else if (galleryItem.Item is ESRI.ArcGIS.Display.IFillSymbol) { m_SymbolObject.InitClassSymbol(galleryItem.Item as ESRI.ArcGIS.Display.ISymbol); } labelPreview.Tag = galleryItem.Item; if (labelPreview.Image != null) { labelPreview.Image.Dispose(); labelPreview.Image = null; } labelPreview.Image = ModuleCommon.Symbol2Picture(galleryItem.Item as ESRI.ArcGIS.Display.ISymbol, ModuleCommon.ImageWidth, ModuleCommon.ImageHeight); for (int i = 0; i < m_SymbolObject.PropertyNames.Length; i++) { advGridSymbol.UpdatePropertyValue(m_SymbolObject.PropertyNames[i]); } }
private void axSymbologyControl1_OnItemSelected(object sender, ESRI.ArcGIS.Controls.ISymbologyControlEvents_OnItemSelectedEvent e) { _styleGalleryItem = e.styleGalleryItem as IStyleGalleryItem; }