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
- RegexRunner.cs
- Menu.cs
- HwndSourceKeyboardInputSite.cs
- WindowsGraphics2.cs
- AdapterUtil.cs
- SponsorHelper.cs
- DataColumnCollection.cs
- GridViewEditEventArgs.cs
- _NestedMultipleAsyncResult.cs
- StateWorkerRequest.cs
- ArraySet.cs
- ECDsaCng.cs
- FormsAuthenticationCredentials.cs
- IDQuery.cs
- Pkcs7Signer.cs
- SimpleApplicationHost.cs
- ProgramPublisher.cs
- XmlEntityReference.cs
- OleDbReferenceCollection.cs
- ViewgenGatekeeper.cs
- SqlLiftIndependentRowExpressions.cs
- RewritingProcessor.cs
- AsyncOperation.cs
- NameTable.cs
- CodeAttributeDeclarationCollection.cs
- CreateParams.cs
- TraceHandlerErrorFormatter.cs
- Crc32.cs
- WebPartDesigner.cs
- BrowserCapabilitiesCodeGenerator.cs
- TypeNameConverter.cs
- Matrix.cs
- MetadataCacheItem.cs
- ViewManager.cs
- TdsParser.cs
- ConsumerConnectionPoint.cs
- DocumentPageView.cs
- WhitespaceRuleReader.cs
- BookmarkList.cs
- Lease.cs
- LongAverageAggregationOperator.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- SingleQueryOperator.cs
- KeyboardEventArgs.cs
- XsltContext.cs
- TrackingSection.cs
- CategoriesDocumentFormatter.cs
- SizeAnimation.cs
- ClientTarget.cs
- ListenerElementsCollection.cs
- AnnotationStore.cs
- IndexedEnumerable.cs
- AttachmentCollection.cs
- ComplexObject.cs
- MouseButtonEventArgs.cs
- UriTemplateDispatchFormatter.cs
- TakeQueryOptionExpression.cs
- ToolCreatedEventArgs.cs
- RectangleF.cs
- HtmlAnchor.cs
- SqlWriter.cs
- TypeNameParser.cs
- ActivityExecutorSurrogate.cs
- UIElementHelper.cs
- PropertyNames.cs
- ProviderIncompatibleException.cs
- XPathSelectionIterator.cs
- GridLength.cs
- XmlSchemaException.cs
- MediaPlayerState.cs
- BidPrivateBase.cs
- StretchValidation.cs
- TextEditorTyping.cs
- TCPListener.cs
- InputChannelAcceptor.cs
- BindingSourceDesigner.cs
- FileChangesMonitor.cs
- Context.cs
- WebPartVerbCollection.cs
- XmlQualifiedNameTest.cs
- SemaphoreSecurity.cs
- Propagator.ExtentPlaceholderCreator.cs
- VideoDrawing.cs
- Msmq4SubqueuePoisonHandler.cs
- TextRunTypographyProperties.cs
- OlePropertyStructs.cs
- Int16AnimationUsingKeyFrames.cs
- ResourceManagerWrapper.cs
- MruCache.cs
- WindowsComboBox.cs
- TypeBuilder.cs
- ConsumerConnectionPointCollection.cs
- CheckBoxPopupAdapter.cs
- VBIdentifierTrimConverter.cs
- UriSection.cs
- SslStreamSecurityBindingElement.cs
- InvokeMethodActivityDesigner.cs
- EventLog.cs
- EditorBrowsableAttribute.cs
- UncommonField.cs