DesignerGlyph.GetBounds(ActivityDesigner, Boolean) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 ActivityDesigner의 문자 모양의 경계를 반환합니다.
public:
virtual System::Drawing::Rectangle GetBounds(System::Workflow::ComponentModel::Design::ActivityDesigner ^ designer, bool activated);
public virtual System.Drawing.Rectangle GetBounds(System.Workflow.ComponentModel.Design.ActivityDesigner designer, bool activated);
abstract member GetBounds : System.Workflow.ComponentModel.Design.ActivityDesigner * bool -> System.Drawing.Rectangle
override this.GetBounds : System.Workflow.ComponentModel.Design.ActivityDesigner * bool -> System.Drawing.Rectangle
Public Overridable Function GetBounds (designer As ActivityDesigner, activated As Boolean) As Rectangle
매개 변수
- designer
- ActivityDesigner
문자 모양이 연결된ActivityDesigner입니다.
- activated
- Boolean
문자 모양이 활동 디자이너 화면에 표시되면 true이고, 그렇지 않으면 false입니다.
반환
문자 모양의 경계를 나타내는 Rectangle입니다.
예외
designer에 null 참조(Visual Basic의 경우 Nothing)가 포함된 경우
예제
다음 코드 예제에서는 GetBounds 메서드를 재정의하는 방법을 보여 줍니다. 코드는 사용자 지정 문자 모양 개체의 크기 및 위치를 설정합니다.
이 코드 예제는 DesignerGlyphProvider.cs 파일에 있는 Workflow Monitor SDK 샘플의 일부입니다. 자세한 내용은 워크플로 모니터합니다.
public override Rectangle GetBounds(ActivityDesigner designer, bool activated)
{
Rectangle imageBounds = Rectangle.Empty;
Image image = Resources.Executing;
if (image != null)
{
Size glyphSize = WorkflowTheme.CurrentTheme.AmbientTheme.GlyphSize;
imageBounds.Location = new Point(designer.Bounds.Right - glyphSize.Width / 2, designer.Bounds.Top - glyphSize.Height / 2);
imageBounds.Size = glyphSize;
}
return imageBounds;
}
Public Overrides Function GetBounds(ByVal designer As System.Workflow.ComponentModel.Design.ActivityDesigner, ByVal activated As Boolean) As System.Drawing.Rectangle
Dim imageBounds As Rectangle = Rectangle.Empty
Dim image As Image = AppResources.Executing
If Not image Is Nothing Then
Dim glyphSize As Size = WorkflowTheme.CurrentTheme.AmbientTheme.GlyphSize
imageBounds.Location = New Point(designer.Bounds.Right - glyphSize.Width / 2, designer.Bounds.Top - glyphSize.Height / 2)
imageBounds.Size = glyphSize
End If
Return imageBounds
End Function
설명
파생 클래스에서 재정의되지 않는 경우 GetBounds는 문자 모양이 연결된 활동 디자이너의 경계를 반환합니다.