Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextEditorCharacters.cs
- XmlReader.cs
- UserMapPath.cs
- StorageRoot.cs
- ColumnResizeUndoUnit.cs
- InvalidPrinterException.cs
- AddInBase.cs
- _FixedSizeReader.cs
- GestureRecognizer.cs
- ImageDrawing.cs
- TextFormatter.cs
- WebPartManagerInternals.cs
- COM2Enum.cs
- Rules.cs
- _ListenerRequestStream.cs
- DelegatingTypeDescriptionProvider.cs
- PageHandlerFactory.cs
- SQLMoneyStorage.cs
- ComponentFactoryHelpers.cs
- DataTableMappingCollection.cs
- BitmapData.cs
- Library.cs
- StorageAssociationSetMapping.cs
- AcceptorSessionSymmetricMessageSecurityProtocol.cs
- ContainerControlDesigner.cs
- OperationInvokerBehavior.cs
- DragEventArgs.cs
- XsdCachingReader.cs
- Attributes.cs
- FaultDescription.cs
- PopupRootAutomationPeer.cs
- FileIOPermission.cs
- SafeLibraryHandle.cs
- FragmentQueryKB.cs
- documentation.cs
- RegistrationServices.cs
- HtmlTableCell.cs
- EdmSchemaError.cs
- AnnotationComponentManager.cs
- ResourceAssociationTypeEnd.cs
- TreeChangeInfo.cs
- BitmapFrameEncode.cs
- ValidatorCompatibilityHelper.cs
- SpecialTypeDataContract.cs
- DisplayToken.cs
- Validator.cs
- TypedCompletedAsyncResult.cs
- CommandCollectionEditor.cs
- UserPreferenceChangedEventArgs.cs
- HttpBindingExtension.cs
- XmlDataLoader.cs
- XmlCharCheckingWriter.cs
- Facet.cs
- Filter.cs
- Assign.cs
- WindowShowOrOpenTracker.cs
- XamlReader.cs
- DesignBindingPicker.cs
- Style.cs
- ByteRangeDownloader.cs
- GlyphCollection.cs
- AvTraceFormat.cs
- FontFaceLayoutInfo.cs
- SessionStateSection.cs
- BitmapEffectDrawing.cs
- DbDataReader.cs
- SqlVisitor.cs
- SQLMembershipProvider.cs
- RequestQueryProcessor.cs
- ClientTargetSection.cs
- CodeStatement.cs
- BitmapMetadataBlob.cs
- DefinitionProperties.cs
- ThreadStaticAttribute.cs
- OutputCacheSettings.cs
- ADConnectionHelper.cs
- Atom10FormatterFactory.cs
- PersonalizableAttribute.cs
- MessageDescriptionCollection.cs
- XsltOutput.cs
- basecomparevalidator.cs
- InheritanceUI.cs
- HotSpotCollection.cs
- DataGridViewRowPrePaintEventArgs.cs
- AsymmetricSignatureFormatter.cs
- LockRecoveryTask.cs
- Frame.cs
- ConfigXmlComment.cs
- SoapEnvelopeProcessingElement.cs
- DesignerView.cs
- ResponseBodyWriter.cs
- TransferMode.cs
- IDispatchConstantAttribute.cs
- KeyValuePair.cs
- DataBinding.cs
- DefaultTypeArgumentAttribute.cs
- CommentEmitter.cs
- TabPageDesigner.cs
- BitmapDownload.cs
- ConnectionManager.cs