Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- ContentTypeSettingDispatchMessageFormatter.cs
- OleDbEnumerator.cs
- InkPresenterAutomationPeer.cs
- mansign.cs
- SQLSingleStorage.cs
- HwndAppCommandInputProvider.cs
- BamlBinaryReader.cs
- SizeFConverter.cs
- ShutDownListener.cs
- AsnEncodedData.cs
- ProjectionCamera.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- InheritanceRules.cs
- DeviceContext.cs
- Encoding.cs
- Validator.cs
- TemplateBamlRecordReader.cs
- IDispatchConstantAttribute.cs
- EventProviderClassic.cs
- BindingMAnagerBase.cs
- RotationValidation.cs
- XmlRootAttribute.cs
- BasicExpressionVisitor.cs
- PageAsyncTask.cs
- ICollection.cs
- ByteStream.cs
- TreeNodeMouseHoverEvent.cs
- DisplayInformation.cs
- MultilineStringConverter.cs
- WmlCalendarAdapter.cs
- PersistenceProvider.cs
- EventProxy.cs
- VisualStyleElement.cs
- GPRECTF.cs
- WithParamAction.cs
- ContentOperations.cs
- StandardOleMarshalObject.cs
- Label.cs
- BitmapMetadata.cs
- StrokeRenderer.cs
- HashHelper.cs
- Hashtable.cs
- DataObjectCopyingEventArgs.cs
- BufferAllocator.cs
- Rotation3DAnimationUsingKeyFrames.cs
- ColumnWidthChangingEvent.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- SHA256.cs
- FixedPageAutomationPeer.cs
- TrustManagerPromptUI.cs
- MetadataPropertyAttribute.cs
- TraceSwitch.cs
- CloudCollection.cs
- SettingsProviderCollection.cs
- MimeFormatExtensions.cs
- OutputCacheProviderCollection.cs
- HyperLinkStyle.cs
- Brush.cs
- MultiPartWriter.cs
- EmbeddedMailObjectCollectionEditor.cs
- DocumentOrderComparer.cs
- RemoteWebConfigurationHostStream.cs
- QueryExtender.cs
- WizardPanel.cs
- GeneralTransform2DTo3D.cs
- SemaphoreSlim.cs
- Fonts.cs
- UITypeEditor.cs
- ResourceReferenceExpression.cs
- NetworkInterface.cs
- ColumnMapTranslator.cs
- DataGridViewCellPaintingEventArgs.cs
- WSSecurityPolicy12.cs
- BitVector32.cs
- ToolStripSplitStackLayout.cs
- ArraySet.cs
- PropertyIDSet.cs
- CodeGeneratorAttribute.cs
- WebPartManager.cs
- HtmlInputImage.cs
- MissingManifestResourceException.cs
- SQLDouble.cs
- InvalidCastException.cs
- UpdateException.cs
- Addressing.cs
- TreeNodeMouseHoverEvent.cs
- BaseTemplateParser.cs
- DirectionalLight.cs
- SystemDiagnosticsSection.cs
- StrokeIntersection.cs
- MsdtcWrapper.cs
- SqlParameterCollection.cs
- OrderedDictionaryStateHelper.cs
- StringFreezingAttribute.cs
- XmlAttributes.cs
- OptimalTextSource.cs
- JournalEntryStack.cs
- PageVisual.cs
- Executor.cs
- WebColorConverter.cs