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
- AmbientValueAttribute.cs
- sortedlist.cs
- DataGridHeadersVisibilityToVisibilityConverter.cs
- Typography.cs
- XsltSettings.cs
- CrossSiteScriptingValidation.cs
- MouseWheelEventArgs.cs
- RemoteAsymmetricSignatureFormatter.cs
- SafeProcessHandle.cs
- ConditionCollection.cs
- DockEditor.cs
- RootProfilePropertySettingsCollection.cs
- SafePipeHandle.cs
- ConnectivityStatus.cs
- AutoGeneratedFieldProperties.cs
- ModelFunction.cs
- Matrix.cs
- MimeImporter.cs
- CharStorage.cs
- XPathNode.cs
- GridViewDeletedEventArgs.cs
- DataKeyCollection.cs
- ErrorHandlingAcceptor.cs
- DBSchemaTable.cs
- PersonalizationStateInfo.cs
- AssemblySettingAttributes.cs
- SourceInterpreter.cs
- Blend.cs
- MatrixConverter.cs
- FileDialogCustomPlace.cs
- XmlAnyElementAttribute.cs
- TextFormatter.cs
- WebProxyScriptElement.cs
- HtmlTableCell.cs
- SerializationHelper.cs
- BuildProvider.cs
- PrintingPermissionAttribute.cs
- XPathDocumentNavigator.cs
- UseLicense.cs
- ConfigXmlAttribute.cs
- ClientSideProviderDescription.cs
- ScrollChangedEventArgs.cs
- PenCursorManager.cs
- SQLByteStorage.cs
- MetadataConversionError.cs
- ValidationErrorCollection.cs
- X509SecurityTokenAuthenticator.cs
- CharacterShapingProperties.cs
- NativeRecognizer.cs
- XmlDocumentType.cs
- printdlgexmarshaler.cs
- MsmqIntegrationChannelListener.cs
- KeyValuePair.cs
- ResourceReferenceKeyNotFoundException.cs
- XamlTemplateSerializer.cs
- __FastResourceComparer.cs
- BamlRecordReader.cs
- CursorConverter.cs
- TypeNameConverter.cs
- BindUriHelper.cs
- WebPartEditorOkVerb.cs
- FlowLayout.cs
- HttpListenerTimeoutManager.cs
- RepeatBehaviorConverter.cs
- HttpResponse.cs
- FieldDescriptor.cs
- Constraint.cs
- Enumerable.cs
- DocumentViewerHelper.cs
- ipaddressinformationcollection.cs
- ProfileServiceManager.cs
- RegistrationProxy.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- ProcessHost.cs
- SmtpClient.cs
- ContextProperty.cs
- EncodingNLS.cs
- MessageSmuggler.cs
- SeekableReadStream.cs
- Section.cs
- CachedTypeface.cs
- RectangleHotSpot.cs
- InvokeWebServiceDesigner.cs
- M3DUtil.cs
- PenLineCapValidation.cs
- TaskFormBase.cs
- EffectiveValueEntry.cs
- XmlBinaryWriter.cs
- Menu.cs
- AppliedDeviceFiltersEditor.cs
- NavigationHelper.cs
- Preprocessor.cs
- AssociationType.cs
- ChameleonKey.cs
- Stylesheet.cs
- DefaultValueTypeConverter.cs
- XamlSerializer.cs
- HttpHandler.cs
- RijndaelCryptoServiceProvider.cs
- EdmToObjectNamespaceMap.cs