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
- PolicyException.cs
- Misc.cs
- Parameter.cs
- PointCollectionConverter.cs
- SHA1Managed.cs
- FamilyMapCollection.cs
- GuidTagList.cs
- ProfileSettings.cs
- AsnEncodedData.cs
- AuthenticateEventArgs.cs
- NodeLabelEditEvent.cs
- TextEditorLists.cs
- CacheOutputQuery.cs
- ModifiableIteratorCollection.cs
- GetBrowserTokenRequest.cs
- RegularExpressionValidator.cs
- SizeValueSerializer.cs
- CodeMemberEvent.cs
- TitleStyle.cs
- _LoggingObject.cs
- AndCondition.cs
- SessionPageStatePersister.cs
- SecurityKeyType.cs
- DataSet.cs
- XmlTextWriter.cs
- HeaderCollection.cs
- DataGridViewBindingCompleteEventArgs.cs
- ConfigurationManagerInternal.cs
- invalidudtexception.cs
- EntityUtil.cs
- ListBoxItem.cs
- CookielessData.cs
- __FastResourceComparer.cs
- SqlDataSourceCommandEventArgs.cs
- HtmlInputCheckBox.cs
- ApplicationContext.cs
- TextTreeInsertElementUndoUnit.cs
- SQLByteStorage.cs
- ByteStreamGeometryContext.cs
- TextStore.cs
- WindowsGraphics2.cs
- activationcontext.cs
- ConstructorNeedsTagAttribute.cs
- CompositeTypefaceMetrics.cs
- SeekStoryboard.cs
- DataServiceClientException.cs
- PartialCachingControl.cs
- ScaleTransform.cs
- UserPersonalizationStateInfo.cs
- SQLChars.cs
- PagedDataSource.cs
- TypedElement.cs
- ObjectAnimationUsingKeyFrames.cs
- AspNetHostingPermission.cs
- SystemKeyConverter.cs
- DisplayNameAttribute.cs
- InkCanvasAutomationPeer.cs
- AnonymousIdentificationModule.cs
- TextSegment.cs
- StringStorage.cs
- BasePropertyDescriptor.cs
- CompensationToken.cs
- TextDecorationCollection.cs
- InkCanvasSelectionAdorner.cs
- XhtmlMobileTextWriter.cs
- BamlBinaryReader.cs
- CapacityStreamGeometryContext.cs
- NumberAction.cs
- TypeGeneratedEventArgs.cs
- WizardForm.cs
- DataGridViewButtonCell.cs
- mda.cs
- InstanceKeyView.cs
- ManagedWndProcTracker.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- DomainConstraint.cs
- TextBoxRenderer.cs
- UTF32Encoding.cs
- ControlDesignerState.cs
- CollectionViewGroup.cs
- StrongName.cs
- UnsafeNativeMethods.cs
- MenuStrip.cs
- RecognizerStateChangedEventArgs.cs
- TypeBuilderInstantiation.cs
- COM2Enum.cs
- Convert.cs
- SymLanguageType.cs
- DataGridViewCellStateChangedEventArgs.cs
- FileLogRecord.cs
- RelatedCurrencyManager.cs
- HostedImpersonationContext.cs
- SchemaCollectionPreprocessor.cs
- UInt16Converter.cs
- RotateTransform.cs
- CachedFontFamily.cs
- TraceContextRecord.cs
- DoubleConverter.cs
- IsolatedStorageFileStream.cs
- MonthCalendar.cs