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
- PathFigureCollectionValueSerializer.cs
- AnchoredBlock.cs
- ScrollBarAutomationPeer.cs
- ClientSettingsProvider.cs
- Parser.cs
- LocalClientSecuritySettings.cs
- HtmlEncodedRawTextWriter.cs
- MembershipSection.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- AutomationElement.cs
- sqlmetadatafactory.cs
- BitmapEffectRenderDataResource.cs
- BooleanStorage.cs
- TraceContextRecord.cs
- ReadonlyMessageFilter.cs
- TextFragmentEngine.cs
- QilReference.cs
- MetadataWorkspace.cs
- RestHandler.cs
- ApplicationHost.cs
- XamlSerializerUtil.cs
- MachineKey.cs
- DbConnectionPoolCounters.cs
- DataBoundControlActionList.cs
- CodeRegionDirective.cs
- AppDomainUnloadedException.cs
- NotSupportedException.cs
- _AutoWebProxyScriptHelper.cs
- WebPartDescription.cs
- SafeSecurityHelper.cs
- OleDbReferenceCollection.cs
- ToolStripHighContrastRenderer.cs
- Token.cs
- HtmlDocument.cs
- TableCellCollection.cs
- AuthenticationService.cs
- Cursors.cs
- XmlDocumentViewSchema.cs
- TabControlDesigner.cs
- ValidatorCompatibilityHelper.cs
- RawStylusInput.cs
- PropertyDescriptorCollection.cs
- OdbcError.cs
- SendingRequestEventArgs.cs
- WebFaultClientMessageInspector.cs
- UnsafeNativeMethods.cs
- EventDescriptor.cs
- ActivityInstanceReference.cs
- WindowsIdentity.cs
- PerfService.cs
- SettingsPropertyValueCollection.cs
- PathData.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- PrintControllerWithStatusDialog.cs
- PolicyLevel.cs
- QueryCoreOp.cs
- AttachedAnnotationChangedEventArgs.cs
- InfiniteTimeSpanConverter.cs
- Popup.cs
- ComboBox.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- ConnectionStringEditor.cs
- QueryStringParameter.cs
- PiiTraceSource.cs
- DateTimePicker.cs
- HtmlTextArea.cs
- OSFeature.cs
- CopyNamespacesAction.cs
- DesignerEventService.cs
- FastPropertyAccessor.cs
- MultiViewDesigner.cs
- PagesChangedEventArgs.cs
- UdpReplyToBehavior.cs
- NamedPipeProcessProtocolHandler.cs
- ExpressionEditorAttribute.cs
- BinHexEncoder.cs
- EntityModelSchemaGenerator.cs
- Permission.cs
- ImageUrlEditor.cs
- StringCollection.cs
- DocumentViewer.cs
- WebBrowserBase.cs
- PointKeyFrameCollection.cs
- ConfigurationValue.cs
- OleDbReferenceCollection.cs
- ThaiBuddhistCalendar.cs
- Constants.cs
- GrammarBuilderDictation.cs
- Animatable.cs
- HttpFileCollection.cs
- SqlUserDefinedAggregateAttribute.cs
- WrappedOptions.cs
- Interfaces.cs
- DocumentManager.cs
- OrderedParallelQuery.cs
- FileSystemEnumerable.cs
- FormsAuthenticationModule.cs
- InfoCardProofToken.cs
- XhtmlBasicImageAdapter.cs
- DataObjectCopyingEventArgs.cs