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
- BitmapInitialize.cs
- InvalidStoreProtectionKeyException.cs
- HasCopySemanticsAttribute.cs
- CodeDirectionExpression.cs
- FeatureSupport.cs
- TargetException.cs
- ValidationPropertyAttribute.cs
- PersonalizationEntry.cs
- QueryOperationResponseOfT.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- QuadraticBezierSegment.cs
- Application.cs
- OutgoingWebResponseContext.cs
- UInt64.cs
- BezierSegment.cs
- InvokeProviderWrapper.cs
- DrawingBrush.cs
- CmsUtils.cs
- ObjectTag.cs
- BooleanProjectedSlot.cs
- Privilege.cs
- WasEndpointConfigContainer.cs
- TypeTypeConverter.cs
- ScalarType.cs
- EmissiveMaterial.cs
- DataColumn.cs
- SafeProcessHandle.cs
- CustomAttributeBuilder.cs
- SqlCacheDependency.cs
- ColumnResizeAdorner.cs
- ConfigurationFileMap.cs
- WebBrowserProgressChangedEventHandler.cs
- ChannelSinkStacks.cs
- ErrorStyle.cs
- QueuedDeliveryRequirementsMode.cs
- System.Data_BID.cs
- HostSecurityManager.cs
- NullRuntimeConfig.cs
- EntityDataSourceValidationException.cs
- WorkflowFormatterBehavior.cs
- ColorIndependentAnimationStorage.cs
- TriggerCollection.cs
- SafeNativeMethods.cs
- TemplateControlCodeDomTreeGenerator.cs
- SplashScreenNativeMethods.cs
- MimeMultiPart.cs
- MultilineStringConverter.cs
- WebPartEditorCancelVerb.cs
- ConfigsHelper.cs
- SafeNativeMethods.cs
- RemoteWebConfigurationHost.cs
- BasicViewGenerator.cs
- GenericTextProperties.cs
- SoundPlayer.cs
- CachedCompositeFamily.cs
- XsdValidatingReader.cs
- DnsEndPoint.cs
- IdnElement.cs
- ExpressionLexer.cs
- InputScope.cs
- SelfIssuedAuthProofToken.cs
- ValidationSummaryDesigner.cs
- TextFindEngine.cs
- RouteParametersHelper.cs
- UnknownBitmapDecoder.cs
- GrammarBuilderWildcard.cs
- CacheAxisQuery.cs
- MethodResolver.cs
- RuntimeConfigLKG.cs
- SafeFileMapViewHandle.cs
- Switch.cs
- AffineTransform3D.cs
- FilterEventArgs.cs
- Unit.cs
- PropertyOrder.cs
- DecoderFallback.cs
- Queue.cs
- SQLConvert.cs
- DoubleLinkListEnumerator.cs
- DragCompletedEventArgs.cs
- CodeNamespaceImport.cs
- DataRecord.cs
- SafeFileMappingHandle.cs
- DataGridHelper.cs
- DynamicQueryableWrapper.cs
- TextHintingModeValidation.cs
- ClrProviderManifest.cs
- updatecommandorderer.cs
- VersionPair.cs
- WindowsPen.cs
- ScrollEvent.cs
- EntityDataSourceDesignerHelper.cs
- streamingZipPartStream.cs
- WmpBitmapDecoder.cs
- WorkflowServiceBehavior.cs
- TextViewSelectionProcessor.cs
- X509ThumbprintKeyIdentifierClause.cs
- ObjectStateFormatter.cs
- EdmSchemaError.cs
- WsdlEndpointConversionContext.cs