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
- MappingSource.cs
- TextEditorThreadLocalStore.cs
- XmlArrayAttribute.cs
- UnsafeNativeMethods.cs
- ValidationResults.cs
- SingleObjectCollection.cs
- ISO2022Encoding.cs
- GC.cs
- EmptyReadOnlyDictionaryInternal.cs
- OrderedEnumerableRowCollection.cs
- Transform3DGroup.cs
- AdRotatorDesigner.cs
- SpeakProgressEventArgs.cs
- Label.cs
- SettingsPropertyIsReadOnlyException.cs
- TextEditorContextMenu.cs
- DesignerUtils.cs
- DesignerLoader.cs
- AppSettingsSection.cs
- JavaScriptSerializer.cs
- ContentElementAutomationPeer.cs
- DATA_BLOB.cs
- XmlEntity.cs
- SiblingIterators.cs
- UIAgentAsyncBeginRequest.cs
- DocumentXmlWriter.cs
- SafeNativeMethodsOther.cs
- DetailsViewRow.cs
- ProcessInfo.cs
- CachingHintValidation.cs
- indexingfiltermarshaler.cs
- DeclaredTypeValidatorAttribute.cs
- TableItemStyle.cs
- ServiceModelPerformanceCounters.cs
- DocumentPageViewAutomationPeer.cs
- Attributes.cs
- ProgressBarRenderer.cs
- Exceptions.cs
- UnsafeNativeMethods.cs
- XmlBindingWorker.cs
- RowType.cs
- GridViewCancelEditEventArgs.cs
- ContextMarshalException.cs
- ComponentDispatcherThread.cs
- TextPointer.cs
- CmsInterop.cs
- DebugControllerThread.cs
- PngBitmapEncoder.cs
- AnnotationResourceChangedEventArgs.cs
- UIPropertyMetadata.cs
- OperationInvokerTrace.cs
- FontFamilyConverter.cs
- PtsHost.cs
- ClientRequest.cs
- ForceCopyBuildProvider.cs
- Int16.cs
- Dispatcher.cs
- ComponentResourceKeyConverter.cs
- Formatter.cs
- AssemblyAssociatedContentFileAttribute.cs
- BrowserDefinitionCollection.cs
- SystemEvents.cs
- XmlSerializerAssemblyAttribute.cs
- metadatamappinghashervisitor.cs
- ControlParameter.cs
- NodeFunctions.cs
- CaseInsensitiveOrdinalStringComparer.cs
- Point3D.cs
- GeneralTransform3DTo2D.cs
- FixedDocument.cs
- UnaryNode.cs
- UIElementCollection.cs
- NameSpaceEvent.cs
- EndpointNameMessageFilter.cs
- WindowsAuthenticationEventArgs.cs
- XmlFormatExtensionAttribute.cs
- TCPListener.cs
- PersistenceTypeAttribute.cs
- LinqDataSourceSelectEventArgs.cs
- AndCondition.cs
- TextTreeTextNode.cs
- SystemUdpStatistics.cs
- VoiceSynthesis.cs
- SeverityFilter.cs
- BitmapEffect.cs
- SplitterCancelEvent.cs
- ResourceDictionaryCollection.cs
- HtmlTableCell.cs
- IntegerValidator.cs
- SafeFileMapViewHandle.cs
- DashStyles.cs
- SystemResources.cs
- SimpleParser.cs
- DomNameTable.cs
- LoggedException.cs
- MessagePropertyAttribute.cs
- ExtensionFile.cs
- LinearGradientBrush.cs
- httpserverutility.cs
- Fault.cs