Code:
                         / Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / MeasureData.cs / 1 / MeasureData.cs
                        
                        
                            //---------------------------------------------------------------------------------------- 
//
// 
//    Copyright (C) Microsoft Corporation.  All rights reserved.
//   
//
// Description: 
//  This file defines a class intended to be passed as a parameter to Measure.  It contains 
//  available size and viewport information.
// 
//-------------------------------------------------------------------------------------
using MS.Internal;
using System; 
using System.Windows.Media;
 
namespace System.Windows 
{
    ///  
    /// Provides all the data we need during the Measure pass (most notably viewport information).  Because of backwards
    /// compat we can't pass it in as a parameter to Measure so it's set as a property on UIElement directly before the call
    /// instead.
    ///   
    internal class MeasureData
    { 
        public MeasureData(Size availableSize, Rect viewport) 
        {
            _availableSize = availableSize; 
            _viewport = viewport;
        }
        public MeasureData(MeasureData data) : this (data.AvailableSize, data.Viewport) 
        {
        } 
 
        public bool HasViewport
        { 
            get
            {
                return Viewport != Rect.Empty;
            } 
        }
 
 
        public bool IsCloseTo(MeasureData other)
        { 
            if (other == null)
            {
                return false;
            } 
            bool isClose = DoubleUtil.AreClose(AvailableSize, other.AvailableSize); 
            isClose &= DoubleUtil.AreClose(Viewport, other.Viewport); 
            return isClose; 
        }
        public Size AvailableSize 
        {
            get 
            { 
                return _availableSize;
            } 
            set
            {
                _availableSize = value; 
            }
        } 
 
        public Rect Viewport
        { 
            get
            {
                return _viewport;
            } 
            set 
            { 
                _viewport = value;
            } 
        }
        private Size _availableSize;
        private Rect _viewport; 
    }
} 
// 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.
//   
//
// Description: 
//  This file defines a class intended to be passed as a parameter to Measure.  It contains 
//  available size and viewport information.
// 
//-------------------------------------------------------------------------------------
using MS.Internal;
using System; 
using System.Windows.Media;
 
namespace System.Windows 
{
    ///  
    /// Provides all the data we need during the Measure pass (most notably viewport information).  Because of backwards
    /// compat we can't pass it in as a parameter to Measure so it's set as a property on UIElement directly before the call
    /// instead.
    ///   
    internal class MeasureData
    { 
        public MeasureData(Size availableSize, Rect viewport) 
        {
            _availableSize = availableSize; 
            _viewport = viewport;
        }
        public MeasureData(MeasureData data) : this (data.AvailableSize, data.Viewport) 
        {
        } 
 
        public bool HasViewport
        { 
            get
            {
                return Viewport != Rect.Empty;
            } 
        }
 
 
        public bool IsCloseTo(MeasureData other)
        { 
            if (other == null)
            {
                return false;
            } 
            bool isClose = DoubleUtil.AreClose(AvailableSize, other.AvailableSize); 
            isClose &= DoubleUtil.AreClose(Viewport, other.Viewport); 
            return isClose; 
        }
        public Size AvailableSize 
        {
            get 
            { 
                return _availableSize;
            } 
            set
            {
                _availableSize = value; 
            }
        } 
 
        public Rect Viewport
        { 
            get
            {
                return _viewport;
            } 
            set 
            { 
                _viewport = value;
            } 
        }
        private Size _availableSize;
        private Rect _viewport; 
    }
} 
// 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
- SamlSubject.cs
 - ChannelSettingsElement.cs
 - TextPattern.cs
 - MappingItemCollection.cs
 - ComponentChangedEvent.cs
 - LoginName.cs
 - AutoSizeComboBox.cs
 - ConsoleKeyInfo.cs
 - GPPOINTF.cs
 - AttachedProperty.cs
 - RuleSettingsCollection.cs
 - BitArray.cs
 - ReliableSessionElement.cs
 - AspCompat.cs
 - UnconditionalPolicy.cs
 - InternalBufferOverflowException.cs
 - MembershipUser.cs
 - TranslateTransform3D.cs
 - SerializerWriterEventHandlers.cs
 - PartialTrustVisibleAssemblyCollection.cs
 - EntityClientCacheKey.cs
 - ApplicationProxyInternal.cs
 - XmlNamespaceManager.cs
 - PositiveTimeSpanValidatorAttribute.cs
 - EncoderExceptionFallback.cs
 - PlatformNotSupportedException.cs
 - BinaryReader.cs
 - WebPartConnectVerb.cs
 - InstanceNotReadyException.cs
 - RepeaterCommandEventArgs.cs
 - TypedTableHandler.cs
 - OdbcCommand.cs
 - ConfigurationProperty.cs
 - TileBrush.cs
 - DataGridViewColumn.cs
 - SolidColorBrush.cs
 - OleCmdHelper.cs
 - InternalsVisibleToAttribute.cs
 - DiscoveryClientDuplexChannel.cs
 - SiteMapNode.cs
 - ContextConfiguration.cs
 - ScopelessEnumAttribute.cs
 - QueryContinueDragEvent.cs
 - TypeHelpers.cs
 - BinaryMessageEncodingElement.cs
 - XmlSchemaCompilationSettings.cs
 - initElementDictionary.cs
 - AssemblyUtil.cs
 - ConnectorDragDropGlyph.cs
 - SoapIncludeAttribute.cs
 - ProcessInputEventArgs.cs
 - WindowsGraphicsWrapper.cs
 - StrongNameKeyPair.cs
 - RecordManager.cs
 - ParentQuery.cs
 - GenericEnumerator.cs
 - InfiniteIntConverter.cs
 - SpellerError.cs
 - documentation.cs
 - RadioButtonList.cs
 - Comparer.cs
 - ClientTarget.cs
 - RectValueSerializer.cs
 - ConfigurationSectionGroupCollection.cs
 - TextBoxRenderer.cs
 - DrawingAttributes.cs
 - UnsafeNativeMethods.cs
 - LoadItemsEventArgs.cs
 - GridSplitter.cs
 - ProfilePropertyNameValidator.cs
 - ArraySortHelper.cs
 - DataGridTablesFactory.cs
 - GraphicsContext.cs
 - CfgParser.cs
 - X509LogoTypeExtension.cs
 - ObjectQuery_EntitySqlExtensions.cs
 - BitmapDecoder.cs
 - SecUtil.cs
 - __ConsoleStream.cs
 - oledbmetadatacolumnnames.cs
 - RegisteredExpandoAttribute.cs
 - ISFTagAndGuidCache.cs
 - EncodingStreamWrapper.cs
 - IconHelper.cs
 - CqlParser.cs
 - CacheMemory.cs
 - ApplicationDirectoryMembershipCondition.cs
 - ActiveXContainer.cs
 - PlatformCulture.cs
 - DesignerHierarchicalDataSourceView.cs
 - Error.cs
 - InvalidCommandTreeException.cs
 - NonNullItemCollection.cs
 - TypeResolver.cs
 - MissingMethodException.cs
 - BulletedListEventArgs.cs
 - Regex.cs
 - AmbientEnvironment.cs
 - InternalConfigEventArgs.cs
 - PriorityBindingExpression.cs