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
- TriggerCollection.cs
- ObjectDataSourceView.cs
- DiscoveryServerProtocol.cs
- XPathAncestorIterator.cs
- SqlTrackingWorkflowInstance.cs
- PackageDigitalSignature.cs
- InputLanguageManager.cs
- ServiceContractListItem.cs
- StrokeCollectionConverter.cs
- CroppedBitmap.cs
- XslAst.cs
- ContentType.cs
- ItemsControlAutomationPeer.cs
- EmptyElement.cs
- EntityFrameworkVersions.cs
- TreeViewItem.cs
- Monitor.cs
- TypeTypeConverter.cs
- Block.cs
- FormViewInsertEventArgs.cs
- ForeignConstraint.cs
- EncryptionUtility.cs
- CommonDialog.cs
- PageHandlerFactory.cs
- SignatureHelper.cs
- CardSpaceException.cs
- InboundActivityHelper.cs
- Binding.cs
- WebEvents.cs
- DataColumnSelectionConverter.cs
- NativeMethods.cs
- TimeZoneNotFoundException.cs
- StringCollectionEditor.cs
- EntityCollection.cs
- ElapsedEventArgs.cs
- PenThreadPool.cs
- SchemaElement.cs
- DataViewSetting.cs
- MetabaseServerConfig.cs
- ProjectionPlan.cs
- CommandEventArgs.cs
- SmiSettersStream.cs
- SplitterPanel.cs
- UserControlCodeDomTreeGenerator.cs
- SynchronizedInputAdaptor.cs
- ResourceDictionaryCollection.cs
- XmlSchemaObjectCollection.cs
- AutoGeneratedFieldProperties.cs
- DATA_BLOB.cs
- PriorityRange.cs
- fixedPageContentExtractor.cs
- HtmlElementEventArgs.cs
- DBAsyncResult.cs
- NetCodeGroup.cs
- _SingleItemRequestCache.cs
- FixedTextContainer.cs
- NonClientArea.cs
- X509Utils.cs
- DocumentReferenceCollection.cs
- AuthenticationSchemesHelper.cs
- EncodingTable.cs
- RectangleHotSpot.cs
- MimeMultiPart.cs
- ContextStaticAttribute.cs
- ConversionHelper.cs
- SourceChangedEventArgs.cs
- MostlySingletonList.cs
- XmlAttributeCollection.cs
- SendMessageRecord.cs
- WebPartConnectionCollection.cs
- ResXResourceReader.cs
- RemoteWebConfigurationHostStream.cs
- QilDataSource.cs
- ActivityInstanceMap.cs
- ElementNotEnabledException.cs
- HostedTransportConfigurationBase.cs
- ThreadAbortException.cs
- TypeNameConverter.cs
- RuleSettingsCollection.cs
- ControllableStoryboardAction.cs
- GACIdentityPermission.cs
- BinaryCommonClasses.cs
- CapabilitiesUse.cs
- AlphabeticalEnumConverter.cs
- ParsedAttributeCollection.cs
- NullableConverter.cs
- Viewport3DVisual.cs
- SearchForVirtualItemEventArgs.cs
- UserControl.cs
- ResXResourceSet.cs
- SystemBrushes.cs
- Transform3D.cs
- FactoryGenerator.cs
- IDQuery.cs
- StrokeNodeData.cs
- LocalizabilityAttribute.cs
- FrameworkElementFactoryMarkupObject.cs
- SubMenuStyleCollection.cs
- StickyNoteHelper.cs
- ScrollEvent.cs