Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Design / Glyphs / CommentGlyph.cs / 1305376 / CommentGlyph.cs
namespace System.Workflow.ComponentModel.Design { using System; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms; #region Glyphs #region Class CommentGlyph //Class is internal but not sealed as we dont expect the ActivityDesigner writers to supply their own //Glyph instead based on comment property comment glyph is shown //Exception: StripItemCommentGlyph public class CommentGlyph : DesignerGlyph { private static CommentGlyph defaultCommentGlyph = null; internal static CommentGlyph Default { get { if (CommentGlyph.defaultCommentGlyph == null) CommentGlyph.defaultCommentGlyph = new CommentGlyph(); return CommentGlyph.defaultCommentGlyph; } } public override Rectangle GetBounds(ActivityDesigner designer, bool activated) { if (designer == null) throw new ArgumentNullException("designer"); Rectangle bounds = designer.Bounds; bounds.Inflate(WorkflowTheme.CurrentTheme.AmbientTheme.Margin); return bounds; } public override int Priority { get { return DesignerGlyph.CommentPriority; } } protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer) { Rectangle bounds = GetBounds(designer, activated); graphics.FillRectangle(AmbientTheme.FadeBrush, bounds); graphics.FillRectangle(ambientTheme.CommentIndicatorBrush, bounds); graphics.DrawRectangle(ambientTheme.CommentIndicatorPen, bounds); } } #endregion #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BlobPersonalizationState.cs
- NetworkAddressChange.cs
- MatrixTransform.cs
- DBSchemaTable.cs
- WindowsToolbarAsMenu.cs
- Visual3DCollection.cs
- ReadOnlyCollectionBase.cs
- EnumUnknown.cs
- While.cs
- RequestCachingSection.cs
- FontEmbeddingManager.cs
- MenuItemStyleCollectionEditor.cs
- DateTimeParse.cs
- UpDownBase.cs
- ElementFactory.cs
- UnSafeCharBuffer.cs
- Block.cs
- FontStretches.cs
- WebSysDefaultValueAttribute.cs
- GridViewActionList.cs
- AmbientValueAttribute.cs
- SqlInfoMessageEvent.cs
- Transaction.cs
- Propagator.JoinPropagator.cs
- RepeatButtonAutomationPeer.cs
- InkSerializer.cs
- MarkupExtensionParser.cs
- RenderOptions.cs
- CalendarTable.cs
- CompensationTokenData.cs
- RMPublishingDialog.cs
- DateTimeOffset.cs
- GACIdentityPermission.cs
- AttachmentService.cs
- TableLayoutPanelResizeGlyph.cs
- BrowserDefinition.cs
- SweepDirectionValidation.cs
- Line.cs
- ModelPerspective.cs
- ResourceSet.cs
- WebRequestModulesSection.cs
- DataServiceRequest.cs
- ApplicationSecurityInfo.cs
- WindowVisualStateTracker.cs
- Int32RectValueSerializer.cs
- AssemblySettingAttributes.cs
- ListDictionaryInternal.cs
- CodeTypeMemberCollection.cs
- BinaryObjectWriter.cs
- DataRecord.cs
- ProcessHostServerConfig.cs
- RetriableClipboard.cs
- WsdlParser.cs
- ConfigsHelper.cs
- WindowPattern.cs
- MenuItemBinding.cs
- UnsafeNativeMethodsCLR.cs
- IApplicationTrustManager.cs
- VariableExpressionConverter.cs
- BmpBitmapEncoder.cs
- WebControlParameterProxy.cs
- PermissionSetTriple.cs
- AnimationTimeline.cs
- MetadataExchangeBindings.cs
- CustomPopupPlacement.cs
- Oid.cs
- DragEventArgs.cs
- PcmConverter.cs
- TableLayoutStyle.cs
- StrokeCollectionConverter.cs
- Empty.cs
- InfoCardXmlSerializer.cs
- DnsPermission.cs
- ImageClickEventArgs.cs
- ArrayConverter.cs
- Logging.cs
- WindowsStatic.cs
- AttributeCollection.cs
- DataContractSet.cs
- XPathAncestorIterator.cs
- MenuRendererClassic.cs
- EnvelopedPkcs7.cs
- BitmapMetadataEnumerator.cs
- QuaternionAnimation.cs
- ReferentialConstraint.cs
- ContentFileHelper.cs
- MethodBuilder.cs
- MessageSecurityOverHttp.cs
- UpdatePanelTrigger.cs
- FixedPageAutomationPeer.cs
- Predicate.cs
- ClientConfigPaths.cs
- MailWebEventProvider.cs
- DocComment.cs
- GradientBrush.cs
- PartitionResolver.cs
- ScrollChrome.cs
- TrustSection.cs
- Point3DConverter.cs
- PersistChildrenAttribute.cs