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
- BitmapMetadata.cs
- ContainerUIElement3D.cs
- TextRange.cs
- ItemList.cs
- BridgeDataRecord.cs
- DataGridViewHitTestInfo.cs
- hebrewshape.cs
- UseLicense.cs
- GeneralTransform3DGroup.cs
- Pair.cs
- TextServicesPropertyRanges.cs
- TransactionOptions.cs
- _NetRes.cs
- DbProviderManifest.cs
- OutputCacheSettings.cs
- UserNamePasswordServiceCredential.cs
- PropertyCollection.cs
- SchemaImporterExtensionElement.cs
- ModifiableIteratorCollection.cs
- AvTraceFormat.cs
- Size.cs
- PointCollection.cs
- SID.cs
- StaticFileHandler.cs
- ListViewItemSelectionChangedEvent.cs
- MouseActionValueSerializer.cs
- PersistChildrenAttribute.cs
- VisualStyleElement.cs
- TextPattern.cs
- HtmlButton.cs
- WinFormsComponentEditor.cs
- BrowserCapabilitiesCompiler.cs
- ObjectConverter.cs
- IfJoinedCondition.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- Freezable.cs
- WebPartEditorApplyVerb.cs
- DbDataRecord.cs
- ObjectDataSourceEventArgs.cs
- _LazyAsyncResult.cs
- CompiledQueryCacheKey.cs
- CancellationHandlerDesigner.cs
- InfoCardProofToken.cs
- PageEventArgs.cs
- GeneralTransformGroup.cs
- xml.cs
- FilterUserControlBase.cs
- ServiceContractViewControl.Designer.cs
- LoginName.cs
- CreateRefExpr.cs
- DllNotFoundException.cs
- TrustManagerPromptUI.cs
- PersianCalendar.cs
- JavaScriptString.cs
- Attributes.cs
- WebPartTransformerAttribute.cs
- _Connection.cs
- Convert.cs
- DataGridViewCellParsingEventArgs.cs
- RightsManagementEncryptedStream.cs
- XmlEntityReference.cs
- Panel.cs
- HeaderUtility.cs
- HandlerElement.cs
- SqlRowUpdatingEvent.cs
- SchemaNamespaceManager.cs
- CheckableControlBaseAdapter.cs
- ValidatorCompatibilityHelper.cs
- SingleResultAttribute.cs
- HttpRuntime.cs
- MonthChangedEventArgs.cs
- DbXmlEnabledProviderManifest.cs
- XslVisitor.cs
- MatrixTransform3D.cs
- SqlTriggerAttribute.cs
- TableLayoutPanelBehavior.cs
- SchemaObjectWriter.cs
- QueryCacheEntry.cs
- WebPartDisplayModeCollection.cs
- AssociationEndMember.cs
- X509CertificateRecipientServiceCredential.cs
- DesignerActionItemCollection.cs
- FieldBuilder.cs
- ColorMap.cs
- XmlSerializationReader.cs
- PingOptions.cs
- GPPOINT.cs
- EdgeModeValidation.cs
- AnnotationDocumentPaginator.cs
- _UncName.cs
- SizeLimitedCache.cs
- XmlValidatingReaderImpl.cs
- ListItemsCollectionEditor.cs
- OracleException.cs
- DataSourceControlBuilder.cs
- ConfigXmlComment.cs
- PrimaryKeyTypeConverter.cs
- UIAgentInitializationException.cs
- CannotUnloadAppDomainException.cs
- Claim.cs