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
- PathGeometry.cs
- FloaterParaClient.cs
- TypedDataSourceCodeGenerator.cs
- WorkerRequest.cs
- KernelTypeValidation.cs
- RuntimeWrappedException.cs
- EditingCommands.cs
- FunctionNode.cs
- EarlyBoundInfo.cs
- FillErrorEventArgs.cs
- HGlobalSafeHandle.cs
- SystemColorTracker.cs
- ping.cs
- MembershipValidatePasswordEventArgs.cs
- ConditionChanges.cs
- UriParserTemplates.cs
- ClientUrlResolverWrapper.cs
- SkipStoryboardToFill.cs
- ColumnMap.cs
- DispatcherHooks.cs
- ImageMap.cs
- DrawListViewItemEventArgs.cs
- ProvidePropertyAttribute.cs
- FileLoadException.cs
- ListenerElementsCollection.cs
- RSAPKCS1SignatureDeformatter.cs
- DPTypeDescriptorContext.cs
- XmlFormatExtensionPointAttribute.cs
- Utils.cs
- InvalidDocumentContentsException.cs
- XmlQueryOutput.cs
- DataViewManagerListItemTypeDescriptor.cs
- StringExpressionSet.cs
- Compilation.cs
- BooleanStorage.cs
- LassoSelectionBehavior.cs
- WindowsToolbar.cs
- InstallerTypeAttribute.cs
- SvcMapFileLoader.cs
- PolyLineSegmentFigureLogic.cs
- AnchoredBlock.cs
- FilteredAttributeCollection.cs
- EntryWrittenEventArgs.cs
- ValueTypeFieldReference.cs
- Propagator.cs
- DependencyProperty.cs
- ToolStripItemRenderEventArgs.cs
- DbDeleteCommandTree.cs
- TransformPattern.cs
- WebPartEditorOkVerb.cs
- DynamicControlParameter.cs
- WebPartDisplayModeCollection.cs
- TdsEnums.cs
- ListItemConverter.cs
- GridViewHeaderRowPresenter.cs
- ToolStripPanelCell.cs
- WebRequestModuleElementCollection.cs
- errorpatternmatcher.cs
- RegexRunner.cs
- XsltInput.cs
- UserValidatedEventArgs.cs
- TraceUtils.cs
- FullTextBreakpoint.cs
- FixedPosition.cs
- GridViewColumn.cs
- UriSection.cs
- ConnectionsZone.cs
- JpegBitmapEncoder.cs
- ScrollEvent.cs
- XXXOnTypeBuilderInstantiation.cs
- ViewStateException.cs
- EntityDataSourceWrapperCollection.cs
- BufferedStream.cs
- PseudoWebRequest.cs
- TreeNodeCollectionEditor.cs
- Simplifier.cs
- EntitySqlException.cs
- TemplateBuilder.cs
- BrowserCapabilitiesCompiler.cs
- ProgressPage.cs
- InternalSafeNativeMethods.cs
- HtmlControlPersistable.cs
- FrameworkContentElementAutomationPeer.cs
- SystemIPInterfaceStatistics.cs
- SerializationSectionGroup.cs
- RecordBuilder.cs
- xsdvalidator.cs
- PieceDirectory.cs
- RegistryKey.cs
- DbConnectionStringBuilder.cs
- Bold.cs
- HeaderLabel.cs
- TdsParser.cs
- SmiMetaDataProperty.cs
- ListViewUpdatedEventArgs.cs
- GlyphCollection.cs
- LocalizationParserHooks.cs
- TranslateTransform.cs
- TransformGroup.cs
- DbConnectionPoolGroup.cs