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
- PageFunction.cs
- HeaderLabel.cs
- errorpatternmatcher.cs
- ContractMapping.cs
- ModifierKeysValueSerializer.cs
- MappingItemCollection.cs
- PolicyStatement.cs
- SQLDateTime.cs
- Walker.cs
- SecurityKeyUsage.cs
- ISAPIApplicationHost.cs
- XPathNodeHelper.cs
- EdmValidator.cs
- ToolStripMenuItem.cs
- ImageProxy.cs
- QuaternionAnimationBase.cs
- BitmapEffectDrawingContent.cs
- PrefixHandle.cs
- OleStrCAMarshaler.cs
- IPAddressCollection.cs
- TableDetailsRow.cs
- DecoderReplacementFallback.cs
- SerializationInfo.cs
- ISessionStateStore.cs
- CodeDomDecompiler.cs
- ComponentDispatcher.cs
- PropertyHelper.cs
- TextViewDesigner.cs
- BrowserCapabilitiesFactory.cs
- RootBrowserWindow.cs
- WebColorConverter.cs
- GZipStream.cs
- SiteMapNodeItemEventArgs.cs
- DNS.cs
- DefaultValueAttribute.cs
- WhitespaceSignificantCollectionAttribute.cs
- DictionaryGlobals.cs
- AxWrapperGen.cs
- RenderContext.cs
- rsa.cs
- XmlSchemaSimpleTypeUnion.cs
- ProcessModelSection.cs
- XmlElementAttributes.cs
- FontFamilyValueSerializer.cs
- DoubleAnimationUsingKeyFrames.cs
- SoapMessage.cs
- CustomError.cs
- RuntimeIdentifierPropertyAttribute.cs
- handlecollector.cs
- DataGridCaption.cs
- ConditionalAttribute.cs
- MultiplexingFormatMapping.cs
- SecureConversationVersion.cs
- DataKeyArray.cs
- DataSetViewSchema.cs
- CacheDependency.cs
- TypeUtils.cs
- BindingExpressionUncommonField.cs
- Activator.cs
- COM2Enum.cs
- MarginsConverter.cs
- SmiContextFactory.cs
- LinqDataSourceDeleteEventArgs.cs
- PropertyPushdownHelper.cs
- StringKeyFrameCollection.cs
- MouseEventArgs.cs
- GPPOINT.cs
- DataGridTableCollection.cs
- TextServicesCompartmentEventSink.cs
- PowerStatus.cs
- User.cs
- COMException.cs
- ViewKeyConstraint.cs
- DataSourceXmlAttributeAttribute.cs
- RuleSettingsCollection.cs
- CodeAssignStatement.cs
- SystemUdpStatistics.cs
- CornerRadiusConverter.cs
- XamlFigureLengthSerializer.cs
- TextEncodedRawTextWriter.cs
- MergeFilterQuery.cs
- DbParameterCollectionHelper.cs
- translator.cs
- MsmqInputMessagePool.cs
- XmlWrappingReader.cs
- GridView.cs
- CodeParameterDeclarationExpressionCollection.cs
- Renderer.cs
- ConfigurationStrings.cs
- SQLGuid.cs
- BCryptNative.cs
- PackageStore.cs
- DefaultValueAttribute.cs
- DefaultWorkflowSchedulerService.cs
- CollectionViewProxy.cs
- UserPreferenceChangedEventArgs.cs
- CommandDevice.cs
- StrokeCollectionConverter.cs
- DesignerVerbCollection.cs
- ArgIterator.cs