Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- FreezableCollection.cs
- GeometryCollection.cs
- ItemPager.cs
- SimpleType.cs
- ColorConvertedBitmap.cs
- SafeNativeMethods.cs
- FontFaceLayoutInfo.cs
- StringOutput.cs
- CommandSet.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- xmlfixedPageInfo.cs
- ServiceDeploymentInfo.cs
- Lasso.cs
- ServerValidateEventArgs.cs
- XmlAtomErrorReader.cs
- StackSpiller.cs
- CompletionProxy.cs
- DropDownHolder.cs
- IDQuery.cs
- XmlSignificantWhitespace.cs
- SqlDataSource.cs
- CommandDevice.cs
- WebPartConnectionsCancelVerb.cs
- DataGridColumnHeaderAutomationPeer.cs
- CalendarDay.cs
- DataGridViewColumnCollectionDialog.cs
- ToolStripDropDownClosingEventArgs.cs
- Size.cs
- WebPartMovingEventArgs.cs
- SafeCancelMibChangeNotify.cs
- ProjectionPruner.cs
- TypedAsyncResult.cs
- dataprotectionpermission.cs
- Cursor.cs
- LiteralControl.cs
- ShaderRenderModeValidation.cs
- FrameworkObject.cs
- BaseCollection.cs
- SessionIDManager.cs
- AutomationProperties.cs
- Pair.cs
- WebPartZoneCollection.cs
- TemporaryBitmapFile.cs
- DataGridViewAdvancedBorderStyle.cs
- UpdateCommand.cs
- DefaultMemberAttribute.cs
- SafeLibraryHandle.cs
- Substitution.cs
- TabControl.cs
- AlternateViewCollection.cs
- DrawingVisualDrawingContext.cs
- SizeChangedEventArgs.cs
- DataGridItem.cs
- ExceptionUtility.cs
- SqlDataSourceSummaryPanel.cs
- ValidationError.cs
- UpdateDelegates.Generated.cs
- InlineCollection.cs
- UnescapedXmlDiagnosticData.cs
- ElapsedEventArgs.cs
- XmlSchemaComplexContentRestriction.cs
- Speller.cs
- HttpCookie.cs
- MissingSatelliteAssemblyException.cs
- GetIsBrowserClientRequest.cs
- AesManaged.cs
- ProjectionPath.cs
- ShutDownListener.cs
- ExpressionNode.cs
- ToolStripItemTextRenderEventArgs.cs
- Regex.cs
- XmlSchemaSimpleContent.cs
- TextRangeEdit.cs
- Visual.cs
- MonthChangedEventArgs.cs
- Style.cs
- NonSerializedAttribute.cs
- HtmlMeta.cs
- AdornerLayer.cs
- GatewayDefinition.cs
- LineBreakRecord.cs
- IISMapPath.cs
- FlowDocument.cs
- Matrix3D.cs
- EDesignUtil.cs
- StrokeCollectionConverter.cs
- PageClientProxyGenerator.cs
- InternalBufferOverflowException.cs
- ObjectDataSourceView.cs
- XamlTreeBuilderBamlRecordWriter.cs
- dtdvalidator.cs
- CompositeDataBoundControl.cs
- DataFormat.cs
- itemelement.cs
- CollectionContainer.cs
- MLangCodePageEncoding.cs
- InstanceNameConverter.cs
- CharKeyFrameCollection.cs
- WebReferenceCollection.cs
- AppDomainFactory.cs