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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EmissiveMaterial.cs
- TextControl.cs
- PermissionAttributes.cs
- PropertyChangingEventArgs.cs
- Component.cs
- FilteredXmlReader.cs
- GeneralTransform3DTo2D.cs
- ZoneMembershipCondition.cs
- BatchParser.cs
- MonikerProxyAttribute.cs
- SevenBitStream.cs
- SqlWriter.cs
- FontStretches.cs
- InputReferenceExpression.cs
- DiagnosticsElement.cs
- AnimationLayer.cs
- VisualProxy.cs
- Marshal.cs
- HttpCapabilitiesBase.cs
- ActivityStateQuery.cs
- IDQuery.cs
- TemplateXamlTreeBuilder.cs
- OutputCacheSettings.cs
- processwaithandle.cs
- DataGridViewCellCancelEventArgs.cs
- WorkingDirectoryEditor.cs
- TypedTableGenerator.cs
- JsonEncodingStreamWrapper.cs
- DateTimeParse.cs
- ContentValidator.cs
- RoleManagerSection.cs
- CompatibleComparer.cs
- ADConnectionHelper.cs
- ClientTargetSection.cs
- WindowsFont.cs
- _SSPISessionCache.cs
- FactoryId.cs
- WSSecurityPolicy12.cs
- RectangleF.cs
- RedirectionProxy.cs
- MeasureItemEvent.cs
- AutomationPatternInfo.cs
- GifBitmapEncoder.cs
- sqlser.cs
- HandleCollector.cs
- ClientConfigPaths.cs
- ExpressionBuilderContext.cs
- RtfToXamlReader.cs
- DiscoveryDocumentReference.cs
- InputScopeConverter.cs
- FtpWebRequest.cs
- Synchronization.cs
- RIPEMD160Managed.cs
- TdsParserSessionPool.cs
- TaskFormBase.cs
- State.cs
- DrawingContextWalker.cs
- sitestring.cs
- ReflectionHelper.cs
- GestureRecognitionResult.cs
- DataBindingValueUIHandler.cs
- Rect3DValueSerializer.cs
- SelfIssuedAuthRSAPKCS1SignatureDeformatter.cs
- Boolean.cs
- ListSortDescription.cs
- Int64AnimationBase.cs
- DispatchOperationRuntime.cs
- MeasureItemEvent.cs
- ExitEventArgs.cs
- DefaultAuthorizationContext.cs
- ListViewTableRow.cs
- ProfileModule.cs
- SHA256Managed.cs
- IdnMapping.cs
- SmiContext.cs
- IgnoreFileBuildProvider.cs
- EFTableProvider.cs
- ItemContainerGenerator.cs
- CacheForPrimitiveTypes.cs
- BorderSidesEditor.cs
- CommandPlan.cs
- FixedSOMElement.cs
- JoinElimination.cs
- BulletDecorator.cs
- FontSizeConverter.cs
- ConfigXmlAttribute.cs
- ServicePointManagerElement.cs
- DurableRuntimeValidator.cs
- FlagsAttribute.cs
- assemblycache.cs
- SqlDataSourceView.cs
- MULTI_QI.cs
- SecurityHelper.cs
- TextServicesManager.cs
- BuildProvidersCompiler.cs
- PackageProperties.cs
- ClientRolePrincipal.cs
- FormClosedEvent.cs
- Inline.cs
- EntityDataSourceContainerNameItem.cs