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
- CSharpCodeProvider.cs
- DirectoryNotFoundException.cs
- WebPartVerb.cs
- SafeNativeMemoryHandle.cs
- EventData.cs
- ScopeElement.cs
- AsymmetricSignatureFormatter.cs
- Dynamic.cs
- BreakRecordTable.cs
- SchemaCompiler.cs
- XmlSerializerSection.cs
- SparseMemoryStream.cs
- Identity.cs
- TrustManager.cs
- BasicCellRelation.cs
- Rectangle.cs
- IResourceProvider.cs
- ModelVisual3D.cs
- FilterUserControlBase.cs
- EmptyEnumerator.cs
- TimelineCollection.cs
- AtomServiceDocumentSerializer.cs
- FacetChecker.cs
- WebPartPersonalization.cs
- control.ime.cs
- XmlSchemaAny.cs
- EntityModelSchemaGenerator.cs
- ConditionedDesigner.cs
- FixedSOMImage.cs
- XslTransformFileEditor.cs
- BinaryCommonClasses.cs
- DispatcherExceptionEventArgs.cs
- CompModSwitches.cs
- ToolboxItem.cs
- DataSvcMapFileSerializer.cs
- BypassElement.cs
- SqlLiftWhereClauses.cs
- XmlHelper.cs
- Selection.cs
- TypeExtensions.cs
- Journaling.cs
- TextElementEnumerator.cs
- BitVec.cs
- XMLSyntaxException.cs
- PeerContact.cs
- HttpAsyncResult.cs
- NativeObjectSecurity.cs
- DiscriminatorMap.cs
- ScriptRegistrationManager.cs
- webbrowsersite.cs
- ScrollChangedEventArgs.cs
- SwitchAttribute.cs
- HostingEnvironmentException.cs
- ActivityValidator.cs
- X509Utils.cs
- TranslateTransform3D.cs
- KeyedQueue.cs
- DirectionalLight.cs
- DesignOnlyAttribute.cs
- CopyNodeSetAction.cs
- ArgIterator.cs
- XamlWriter.cs
- XmlDocumentFragment.cs
- GraphicsPath.cs
- DrawingServices.cs
- _Events.cs
- XmlSchemaAttributeGroupRef.cs
- BaseUriHelper.cs
- WebExceptionStatus.cs
- VisualState.cs
- JoinCqlBlock.cs
- ResourceDescriptionAttribute.cs
- DataTableMappingCollection.cs
- ObjectHandle.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- XmlFormatExtensionAttribute.cs
- InstanceValue.cs
- XmlComplianceUtil.cs
- ListViewSortEventArgs.cs
- XmlNullResolver.cs
- OperationAbortedException.cs
- TreeViewAutomationPeer.cs
- AttributeProviderAttribute.cs
- LowerCaseStringConverter.cs
- SocketAddress.cs
- httpapplicationstate.cs
- CommandDevice.cs
- ProjectionCamera.cs
- TreeNodeStyle.cs
- EncoderReplacementFallback.cs
- RoleGroup.cs
- TextTreeInsertElementUndoUnit.cs
- SQLInt16.cs
- ComplexTypeEmitter.cs
- HttpConfigurationContext.cs
- DynamicRenderer.cs
- Underline.cs
- PtsHost.cs
- WebPartCancelEventArgs.cs
- ConfigurationSectionGroup.cs