Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Design / Glyphs / ReadOnlyActivityGlyph.cs / 1305376 / ReadOnlyActivityGlyph.cs
namespace System.Workflow.ComponentModel.Design { using System; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms; #region Glyphs #region Class ReadOnlyActivityGlyph //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 ReadOnlyActivityGlyph : DesignerGlyph { 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.ReadOnlyGlyphPriority; } } protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer) { Rectangle bounds = GetBounds(designer, activated); bounds.Inflate(WorkflowTheme.CurrentTheme.AmbientTheme.Margin); ActivityDesignerPaint.DrawImage(graphics, AmbientTheme.ReadOnlyImage, bounds, DesignerContentAlignment.TopLeft); } } #endregion #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.Workflow.ComponentModel.Design { using System; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms; #region Glyphs #region Class ReadOnlyActivityGlyph //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 ReadOnlyActivityGlyph : DesignerGlyph { 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.ReadOnlyGlyphPriority; } } protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer) { Rectangle bounds = GetBounds(designer, activated); bounds.Inflate(WorkflowTheme.CurrentTheme.AmbientTheme.Margin); ActivityDesignerPaint.DrawImage(graphics, AmbientTheme.ReadOnlyImage, bounds, DesignerContentAlignment.TopLeft); } } #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
- LZCodec.cs
- TouchesCapturedWithinProperty.cs
- SettingsPropertyWrongTypeException.cs
- SizeF.cs
- TableRowGroup.cs
- log.cs
- DNS.cs
- XPathNavigatorReader.cs
- ObjectStateFormatter.cs
- ObjectViewFactory.cs
- RegistryPermission.cs
- ProfileManager.cs
- TemplateBuilder.cs
- PointLight.cs
- StaticDataManager.cs
- QilInvoke.cs
- XNodeValidator.cs
- DataBinding.cs
- HttpListenerRequestTraceRecord.cs
- DesignColumn.cs
- WebPartCancelEventArgs.cs
- ConsumerConnectionPoint.cs
- ImageSourceTypeConverter.cs
- SimpleWebHandlerParser.cs
- CqlLexer.cs
- EnumMember.cs
- SessionStateItemCollection.cs
- ContextStaticAttribute.cs
- InputChannelAcceptor.cs
- Tile.cs
- TypeSystem.cs
- DataBindingCollection.cs
- Region.cs
- ReceiveContext.cs
- UnsafeNetInfoNativeMethods.cs
- ListDataBindEventArgs.cs
- XslUrlEditor.cs
- _HelperAsyncResults.cs
- WebServiceTypeData.cs
- PassportAuthenticationEventArgs.cs
- ArithmeticException.cs
- WebPartCollection.cs
- XmlSubtreeReader.cs
- ProcessInfo.cs
- ComplexType.cs
- NetMsmqBinding.cs
- CngProperty.cs
- RemoteCryptoTokenProvider.cs
- sqlcontext.cs
- SystemIPv6InterfaceProperties.cs
- XmlIncludeAttribute.cs
- LiteralDesigner.cs
- ElementInit.cs
- nulltextnavigator.cs
- WindowsSidIdentity.cs
- WrappedIUnknown.cs
- XmlProcessingInstruction.cs
- LinqDataSourceInsertEventArgs.cs
- FrameworkElement.cs
- VerticalConnector.xaml.cs
- ReaderWriterLockWrapper.cs
- SignatureTargetIdManager.cs
- ColumnWidthChangedEvent.cs
- TypefaceCollection.cs
- BlurEffect.cs
- ImmutableObjectAttribute.cs
- TableLayoutPanelCellPosition.cs
- Triangle.cs
- ImageCodecInfo.cs
- ReliabilityContractAttribute.cs
- PointAnimationClockResource.cs
- MimeTypeMapper.cs
- BoundsDrawingContextWalker.cs
- ConnectionsZone.cs
- PointAnimationUsingPath.cs
- XmlSiteMapProvider.cs
- GeneralTransform3D.cs
- ResourceManagerWrapper.cs
- SiteMapNodeItem.cs
- TextEmbeddedObject.cs
- TextEditorDragDrop.cs
- DoubleLink.cs
- NamespaceQuery.cs
- QueuePropertyVariants.cs
- GridViewColumnCollection.cs
- DirectoryInfo.cs
- DataGridViewColumnTypeEditor.cs
- Schema.cs
- GeometryHitTestResult.cs
- CompilerError.cs
- ToolStripOverflow.cs
- CodeDirectionExpression.cs
- MediaElementAutomationPeer.cs
- FastEncoder.cs
- BindingNavigator.cs
- ToolStripItemClickedEventArgs.cs
- ItemContainerPattern.cs
- CompositeDataBoundControl.cs
- RoleGroup.cs
- GifBitmapDecoder.cs