Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / DrawingBrush.cs / 1305600 / DrawingBrush.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: DrawingBrush.cs // // Description: This file contains the implementation of DrawingBrush. // The DrawingBrush is a TileBrush which defines its tile content // by use of a Drawing. // // History: // 2003/07/17 : [....] - Created it. // 2003/07/28 : [....] - Renamed it and hooked it up to the unmanaged code. // //--------------------------------------------------------------------------- using MS.Internal; using System; using System.ComponentModel; using System.Diagnostics; using System.Runtime.InteropServices; using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; namespace System.Windows.Media { ////// DrawingBrush - This TileBrush defines its content as a Drawing /// public sealed partial class DrawingBrush : TileBrush { #region Constructors ////// Default constructor for DrawingBrush. The resulting Brush has no content. /// public DrawingBrush() { } ////// DrawingBrush Constructor where the image is set to the parameter's value /// /// The Drawing representing the contents of this Brush. public DrawingBrush(Drawing drawing) { Drawing = drawing; } #endregion Constructors ////// Obtains the current bounds of the brush's content /// /// Output bounds of content protected override void GetContentBounds(out Rect contentBounds) { contentBounds = Drawing.GetBounds(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: DrawingBrush.cs // // Description: This file contains the implementation of DrawingBrush. // The DrawingBrush is a TileBrush which defines its tile content // by use of a Drawing. // // History: // 2003/07/17 : [....] - Created it. // 2003/07/28 : [....] - Renamed it and hooked it up to the unmanaged code. // //--------------------------------------------------------------------------- using MS.Internal; using System; using System.ComponentModel; using System.Diagnostics; using System.Runtime.InteropServices; using System.Windows; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Composition; namespace System.Windows.Media { ////// DrawingBrush - This TileBrush defines its content as a Drawing /// public sealed partial class DrawingBrush : TileBrush { #region Constructors ////// Default constructor for DrawingBrush. The resulting Brush has no content. /// public DrawingBrush() { } ////// DrawingBrush Constructor where the image is set to the parameter's value /// /// The Drawing representing the contents of this Brush. public DrawingBrush(Drawing drawing) { Drawing = drawing; } #endregion Constructors ////// Obtains the current bounds of the brush's content /// /// Output bounds of content protected override void GetContentBounds(out Rect contentBounds) { contentBounds = Drawing.GetBounds(); } } } // 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
- ToolStripDesignerAvailabilityAttribute.cs
- ClientSponsor.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- LicenseProviderAttribute.cs
- ListViewGroupConverter.cs
- SafeLibraryHandle.cs
- TriggerActionCollection.cs
- __ComObject.cs
- ParentUndoUnit.cs
- TextPointer.cs
- EventLogRecord.cs
- MetricEntry.cs
- MbpInfo.cs
- SocketManager.cs
- path.cs
- Glyph.cs
- SystemIPv4InterfaceProperties.cs
- ErrorFormatter.cs
- RecipientInfo.cs
- ExpressionVisitor.cs
- StorageTypeMapping.cs
- SchemaExporter.cs
- SizeAnimationClockResource.cs
- AppDomainEvidenceFactory.cs
- BooleanKeyFrameCollection.cs
- ApplicationHost.cs
- ObjectDataSourceMethodEditor.cs
- Point4D.cs
- MouseBinding.cs
- UdpChannelFactory.cs
- TrustManager.cs
- X509SecurityTokenAuthenticator.cs
- securitycriticaldataformultiplegetandset.cs
- FileAuthorizationModule.cs
- ScrollViewer.cs
- Attachment.cs
- X509IssuerSerialKeyIdentifierClause.cs
- GiveFeedbackEventArgs.cs
- EntityDataSourceColumn.cs
- TextCollapsingProperties.cs
- DetailsViewPageEventArgs.cs
- XmlDocument.cs
- EventLogInternal.cs
- MissingMemberException.cs
- DataGridViewRowEventArgs.cs
- VariableQuery.cs
- MailDefinition.cs
- BitmapEffectInputData.cs
- FixedTextSelectionProcessor.cs
- SQLInt32.cs
- EntityDesignerUtils.cs
- XmlParserContext.cs
- PolicyLevel.cs
- SchemaImporterExtensionsSection.cs
- WebZoneDesigner.cs
- Shape.cs
- UnitySerializationHolder.cs
- RadioButtonAutomationPeer.cs
- Helpers.cs
- FocusWithinProperty.cs
- ApplyTemplatesAction.cs
- CodeMemberProperty.cs
- DataTable.cs
- DropTarget.cs
- DayRenderEvent.cs
- KerberosSecurityTokenAuthenticator.cs
- DataGridViewCellFormattingEventArgs.cs
- LogicalTreeHelper.cs
- CompilationSection.cs
- AsyncOperationManager.cs
- MdbDataFileEditor.cs
- LineMetrics.cs
- TabPanel.cs
- RecommendedAsConfigurableAttribute.cs
- DbException.cs
- DecimalAnimationBase.cs
- CreateUserErrorEventArgs.cs
- GC.cs
- RemotingConfiguration.cs
- FormsAuthenticationTicket.cs
- NumberSubstitution.cs
- COM2Enum.cs
- CancellationTokenRegistration.cs
- OrderPreservingPipeliningMergeHelper.cs
- _ListenerRequestStream.cs
- ConfigXmlAttribute.cs
- Sql8ExpressionRewriter.cs
- Menu.cs
- DurableServiceAttribute.cs
- AuthenticateEventArgs.cs
- SizeIndependentAnimationStorage.cs
- ProviderIncompatibleException.cs
- WebReferenceOptions.cs
- MachineKeySection.cs
- MessageBox.cs
- XmlConverter.cs
- WindowsProgressbar.cs
- BrowserCapabilitiesCodeGenerator.cs
- TextEditorLists.cs
- SqlXmlStorage.cs