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
- MetadataCollection.cs
- Grant.cs
- XmlTextAttribute.cs
- DesignerAdapterUtil.cs
- OleDbReferenceCollection.cs
- odbcmetadatafactory.cs
- DataRecordInternal.cs
- DTCTransactionManager.cs
- Wildcard.cs
- CodeThrowExceptionStatement.cs
- PipelineModuleStepContainer.cs
- ThreadSafeList.cs
- MetaModel.cs
- ColumnWidthChangingEvent.cs
- CompressEmulationStream.cs
- MemberExpression.cs
- ValueProviderWrapper.cs
- XamlBuildTaskServices.cs
- SortExpressionBuilder.cs
- SelectionEditingBehavior.cs
- DataSourceXmlClassAttribute.cs
- InstanceKey.cs
- CollectionViewGroupRoot.cs
- AssemblyBuilder.cs
- DeleteMemberBinder.cs
- ToolStripDesignerAvailabilityAttribute.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- DBConnection.cs
- DataObjectMethodAttribute.cs
- PageParser.cs
- _NegoState.cs
- AggregationMinMaxHelpers.cs
- FlowDocumentReaderAutomationPeer.cs
- DetailsViewDesigner.cs
- TdsValueSetter.cs
- WindowsIPAddress.cs
- Color.cs
- FixedSOMGroup.cs
- MobileCategoryAttribute.cs
- LightweightCodeGenerator.cs
- AnonymousIdentificationModule.cs
- AuthenticationManager.cs
- SafeNativeMethods.cs
- safemediahandle.cs
- ContractMapping.cs
- SchemeSettingElement.cs
- WindowsBrush.cs
- UIHelper.cs
- WebSysDefaultValueAttribute.cs
- SiteMapDataSourceDesigner.cs
- RightsManagementErrorHandler.cs
- CodeTypeDelegate.cs
- EventPropertyMap.cs
- RichTextBoxDesigner.cs
- GlyphRunDrawing.cs
- DataGridView.cs
- TagPrefixCollection.cs
- mansign.cs
- ContractValidationHelper.cs
- MessageEnumerator.cs
- diagnosticsswitches.cs
- NavigationHelper.cs
- StateMachineWorkflow.cs
- TextTreeFixupNode.cs
- TreeIterators.cs
- Pens.cs
- AVElementHelper.cs
- SrgsRulesCollection.cs
- Hashtable.cs
- StringCollection.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- SystemIPInterfaceProperties.cs
- ResourceIDHelper.cs
- XmlHierarchicalDataSourceView.cs
- FlowchartDesigner.xaml.cs
- DocumentReferenceCollection.cs
- HttpApplicationStateBase.cs
- StsCommunicationException.cs
- Matrix3D.cs
- EditorZoneAutoFormat.cs
- XmlBinaryWriterSession.cs
- GacUtil.cs
- BitConverter.cs
- LayoutManager.cs
- AuthStoreRoleProvider.cs
- HandleValueEditor.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- Assert.cs
- SizeF.cs
- ApplicationManager.cs
- InputLanguage.cs
- ToolStripItemBehavior.cs
- SqlDependencyUtils.cs
- CircleHotSpot.cs
- HttpGetClientProtocol.cs
- RectValueSerializer.cs
- cryptoapiTransform.cs
- SignatureResourcePool.cs
- GridViewUpdateEventArgs.cs
- CodeIdentifier.cs