Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Design / Glyphs / ReadOnlyActivityGlyph.cs / 1305376 / ReadOnlyActivityGlyph.cs
namespace System.Workflow.ComponentModel.Design
{
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
#region Glyphs
#region Class ReadOnlyActivityGlyph
//Class is internal but not sealed as we dont expect the ActivityDesigner writers to supply their own
//Glyph instead based on comment property comment glyph is shown
//Exception: StripItemCommentGlyph
public class ReadOnlyActivityGlyph : DesignerGlyph
{
public override Rectangle GetBounds(ActivityDesigner designer, bool activated)
{
if (designer == null)
throw new ArgumentNullException("designer");
Rectangle bounds = designer.Bounds;
bounds.Inflate(WorkflowTheme.CurrentTheme.AmbientTheme.Margin);
return bounds;
}
public override int Priority
{
get
{
return DesignerGlyph.ReadOnlyGlyphPriority;
}
}
protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer)
{
Rectangle bounds = GetBounds(designer, activated);
bounds.Inflate(WorkflowTheme.CurrentTheme.AmbientTheme.Margin);
ActivityDesignerPaint.DrawImage(graphics, AmbientTheme.ReadOnlyImage, bounds, DesignerContentAlignment.TopLeft);
}
}
#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
- ComponentEvent.cs
- TextBox.cs
- HttpModuleCollection.cs
- WebBrowser.cs
- DbConnectionClosed.cs
- TrackingMemoryStreamFactory.cs
- X509Certificate.cs
- OdbcEnvironment.cs
- State.cs
- DiagnosticsConfiguration.cs
- RegistryPermission.cs
- TextPattern.cs
- safemediahandle.cs
- SessionEndingCancelEventArgs.cs
- DrawItemEvent.cs
- BlurBitmapEffect.cs
- dtdvalidator.cs
- XmlSchemaSubstitutionGroup.cs
- safelinkcollection.cs
- BamlLocalizationDictionary.cs
- ZoneButton.cs
- StrokeIntersection.cs
- VScrollBar.cs
- Timer.cs
- PageHandlerFactory.cs
- HMACSHA384.cs
- BitmapPalettes.cs
- DataGridViewDataErrorEventArgs.cs
- ToolStripScrollButton.cs
- CorrelationExtension.cs
- TypedServiceChannelBuilder.cs
- ProfileWorkflowElement.cs
- DataGridViewRowStateChangedEventArgs.cs
- WindowsStatusBar.cs
- WebZone.cs
- HtmlTableRowCollection.cs
- UniqueTransportManagerRegistration.cs
- NamedPipeConnectionPoolSettings.cs
- lengthconverter.cs
- ListItem.cs
- GenericParameterDataContract.cs
- InputScopeConverter.cs
- SqlUdtInfo.cs
- WindowsProgressbar.cs
- ConfigurationStrings.cs
- StartUpEventArgs.cs
- ToolStripDropTargetManager.cs
- EntityDataSourceColumn.cs
- FormViewCommandEventArgs.cs
- CodeIndexerExpression.cs
- XmlWellformedWriterHelpers.cs
- Size3D.cs
- ListViewUpdatedEventArgs.cs
- GridErrorDlg.cs
- XPathNavigator.cs
- HtmlEncodedRawTextWriter.cs
- ReaderOutput.cs
- DataGridItemAutomationPeer.cs
- HostingEnvironmentSection.cs
- NextPreviousPagerField.cs
- GradientBrush.cs
- Scheduling.cs
- PageSettings.cs
- MexHttpsBindingCollectionElement.cs
- KeyValuePairs.cs
- GradientBrush.cs
- MenuItem.cs
- URIFormatException.cs
- BufferedGraphicsContext.cs
- SoapElementAttribute.cs
- DataSvcMapFile.cs
- SmtpReplyReaderFactory.cs
- DaylightTime.cs
- HyperlinkAutomationPeer.cs
- HyperlinkAutomationPeer.cs
- DictionaryEntry.cs
- TraceSection.cs
- TreeWalkHelper.cs
- COAUTHIDENTITY.cs
- XPathDocumentBuilder.cs
- HWStack.cs
- ImageListStreamer.cs
- EdmProperty.cs
- DefaultAsyncDataDispatcher.cs
- CounterSet.cs
- RealizationContext.cs
- PrivateFontCollection.cs
- CachedCompositeFamily.cs
- TableLayoutRowStyleCollection.cs
- CompilerLocalReference.cs
- XmlSchemaImporter.cs
- XhtmlConformanceSection.cs
- BaseCodePageEncoding.cs
- EventQueueState.cs
- InlineUIContainer.cs
- DataControlButton.cs
- ProgressChangedEventArgs.cs
- PrintController.cs
- Choices.cs
- RubberbandSelector.cs