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
- HostedBindingBehavior.cs
- SettingsAttributes.cs
- SqlCrossApplyToCrossJoin.cs
- ModulesEntry.cs
- ImageList.cs
- FontStyle.cs
- MimeMapping.cs
- BinaryReader.cs
- BaseValidatorDesigner.cs
- CapabilitiesPattern.cs
- DataSourceGeneratorException.cs
- ChangePassword.cs
- TaiwanCalendar.cs
- TimeStampChecker.cs
- ByteStack.cs
- QueryConverter.cs
- SQLUtility.cs
- ConstNode.cs
- MouseGesture.cs
- mactripleDES.cs
- SegmentInfo.cs
- SmiSettersStream.cs
- JsonMessageEncoderFactory.cs
- EventItfInfo.cs
- UTF32Encoding.cs
- Base64WriteStateInfo.cs
- Permission.cs
- TextPenaltyModule.cs
- GPStream.cs
- DebugView.cs
- XPathScanner.cs
- FileInfo.cs
- KeyInstance.cs
- CodeDomConfigurationHandler.cs
- HttpAsyncResult.cs
- MobileCapabilities.cs
- CollectionChangeEventArgs.cs
- CryptoStream.cs
- Interlocked.cs
- SmtpReplyReader.cs
- FilterQueryOptionExpression.cs
- DBDataPermissionAttribute.cs
- SqlParameterCollection.cs
- ProcessModelInfo.cs
- BlockUIContainer.cs
- NullRuntimeConfig.cs
- InternalPermissions.cs
- ACL.cs
- ProfileEventArgs.cs
- ExtenderControl.cs
- SettingsPropertyValueCollection.cs
- CfgRule.cs
- TextRunCache.cs
- DependencyPropertyKey.cs
- CodeMemberMethod.cs
- SystemColors.cs
- ProcessStartInfo.cs
- WebPartCancelEventArgs.cs
- BufferedStream2.cs
- BamlMapTable.cs
- OdbcConnectionOpen.cs
- ScrollChangedEventArgs.cs
- StreamGeometry.cs
- Parser.cs
- DeviceFiltersSection.cs
- LayoutEngine.cs
- LogSwitch.cs
- CrossSiteScriptingValidation.cs
- TableSectionStyle.cs
- XpsException.cs
- NativeObjectSecurity.cs
- XmlILIndex.cs
- RightsManagementEncryptedStream.cs
- RootAction.cs
- Logging.cs
- X509UI.cs
- Selector.cs
- PolicyLevel.cs
- AuthenticationService.cs
- IdnMapping.cs
- HttpCookiesSection.cs
- GroupByExpressionRewriter.cs
- FontFamily.cs
- SrgsItemList.cs
- DbConnectionInternal.cs
- FaultHandlingFilter.cs
- FieldDescriptor.cs
- ControlPropertyNameConverter.cs
- ScrollEventArgs.cs
- Enum.cs
- DLinqDataModelProvider.cs
- DeflateInput.cs
- XmlSchemaImport.cs
- PropertyMetadata.cs
- WsrmMessageInfo.cs
- AmbientLight.cs
- DetailsViewInsertEventArgs.cs
- MsmqNonTransactedPoisonHandler.cs
- FileChangesMonitor.cs
- MultilineStringConverter.cs