/// <summary> /// Occurs when this command is clicked /// </summary> public override void OnClick() { IActiveView pActiveView = (IActiveView)m_PageLayoutControl.PageLayout; IGraphicsContainer pGraphicsContainer = (IGraphicsContainer)pActiveView; IMap pMap = pActiveView.FocusMap; IMapFrame pMapFrame = (IMapFrame)pGraphicsContainer.FindFrame(pMap); IStyleSelector pStyleSelector = new BorderSelectorClass(); bool m_bOK; m_bOK = pStyleSelector.DoModal(m_PageLayoutControl.hWnd); if (!m_bOK) { return; } IBorder pBorder = (IBorder)pStyleSelector.GetStyle(0); pMapFrame.Border = pBorder; m_PageLayoutControl.Refresh(esriViewDrawPhase.esriViewBackground, null, null); }
/// <summary> /// Occurs when this command is clicked /// </summary> public override void OnClick() { // TODO: Add border.OnClick implementation IStyleSelector ipSSelector = new BorderSelectorClass(); if (ipSSelector.DoModal(0)) { IMap map = m_PageLayControl.ActiveView.FocusMap; IGraphicsContainer gContainer = m_PageLayControl.ActiveView.GraphicsContainer; IMapFrame mapFrame = (IMapFrame)gContainer.FindFrame(map); mapFrame.Border = (IBorder)ipSSelector.GetStyle(0); m_hookHelper.ActiveView.Refresh(); } }