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
- HashCryptoHandle.cs
- GuidConverter.cs
- WebPartEditorOkVerb.cs
- OleDbMetaDataFactory.cs
- Exceptions.cs
- DataSourceHelper.cs
- MergeLocalizationDirectives.cs
- ListBoxItemAutomationPeer.cs
- TableLayoutRowStyleCollection.cs
- EncodingNLS.cs
- SmiGettersStream.cs
- BStrWrapper.cs
- PasswordPropertyTextAttribute.cs
- KoreanCalendar.cs
- PageContentAsyncResult.cs
- WmlTextViewAdapter.cs
- HtmlHead.cs
- DbConnectionHelper.cs
- TraceHandler.cs
- EdmEntityTypeAttribute.cs
- ByteConverter.cs
- CodeCommentStatement.cs
- Utils.cs
- FixedDSBuilder.cs
- ShaperBuffers.cs
- PreservationFileReader.cs
- WhereaboutsReader.cs
- RowBinding.cs
- DetailsViewUpdatedEventArgs.cs
- HiddenFieldPageStatePersister.cs
- CorrelationExtension.cs
- EventLogPermissionEntry.cs
- TaskExceptionHolder.cs
- XPathCompileException.cs
- DataListCommandEventArgs.cs
- TabPage.cs
- TTSEngineTypes.cs
- HtmlSelect.cs
- AudioException.cs
- TraceListeners.cs
- LinqToSqlWrapper.cs
- DataGridViewAccessibleObject.cs
- TextBoxLine.cs
- SqlError.cs
- FlatButtonAppearance.cs
- IIS7UserPrincipal.cs
- PropertyGroupDescription.cs
- PackageStore.cs
- EntitySet.cs
- IERequestCache.cs
- InputLanguage.cs
- SocketAddress.cs
- MimeMultiPart.cs
- Claim.cs
- PolyLineSegment.cs
- ToolStripContainerActionList.cs
- ValuePattern.cs
- BehaviorDragDropEventArgs.cs
- AVElementHelper.cs
- Soap.cs
- ContainerSelectorActiveEvent.cs
- CryptoKeySecurity.cs
- ListItemCollection.cs
- CompilerResults.cs
- RequestBringIntoViewEventArgs.cs
- RadioButtonAutomationPeer.cs
- CapabilitiesSection.cs
- ZipIOLocalFileBlock.cs
- CornerRadiusConverter.cs
- Deflater.cs
- Typeface.cs
- SupportedAddressingMode.cs
- SqlNode.cs
- MultiSelector.cs
- DoWorkEventArgs.cs
- Vars.cs
- OleDbDataReader.cs
- GridViewHeaderRowPresenter.cs
- ConsoleTraceListener.cs
- AffineTransform3D.cs
- HttpRuntimeSection.cs
- FileSystemInfo.cs
- MultiPropertyDescriptorGridEntry.cs
- wgx_sdk_version.cs
- ManipulationVelocities.cs
- AxParameterData.cs
- RegexCode.cs
- FileSystemInfo.cs
- SafeTimerHandle.cs
- WhileDesigner.cs
- GB18030Encoding.cs
- WorkflowInvoker.cs
- EventEntry.cs
- FacetDescription.cs
- MenuItemBinding.cs
- InternalConfigHost.cs
- ProgressBarBrushConverter.cs
- RewritingPass.cs
- DeclaredTypeValidatorAttribute.cs
- _SSPIWrapper.cs