Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / SizeChangedInfo.cs / 1 / SizeChangedInfo.cs
using System; namespace System.Windows { ////// The SizeChangedinfo class is used as a parameter to OnSizeRenderChanged. /// public class SizeChangedInfo { ////// Initializes a new instance of the SizeChangedinfo class. /// /// /// The element which size is changing. /// /// /// The size of the object before update. New size is element.RenderSize /// /// /// The flag indicating that width component of the size changed. Note that due to double math /// effects, the it may be (previousSize.Width != newSize.Width) and widthChanged = true. /// This may happen in layout when sizes of objects are fluctuating because of a precision "jitter" of /// the input parameters, but the overall scene is considered to be "the same" so no visible changes /// will be detected. Typically, the handler of SizeChangedEvent should check this bit to avoid /// invalidation of layout if the dimension didn't change. /// /// /// The flag indicating that height component of the size changed. Note that due to double math /// effects, the it may be (previousSize.Height != newSize.Height) and heightChanged = true. /// This may happen in layout when sizes of objects are fluctuating because of a precision "jitter" of /// the input parameters, but the overall scene is considered to be "the same" so no visible changes /// will be detected. Typically, the handler of SizeChangedEvent should check this bit to avoid /// invalidation of layout if the dimension didn't change. /// public SizeChangedInfo(UIElement element, Size previousSize, bool widthChanged, bool heightChanged) { _element = element; _previousSize = previousSize; _widthChanged = widthChanged; _heightChanged = heightChanged; } ////// Read-only access to the previous Size /// public Size PreviousSize { get { return _previousSize; } } ////// Read-only access to the new Size /// public Size NewSize { get { return _element.RenderSize; } } ////// Read-only access to the flag indicating that Width component of the size changed. /// Note that due to double math /// effects, the it may be (previousSize.Width != newSize.Width) and widthChanged = true. /// This may happen in layout when sizes of objects are fluctuating because of a precision "jitter" of /// the input parameters, but the overall scene is considered to be "the same" so no visible changes /// will be detected. Typically, the handler of SizeChangedEvent should check this bit to avoid /// invalidation of layout if the dimension didn't change. /// public bool WidthChanged { get { return _widthChanged; } } ////// Read-only access to the flag indicating that Height component of the size changed. /// Note that due to double math /// effects, the it may be (previousSize.Height != newSize.Height) and heightChanged = true. /// This may happen in layout when sizes of objects are fluctuating because of a precision "jitter" of /// the input parameters, but the overall scene is considered to be "the same" so no visible changes /// will be detected. Typically, the handler of SizeChangedEvent should check this bit to avoid /// invalidation of layout if the dimension didn't change. /// public bool HeightChanged { get { return _heightChanged; } } //this method is used by UIElement to "accumulate" several cosequitive layout updates //into the single args object cahced on UIElement. Since the SizeChanged is deferred event, //there could be several size changes before it will actually fire. internal void Update(bool widthChanged, bool heightChanged) { _widthChanged = _widthChanged | widthChanged; _heightChanged = _heightChanged | heightChanged; } internal UIElement Element { get { return _element; } } private UIElement _element; private Size _previousSize; private bool _widthChanged; private bool _heightChanged; internal SizeChangedInfo Next; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; namespace System.Windows { ////// The SizeChangedinfo class is used as a parameter to OnSizeRenderChanged. /// public class SizeChangedInfo { ////// Initializes a new instance of the SizeChangedinfo class. /// /// /// The element which size is changing. /// /// /// The size of the object before update. New size is element.RenderSize /// /// /// The flag indicating that width component of the size changed. Note that due to double math /// effects, the it may be (previousSize.Width != newSize.Width) and widthChanged = true. /// This may happen in layout when sizes of objects are fluctuating because of a precision "jitter" of /// the input parameters, but the overall scene is considered to be "the same" so no visible changes /// will be detected. Typically, the handler of SizeChangedEvent should check this bit to avoid /// invalidation of layout if the dimension didn't change. /// /// /// The flag indicating that height component of the size changed. Note that due to double math /// effects, the it may be (previousSize.Height != newSize.Height) and heightChanged = true. /// This may happen in layout when sizes of objects are fluctuating because of a precision "jitter" of /// the input parameters, but the overall scene is considered to be "the same" so no visible changes /// will be detected. Typically, the handler of SizeChangedEvent should check this bit to avoid /// invalidation of layout if the dimension didn't change. /// public SizeChangedInfo(UIElement element, Size previousSize, bool widthChanged, bool heightChanged) { _element = element; _previousSize = previousSize; _widthChanged = widthChanged; _heightChanged = heightChanged; } ////// Read-only access to the previous Size /// public Size PreviousSize { get { return _previousSize; } } ////// Read-only access to the new Size /// public Size NewSize { get { return _element.RenderSize; } } ////// Read-only access to the flag indicating that Width component of the size changed. /// Note that due to double math /// effects, the it may be (previousSize.Width != newSize.Width) and widthChanged = true. /// This may happen in layout when sizes of objects are fluctuating because of a precision "jitter" of /// the input parameters, but the overall scene is considered to be "the same" so no visible changes /// will be detected. Typically, the handler of SizeChangedEvent should check this bit to avoid /// invalidation of layout if the dimension didn't change. /// public bool WidthChanged { get { return _widthChanged; } } ////// Read-only access to the flag indicating that Height component of the size changed. /// Note that due to double math /// effects, the it may be (previousSize.Height != newSize.Height) and heightChanged = true. /// This may happen in layout when sizes of objects are fluctuating because of a precision "jitter" of /// the input parameters, but the overall scene is considered to be "the same" so no visible changes /// will be detected. Typically, the handler of SizeChangedEvent should check this bit to avoid /// invalidation of layout if the dimension didn't change. /// public bool HeightChanged { get { return _heightChanged; } } //this method is used by UIElement to "accumulate" several cosequitive layout updates //into the single args object cahced on UIElement. Since the SizeChanged is deferred event, //there could be several size changes before it will actually fire. internal void Update(bool widthChanged, bool heightChanged) { _widthChanged = _widthChanged | widthChanged; _heightChanged = _heightChanged | heightChanged; } internal UIElement Element { get { return _element; } } private UIElement _element; private Size _previousSize; private bool _widthChanged; private bool _heightChanged; internal SizeChangedInfo Next; } } // 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
- PropertyRecord.cs
- DataReceivedEventArgs.cs
- Atom10FormatterFactory.cs
- TreeViewTemplateSelector.cs
- MergeEnumerator.cs
- XmlAnyAttributeAttribute.cs
- SymbolTable.cs
- TextRunProperties.cs
- CommandBinding.cs
- SoapProtocolImporter.cs
- SymLanguageVendor.cs
- CngAlgorithm.cs
- ResourceContainer.cs
- ObjectListShowCommandsEventArgs.cs
- HttpPostedFile.cs
- WorkflowMarkupSerializerMapping.cs
- WebPageTraceListener.cs
- HtmlContainerControl.cs
- ControlCollection.cs
- CurrencyManager.cs
- SslStream.cs
- CroppedBitmap.cs
- SettingsProviderCollection.cs
- WebPartDescriptionCollection.cs
- printdlgexmarshaler.cs
- SqlStatistics.cs
- SecUtil.cs
- SqlAliaser.cs
- ModelEditingScope.cs
- XmlComment.cs
- DesignerAttribute.cs
- AspNetHostingPermission.cs
- XmlReflectionImporter.cs
- EventHandlingScope.cs
- ProtocolsConfigurationHandler.cs
- XmlILAnnotation.cs
- ExpressionsCollectionEditor.cs
- TextFormatterImp.cs
- IncomingWebRequestContext.cs
- GeometryGroup.cs
- AttributedMetaModel.cs
- HtmlLink.cs
- XmlSignificantWhitespace.cs
- CfgArc.cs
- DefaultHttpHandler.cs
- FileInfo.cs
- StrongNameMembershipCondition.cs
- HatchBrush.cs
- VBCodeProvider.cs
- PathFigureCollectionConverter.cs
- AsymmetricAlgorithm.cs
- MemberRelationshipService.cs
- PartialList.cs
- ApplicationProxyInternal.cs
- LocalTransaction.cs
- DataControlPagerLinkButton.cs
- AppSettingsSection.cs
- GenericTypeParameterBuilder.cs
- ActiveXHost.cs
- Int32CollectionValueSerializer.cs
- BinHexDecoder.cs
- MenuItemBindingCollection.cs
- WebAdminConfigurationHelper.cs
- AliasGenerator.cs
- DataGridViewColumnEventArgs.cs
- XmlArrayItemAttribute.cs
- AtomServiceDocumentSerializer.cs
- JapaneseCalendar.cs
- PrimitiveRenderer.cs
- ViewValidator.cs
- Page.cs
- CharacterShapingProperties.cs
- ADMembershipProvider.cs
- MatrixKeyFrameCollection.cs
- LongCountAggregationOperator.cs
- TraceXPathNavigator.cs
- NotificationContext.cs
- MemberRestriction.cs
- Buffer.cs
- ValueUnavailableException.cs
- DateTimeFormat.cs
- Visual3D.cs
- WebPartMinimizeVerb.cs
- ExpressionEditorAttribute.cs
- LogicalTreeHelper.cs
- AppDomainGrammarProxy.cs
- ListViewCommandEventArgs.cs
- ControlPaint.cs
- GridView.cs
- SessionPageStatePersister.cs
- FormattedText.cs
- PathGeometry.cs
- ClientSettingsSection.cs
- CustomWebEventKey.cs
- XmlSchemaFacet.cs
- ListViewPagedDataSource.cs
- securitymgrsite.cs
- InfoCardSymmetricAlgorithm.cs
- XD.cs
- Int32.cs