本文整理汇总了C#中IElement.Activate方法的典型用法代码示例。如果您正苦于以下问题:C# IElement.Activate方法的具体用法?C# IElement.Activate怎么用?C# IElement.Activate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IElement
的用法示例。
在下文中一共展示了IElement.Activate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddGraphicToDisplay
private void AddGraphicToDisplay(IElement elem, IAGAnimationContainer animContainer)
{
IActiveView view = animContainer.CurrentView as IActiveView;
IGraphicsContainer graphicsContainer = view as IGraphicsContainer;
graphicsContainer.AddElement(elem, 0);
elem.Activate(view.ScreenDisplay);
}
示例2: OnMouseUp
protected override void OnMouseUp(MouseEventArgs Args)
{
//when mouse comes up, end the new envelope and pass it to feedbackEnv.
feedbackEnv = NewEnvelopeFeedback.Stop();
//initialize a new RectangleElementClass
feedbackElement = new RectangleElementClass();
//pass the new rectangle element, the geometry defined by our feedback object
feedbackElement.Geometry = feedbackEnv;
//make sure the element is activated in the current view
feedbackElement.Activate(feedbackScreenDisplay);
//now add the newly created element to the ActiveView with default symbology.
ArcMap.Document.ActiveView.GraphicsContainer.AddElement(feedbackElement, 0);
//and refresh the view so we can see the changes.
ArcMap.Document.ActiveView.Refresh();
}