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
- X509CertificateCollection.cs
- PolyLineSegment.cs
- DocComment.cs
- FileIOPermission.cs
- X509ScopedServiceCertificateElementCollection.cs
- RepeatBehaviorConverter.cs
- IntranetCredentialPolicy.cs
- TreeNodeCollection.cs
- NestedContainer.cs
- UnsafeNativeMethods.cs
- ObjectListCommandEventArgs.cs
- StylusPointPropertyId.cs
- AccessibilityApplicationManager.cs
- WFItemsToSpacerVisibility.cs
- FormsAuthenticationUserCollection.cs
- OleCmdHelper.cs
- NativeMethods.cs
- SchemaCollectionCompiler.cs
- AppDomainUnloadedException.cs
- DetailsViewDeletedEventArgs.cs
- SymmetricAlgorithm.cs
- InkCollectionBehavior.cs
- UnsafeNativeMethods.cs
- tooltip.cs
- AmbientLight.cs
- RegexCode.cs
- DoubleAnimationUsingPath.cs
- DocumentXmlWriter.cs
- JavaScriptSerializer.cs
- SoapAttributeAttribute.cs
- ListViewCancelEventArgs.cs
- PolicyManager.cs
- DetailsViewCommandEventArgs.cs
- EntityParameterCollection.cs
- InstanceOwner.cs
- GZipStream.cs
- DataGridViewRowHeaderCell.cs
- AutomationEvent.cs
- FloaterParaClient.cs
- DataListItem.cs
- FileDialog_Vista.cs
- DbConnectionClosed.cs
- AstNode.cs
- webeventbuffer.cs
- NameValueConfigurationElement.cs
- MergeFilterQuery.cs
- PeerApplicationLaunchInfo.cs
- MappingMetadataHelper.cs
- PageStatePersister.cs
- UnsafeNativeMethods.cs
- EffectiveValueEntry.cs
- ISAPIWorkerRequest.cs
- WebPartZone.cs
- FirstQueryOperator.cs
- SemaphoreFullException.cs
- ToolStripItem.cs
- UserPreferenceChangingEventArgs.cs
- RSAOAEPKeyExchangeDeformatter.cs
- ToolBarTray.cs
- MainMenu.cs
- DescriptionAttribute.cs
- ping.cs
- CompilerTypeWithParams.cs
- Rfc2898DeriveBytes.cs
- TrustManagerMoreInformation.cs
- ConfigPathUtility.cs
- IndentedWriter.cs
- SpellerError.cs
- PolygonHotSpot.cs
- MsmqIntegrationBindingElement.cs
- Variant.cs
- BufferAllocator.cs
- DataGridColumnHeader.cs
- MD5.cs
- GorillaCodec.cs
- CallTemplateAction.cs
- XmlSignificantWhitespace.cs
- CollectionViewProxy.cs
- activationcontext.cs
- UserInitiatedNavigationPermission.cs
- CommandBinding.cs
- XpsS0ValidatingLoader.cs
- ReversePositionQuery.cs
- COM2TypeInfoProcessor.cs
- AnnotationResource.cs
- DataBindingCollection.cs
- FlagsAttribute.cs
- RotateTransform3D.cs
- WindowsRichEdit.cs
- TextCollapsingProperties.cs
- TextDecoration.cs
- ProjectionCamera.cs
- SqlNotificationRequest.cs
- MissingSatelliteAssemblyException.cs
- XmlCountingReader.cs
- CacheEntry.cs
- SiteMembershipCondition.cs
- StringWriter.cs
- DataGridViewRowConverter.cs
- AnnotationResourceChangedEventArgs.cs