阅读:1350回复:0
请问指北针的样式怎么设置
<P>请问指北针的样式怎么设置啊?我在CharacterMarkerSymbol里没找到有指北针啊?</P>
<P>还有图例的问题:</P> <P>private void CreateLegend(IEnvelope pEnv,IColor FillColor,IColor FillOutLineColor)<br> {<br> UID pUID = new UIDClass();<br> IMapSurroundFrame pMapSurroundFrame;<br> IMapSurround pMapSurround;<br> IMapFrame pMapFrame;<br> IElement pElement;</P> <P> IFillSymbol pFillSymbol = new SimpleFillSymbolClass();<br> ILineSymbol pLineSymbol = new SimpleLineSymbolClass();<br> ISymbolBackground pSymbolBackground = new SymbolBackgroundClass();<br> ILegend pLegend = new Legend();<br> ILegendItem pLegendItem = new VerticalLegendItemClass();<br> ILegendFormat pLegendFormat = new LegendFormatClass();</P> <P> pUID.Value = "esriCore.Legend";<br> pMapFrame = (IMapFrame)axPageLayoutControl1.GraphicsContainer.FindFrame(axPageLayoutControl1.ActiveView.FocusMap);<br> pMapSurroundFrame = pMapFrame.CreateSurroundFrame(pUID, null);<br> pFillSymbol.Color = FillColor;<br> pLineSymbol.Color = FillOutLineColor;<br> pFillSymbol.Outline = pLineSymbol;<br> pSymbolBackground.FillSymbol = pFillSymbol;<br> pMapSurroundFrame.Background = pSymbolBackground;<br> pLegendFormat.ShowTitle = false;</P> <P><br> </P> <P> <FONT color=#f70968>pLegend.ClearItems();</FONT><br> pLegend.Refresh();<br> pLegendItem.Layer = axPageLayoutControl1.ActiveView.FocusMap.get_Layer(2);<br> pLegend.AddItem(pLegendItem);<br> pLegend.Format = pLegendFormat;<br> pMapSurroundFrame.MapSurround = (IMapSurround)pLegend;<br> pElement = (IElement)pMapSurroundFrame;<br> pElement.Geometry = (IGeometry)pEnv;<br> IElementProperties pElementProperties = (IElementProperties)pElement;<br> pElementProperties.Name = "Legend";<br> axPageLayoutControl1.GraphicsContainer.AddElement(pElement, 0);<br> <br> }</P> <P><FONT color=#f70968>pLegend.ClearItems();这句没起作用,图例还是按每一层自动生成了,我想自己添加每一项,好设置样式,怎么办啊?</FONT></P><img src="images/post/smile/dvbbs/em02.gif" /><img src="images/post/smile/dvbbs/em02.gif" /> |
|