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
- MouseDevice.cs
- DbMetaDataCollectionNames.cs
- ProfileSection.cs
- TextStore.cs
- CodeDomSerializer.cs
- DesignerActionUIService.cs
- SystemTcpConnection.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- NavigationEventArgs.cs
- Exception.cs
- DataGridRow.cs
- SessionStateItemCollection.cs
- SecurityRuntime.cs
- AssemblySettingAttributes.cs
- SchemaImporterExtensionElementCollection.cs
- TileBrush.cs
- Win32Exception.cs
- TabletDevice.cs
- ExitEventArgs.cs
- DateTimeParse.cs
- Logging.cs
- AuthenticationManager.cs
- FileUpload.cs
- PermissionSetEnumerator.cs
- UTF32Encoding.cs
- WorkflowDesigner.cs
- ConstNode.cs
- CultureTableRecord.cs
- SafeThemeHandle.cs
- PrePrepareMethodAttribute.cs
- StretchValidation.cs
- SchemaLookupTable.cs
- FacetChecker.cs
- RuleSettings.cs
- DependencyPropertyChangedEventArgs.cs
- Visitors.cs
- EnumerableCollectionView.cs
- SessionKeyExpiredException.cs
- AxHostDesigner.cs
- DataRowExtensions.cs
- _TLSstream.cs
- MobileControlsSection.cs
- DataControlImageButton.cs
- ProcessInfo.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- SystemIPv4InterfaceProperties.cs
- DrawTreeNodeEventArgs.cs
- CapabilitiesPattern.cs
- Setter.cs
- Trustee.cs
- Point.cs
- QueryOutputWriter.cs
- ApplyHostConfigurationBehavior.cs
- DmlSqlGenerator.cs
- DefaultValueAttribute.cs
- ItemMap.cs
- Pair.cs
- dsa.cs
- InvalidEnumArgumentException.cs
- SiteMapProvider.cs
- WrappedReader.cs
- HwndAppCommandInputProvider.cs
- AQNBuilder.cs
- UserControl.cs
- Int32Rect.cs
- ControlCachePolicy.cs
- StorageRoot.cs
- SqlUDTStorage.cs
- FontNamesConverter.cs
- ModelPropertyCollectionImpl.cs
- RSAPKCS1KeyExchangeFormatter.cs
- Hyperlink.cs
- SortedList.cs
- EdmItemCollection.OcAssemblyCache.cs
- XPathNodeIterator.cs
- FontNamesConverter.cs
- SQLSingle.cs
- EditorZone.cs
- MethodToken.cs
- CacheOutputQuery.cs
- XmlSchemaAnyAttribute.cs
- DocumentPageView.cs
- SelfIssuedSamlTokenFactory.cs
- PresentationTraceSources.cs
- BulletedListDesigner.cs
- ColorBlend.cs
- ConditionChanges.cs
- TextParentUndoUnit.cs
- ObjectDataSourceEventArgs.cs
- ClientSettingsSection.cs
- HostedElements.cs
- metadatamappinghashervisitor.cs
- TraceInternal.cs
- FixedSOMTable.cs
- MetadataArtifactLoader.cs
- AttributeCollection.cs
- MULTI_QI.cs
- PrintingPermissionAttribute.cs
- HwndSource.cs
- KeyBinding.cs