Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Design / Glyphs / ShadowGlyph.cs / 1305376 / ShadowGlyph.cs
namespace System.Workflow.ComponentModel.Design { using System; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms; #region Glyphs #region Class ShadowGlyph public sealed class ShadowGlyph : DesignerGlyph { private static ShadowGlyph defaultShadowGlyph = null; internal static ShadowGlyph Default { get { if (defaultShadowGlyph == null) defaultShadowGlyph = new ShadowGlyph(); return defaultShadowGlyph; } } public override Rectangle GetBounds(ActivityDesigner designer, bool activated) { if (designer == null) throw new ArgumentNullException("designer"); Rectangle bounds = designer.Bounds; bounds.Inflate(AmbientTheme.DropShadowWidth + 1, AmbientTheme.DropShadowWidth + 1); return bounds; } protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer) { Rectangle bounds = GetBounds(designer, activated); if (!bounds.Size.IsEmpty) { bool drawRounded = (designer.DesignerTheme.DesignerGeometry == DesignerGeometry.RoundedRectangle && !designer.IsRootDesigner); ActivityDesignerPaint.DrawDropShadow(graphics, designer.Bounds, designer.DesignerTheme.BorderPen.Color, AmbientTheme.DropShadowWidth, LightSourcePosition.Left | LightSourcePosition.Top, 0.5f, drawRounded); } } public override int Priority { get { return DesignerGlyph.LowestPriority; } } } #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
- EventMap.cs
- ScriptReference.cs
- BuildProvider.cs
- ObjectCache.cs
- WindowsAuthenticationEventArgs.cs
- WebPartTracker.cs
- WeakEventTable.cs
- ZipIOLocalFileBlock.cs
- WebPartCancelEventArgs.cs
- EmptyElement.cs
- ToolStripTextBox.cs
- CompletionBookmark.cs
- ReferentialConstraint.cs
- Durable.cs
- ProgressiveCrcCalculatingStream.cs
- RadioButtonRenderer.cs
- ping.cs
- HtmlButton.cs
- SmtpClient.cs
- TextTreeInsertUndoUnit.cs
- ParserStreamGeometryContext.cs
- WebBrowserNavigatingEventHandler.cs
- CharConverter.cs
- TypeDescriptor.cs
- MetadataItem.cs
- FrameworkReadOnlyPropertyMetadata.cs
- BypassElementCollection.cs
- UnsafeNativeMethods.cs
- InstanceDataCollection.cs
- TextBoxAutoCompleteSourceConverter.cs
- Base64WriteStateInfo.cs
- ListCollectionView.cs
- HoistedLocals.cs
- ValidationSettings.cs
- SQLSingle.cs
- MemoryRecordBuffer.cs
- RepeaterItemEventArgs.cs
- NextPreviousPagerField.cs
- ResourcePool.cs
- PageFunction.cs
- StatusBarDrawItemEvent.cs
- CommandSet.cs
- WeakReadOnlyCollection.cs
- StringSource.cs
- RSAPKCS1SignatureDeformatter.cs
- SourceFileInfo.cs
- DataGridViewLinkColumn.cs
- ObjectDataSourceSelectingEventArgs.cs
- MetadataHelper.cs
- WebPartUserCapability.cs
- InstalledFontCollection.cs
- listviewsubitemcollectioneditor.cs
- odbcmetadatacollectionnames.cs
- StateMachineExecutionState.cs
- VBIdentifierName.cs
- BookmarkUndoUnit.cs
- XmlElementAttributes.cs
- CustomGrammar.cs
- SByteConverter.cs
- Vector3DIndependentAnimationStorage.cs
- ArcSegment.cs
- Int32Converter.cs
- OwnerDrawPropertyBag.cs
- SHA256Managed.cs
- FixUp.cs
- FormatException.cs
- TrustManagerPromptUI.cs
- RemotingService.cs
- SeverityFilter.cs
- DSACryptoServiceProvider.cs
- StylusPointCollection.cs
- InputReferenceExpression.cs
- UrlRoutingHandler.cs
- IsolatedStorageSecurityState.cs
- FillErrorEventArgs.cs
- _LoggingObject.cs
- PageCatalogPartDesigner.cs
- NameNode.cs
- JsonFormatWriterGenerator.cs
- XhtmlBasicLiteralTextAdapter.cs
- ForAllOperator.cs
- SectionVisual.cs
- TextServicesDisplayAttribute.cs
- StorageSetMapping.cs
- RelationshipSet.cs
- EntitySqlQueryCacheKey.cs
- DataGridViewRowEventArgs.cs
- RegistrySecurity.cs
- HandoffBehavior.cs
- ApplicationFileParser.cs
- RowUpdatedEventArgs.cs
- FontUnit.cs
- ScrollViewer.cs
- BorderGapMaskConverter.cs
- WSHttpTransportSecurityElement.cs
- ImmutableCommunicationTimeouts.cs
- ButtonBaseAdapter.cs
- OptimizedTemplateContent.cs
- ButtonAutomationPeer.cs
- TypeRestriction.cs