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
- MenuItemStyleCollection.cs
- IsolatedStorageFile.cs
- TypeExtensionConverter.cs
- ExpressionBuilderContext.cs
- CellTreeNode.cs
- BitmapCodecInfo.cs
- DecoderExceptionFallback.cs
- SecurityTokenContainer.cs
- ServiceBusyException.cs
- AlphabeticalEnumConverter.cs
- IntSecurity.cs
- AmbientValueAttribute.cs
- RecognizedWordUnit.cs
- SafeHGlobalHandleCritical.cs
- IndexObject.cs
- XmlHierarchicalDataSourceView.cs
- DataGridViewUtilities.cs
- WebZone.cs
- Attachment.cs
- FixedSOMTableRow.cs
- PropertyDescriptorCollection.cs
- SplineKeyFrames.cs
- FixedFlowMap.cs
- Converter.cs
- DataListItemCollection.cs
- EntityDataSourceColumn.cs
- Translator.cs
- BinaryObjectInfo.cs
- PathGeometry.cs
- Application.cs
- TreeNodeBindingCollection.cs
- TextSelection.cs
- KerberosSecurityTokenParameters.cs
- SQLDateTimeStorage.cs
- GeneralTransform3D.cs
- mactripleDES.cs
- VerticalAlignConverter.cs
- WebPartDescription.cs
- QueueSurrogate.cs
- WorkflowIdleElement.cs
- DataKey.cs
- CombinedGeometry.cs
- CompiledQueryCacheKey.cs
- TextStore.cs
- counter.cs
- Accessible.cs
- AnnotationComponentManager.cs
- CompiledIdentityConstraint.cs
- DocumentPageViewAutomationPeer.cs
- EditorZone.cs
- SystemThemeKey.cs
- ListControl.cs
- InputLanguageProfileNotifySink.cs
- ObservableDictionary.cs
- OuterGlowBitmapEffect.cs
- Literal.cs
- Msmq3PoisonHandler.cs
- FormsAuthenticationCredentials.cs
- TextContainerChangeEventArgs.cs
- ScopelessEnumAttribute.cs
- IUnknownConstantAttribute.cs
- XamlTreeBuilder.cs
- SubpageParagraph.cs
- MobileCapabilities.cs
- WsatServiceAddress.cs
- ResourceSet.cs
- FixedHighlight.cs
- UIElement3D.cs
- MemberDomainMap.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- Properties.cs
- FieldToken.cs
- CodeAttributeArgument.cs
- XmlUtilWriter.cs
- DiagnosticTrace.cs
- InputProviderSite.cs
- MessageQueueCriteria.cs
- DataGridDetailsPresenter.cs
- HitTestWithGeometryDrawingContextWalker.cs
- SafeFileMappingHandle.cs
- StringSource.cs
- MSHTMLHost.cs
- SourceExpressionException.cs
- ReadOnlyDictionary.cs
- SocketInformation.cs
- FaultImportOptions.cs
- RadioButtonStandardAdapter.cs
- DecoratedNameAttribute.cs
- EntityProviderServices.cs
- TCPListener.cs
- CompensatableTransactionScopeActivity.cs
- XmlSchemaElement.cs
- EditingMode.cs
- WinInetCache.cs
- TrackingMemoryStream.cs
- ToolStripMenuItem.cs
- ProjectionCamera.cs
- PieceDirectory.cs
- EntitySetRetriever.cs
- NamespaceListProperty.cs