IStyleSelector 和 ISymbolSelector 接口

1.IStyleSelector

Provides access to members that work with the style selector dialog.

 

2.ISymbolSelector

Provides access to members that control a dialog for Symbol Selection.

Description

The AddSymbol method also determines which symbol is shown in the initial Preview frame when the dialog box opens.

The GetSymbolAt method is used to retrieve the selected symbol using an index of zero.

The SelectSymbol method is used to display the dialog box; check the return value to determine if the user clicked OK (True) or Cancel (False).

                    ILegendClass pLc = new LegendClassClass();
                    ILegendGroup pLG = new LegendGroupClass();
                    if (other is ILegendGroup)
                    {
                        pLG = other as ILegendGroup;
                    }
                    pLc = pLG.get_Class((int)index);
                    ISymbol pSym = pLc.Symbol;
                    ISymbolSelector pss = new SymbolSelectorClass();
                    bool bOk = false;
                    pss.AddSymbol(pSym);
                    bOk = pss.SelectSymbol(0);
                    if (bOk)
                    {
                        pLc.Symbol = pss.GetSymbolAt(1);
                    }
                    axMapControl1.ActiveView.Refresh();
                    axTOCControl1.Refresh();
posted @ 2013-04-19 23:14  刘朝样  阅读(736)  评论(0)    收藏  举报