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
- DetailsViewInsertedEventArgs.cs
- LostFocusEventManager.cs
- CheckBox.cs
- GACMembershipCondition.cs
- Ray3DHitTestResult.cs
- EntityDataSourceView.cs
- QilGeneratorEnv.cs
- ScriptModule.cs
- TemplatedAdorner.cs
- WindowsListViewScroll.cs
- ApplicationActivator.cs
- DataAdapter.cs
- ToolTip.cs
- TextDecorationUnitValidation.cs
- BrowserCapabilitiesCompiler.cs
- ContextMenu.cs
- XmlHelper.cs
- ContractHandle.cs
- XmlDesigner.cs
- IntPtr.cs
- LocalBuilder.cs
- URI.cs
- StructureChangedEventArgs.cs
- NotSupportedException.cs
- ReadOnlyAttribute.cs
- InvalidDataException.cs
- ButtonBase.cs
- Camera.cs
- precedingsibling.cs
- WebEncodingValidatorAttribute.cs
- DecimalAnimationBase.cs
- ToolStripItemTextRenderEventArgs.cs
- HttpValueCollection.cs
- FacetDescriptionElement.cs
- StringPropertyBuilder.cs
- EditorZone.cs
- DeviceSpecific.cs
- SqlDataSourceCustomCommandEditor.cs
- SqlCacheDependencyDatabaseCollection.cs
- DataGridColumnHeadersPresenter.cs
- CodeLinePragma.cs
- UnconditionalPolicy.cs
- ValidatedMobileControlConverter.cs
- SqlDataRecord.cs
- PrimitiveDataContract.cs
- RenderCapability.cs
- ContainerTracking.cs
- SystemDropShadowChrome.cs
- DatatypeImplementation.cs
- TextReturnReader.cs
- CodeGotoStatement.cs
- WebBrowser.cs
- ToolboxItemCollection.cs
- LicFileLicenseProvider.cs
- XmlHelper.cs
- MimeObjectFactory.cs
- DirectoryInfo.cs
- StateInitialization.cs
- FixedSOMPage.cs
- DPTypeDescriptorContext.cs
- StickyNoteHelper.cs
- StylusPoint.cs
- CapabilitiesPattern.cs
- RightsManagementEncryptedStream.cs
- ProxyManager.cs
- Encoder.cs
- Wow64ConfigurationLoader.cs
- ElementHostPropertyMap.cs
- CachedPathData.cs
- MobileControlsSection.cs
- TableNameAttribute.cs
- TypeHelper.cs
- PartialTrustVisibleAssembly.cs
- DataGridViewControlCollection.cs
- HtmlObjectListAdapter.cs
- SuppressMessageAttribute.cs
- CleanUpVirtualizedItemEventArgs.cs
- XmlCDATASection.cs
- CheckedPointers.cs
- TemplateContainer.cs
- CapacityStreamGeometryContext.cs
- NameTable.cs
- LeaseManager.cs
- TemplateBindingExpressionConverter.cs
- AbstractExpressions.cs
- Semaphore.cs
- XmlQueryOutput.cs
- InstanceLockQueryResult.cs
- DataGridCommandEventArgs.cs
- SerializableReadOnlyDictionary.cs
- CalendarModeChangedEventArgs.cs
- BinaryUtilClasses.cs
- SplineKeyFrames.cs
- TextSearch.cs
- AssociationSetEnd.cs
- AccessDataSource.cs
- MoveSizeWinEventHandler.cs
- SessionSwitchEventArgs.cs
- ManualResetEvent.cs
- _SSPISessionCache.cs