Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AbstractSvcMapFileLoader.cs
- FontDifferentiator.cs
- KnownTypeDataContractResolver.cs
- NetCodeGroup.cs
- Track.cs
- SqlCaseSimplifier.cs
- RuntimeHandles.cs
- ColorTranslator.cs
- ImageList.cs
- CryptoApi.cs
- DataTableTypeConverter.cs
- TagPrefixInfo.cs
- AspNetPartialTrustHelpers.cs
- OwnerDrawPropertyBag.cs
- PrimitiveSchema.cs
- OleDbDataReader.cs
- Decoder.cs
- DataGrid.cs
- DuplicateContext.cs
- UpdateDelegates.Generated.cs
- DynamicRouteExpression.cs
- FontStyles.cs
- MutexSecurity.cs
- BamlTreeUpdater.cs
- OutputCacheModule.cs
- CollectionBase.cs
- NavigationFailedEventArgs.cs
- PrintPageEvent.cs
- HtmlLink.cs
- AppDomainManager.cs
- LoadWorkflowCommand.cs
- ImageKeyConverter.cs
- Table.cs
- EncoderBestFitFallback.cs
- AuthenticationService.cs
- CircleHotSpot.cs
- MsmqIntegrationReceiveParameters.cs
- SrgsDocument.cs
- EditorPartChrome.cs
- TabletCollection.cs
- Normalization.cs
- Int64Storage.cs
- DataListCommandEventArgs.cs
- PropertyTab.cs
- SortKey.cs
- CacheVirtualItemsEvent.cs
- ReferenceEqualityComparer.cs
- TreeViewItemAutomationPeer.cs
- WorkflowTransactionService.cs
- TemplatedWizardStep.cs
- DeviceContext2.cs
- WebPageTraceListener.cs
- NavigationProperty.cs
- DockAndAnchorLayout.cs
- ClientUtils.cs
- RuntimeWrappedException.cs
- MDIControlStrip.cs
- ScrollChrome.cs
- ReversePositionQuery.cs
- RegexWorker.cs
- SqlBuffer.cs
- SmtpException.cs
- WinEventTracker.cs
- DataSetSchema.cs
- ListViewContainer.cs
- WebAdminConfigurationHelper.cs
- TraceContextEventArgs.cs
- SqlSelectClauseBuilder.cs
- MediaContextNotificationWindow.cs
- CollectionBase.cs
- WindowsHyperlink.cs
- InstalledFontCollection.cs
- CheckBoxList.cs
- GeometryValueSerializer.cs
- Roles.cs
- EntryPointNotFoundException.cs
- WindowsAuthenticationModule.cs
- DeclarativeCatalogPartDesigner.cs
- DataGridViewRow.cs
- Model3D.cs
- _PooledStream.cs
- LineMetrics.cs
- MultiByteCodec.cs
- SecurityAccessDeniedException.cs
- DataGridViewRowCancelEventArgs.cs
- StateRuntime.cs
- MembershipPasswordException.cs
- ClientConfigurationSystem.cs
- Walker.cs
- ContentPosition.cs
- CustomCredentialPolicy.cs
- ZipIOExtraField.cs
- ContainerParagraph.cs
- RandomNumberGenerator.cs
- ReflectionPermission.cs
- DelegatingConfigHost.cs
- CodeTryCatchFinallyStatement.cs
- EtwProvider.cs
- HttpWrapper.cs
- NullableBoolConverter.cs