Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / MS / Internal / KnownBoxes.cs / 1 / KnownBoxes.cs
using System;
using System.Windows;
using System.Windows.Controls;
namespace MS.Internal.KnownBoxes
{
internal class SizeBox
{
internal SizeBox(double width, double height)
{
if (width < 0 || height < 0)
{
throw new System.ArgumentException(SR.Get(SRID.Rect_WidthAndHeightCannotBeNegative));
}
_width = width;
_height = height;
}
internal SizeBox(Size size): this(size.Width, size.Height) {}
internal double Width
{
get
{
return _width;
}
set
{
if (value < 0)
{
throw new System.ArgumentException(SR.Get(SRID.Rect_WidthAndHeightCannotBeNegative));
}
_width = value;
}
}
internal double Height
{
get
{
return _height;
}
set
{
if (value < 0)
{
throw new System.ArgumentException(SR.Get(SRID.Rect_WidthAndHeightCannotBeNegative));
}
_height = value;
}
}
double _width;
double _height;
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Windows;
using System.Windows.Controls;
namespace MS.Internal.KnownBoxes
{
internal class SizeBox
{
internal SizeBox(double width, double height)
{
if (width < 0 || height < 0)
{
throw new System.ArgumentException(SR.Get(SRID.Rect_WidthAndHeightCannotBeNegative));
}
_width = width;
_height = height;
}
internal SizeBox(Size size): this(size.Width, size.Height) {}
internal double Width
{
get
{
return _width;
}
set
{
if (value < 0)
{
throw new System.ArgumentException(SR.Get(SRID.Rect_WidthAndHeightCannotBeNegative));
}
_width = value;
}
}
internal double Height
{
get
{
return _height;
}
set
{
if (value < 0)
{
throw new System.ArgumentException(SR.Get(SRID.Rect_WidthAndHeightCannotBeNegative));
}
_height = value;
}
}
double _width;
double _height;
}
}
// 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
- updatecommandorderer.cs
- ZipFileInfoCollection.cs
- FormatConvertedBitmap.cs
- ParenthesizePropertyNameAttribute.cs
- HttpContextServiceHost.cs
- UnionExpr.cs
- IsolatedStorageFile.cs
- DataGridCell.cs
- BuildDependencySet.cs
- SimpleRecyclingCache.cs
- XmlAttributeCollection.cs
- ElementHostPropertyMap.cs
- RpcResponse.cs
- DesignerUtils.cs
- DynamicControl.cs
- HttpPostedFile.cs
- ToolStripItemImageRenderEventArgs.cs
- QuaternionAnimationUsingKeyFrames.cs
- Context.cs
- PrintEvent.cs
- AnnotationResourceChangedEventArgs.cs
- _UncName.cs
- DbProviderFactories.cs
- DataGridViewSelectedRowCollection.cs
- HexParser.cs
- CodeMemberField.cs
- URI.cs
- TableItemPattern.cs
- DataServiceQueryOfT.cs
- HwndHost.cs
- XmlAutoDetectWriter.cs
- BoundConstants.cs
- RequestQueue.cs
- EncryptedData.cs
- FileNameEditor.cs
- SqlInternalConnectionSmi.cs
- TraceContextEventArgs.cs
- ColorBlend.cs
- SmiEventSink.cs
- BitmapEffect.cs
- MetadataItem_Static.cs
- ConfigurationManagerHelper.cs
- TextTreeTextElementNode.cs
- UIPropertyMetadata.cs
- X509Utils.cs
- StatusBarPanel.cs
- LogicalExpressionTypeConverter.cs
- InvokePattern.cs
- InvokeHandlers.cs
- KoreanCalendar.cs
- SqlBulkCopy.cs
- ListManagerBindingsCollection.cs
- ChangeTracker.cs
- DBAsyncResult.cs
- XPathDocument.cs
- Table.cs
- MarshalByRefObject.cs
- BinaryObjectReader.cs
- WindowsToolbar.cs
- TerminatorSinks.cs
- PageWrapper.cs
- CollectionView.cs
- SqlErrorCollection.cs
- CreateUserWizardDesigner.cs
- PointF.cs
- ToolStripRenderEventArgs.cs
- _LocalDataStore.cs
- HashAlgorithm.cs
- WebSysDescriptionAttribute.cs
- loginstatus.cs
- ImageMapEventArgs.cs
- RequestCacheEntry.cs
- SwitchElementsCollection.cs
- StorageModelBuildProvider.cs
- Page.cs
- SingleConverter.cs
- XmlDictionaryReaderQuotas.cs
- AnimationClock.cs
- TextStore.cs
- WebPartEditorCancelVerb.cs
- DocumentPaginator.cs
- BitmapImage.cs
- SafeTimerHandle.cs
- ProjectionCamera.cs
- SortAction.cs
- CompositeCollection.cs
- XmlNode.cs
- MsmqAppDomainProtocolHandler.cs
- ImageClickEventArgs.cs
- TypeConvertions.cs
- SubclassTypeValidator.cs
- XmlChildEnumerator.cs
- ValueTypePropertyReference.cs
- PeerToPeerException.cs
- ClientRoleProvider.cs
- SplitterPanelDesigner.cs
- EntityViewGenerationAttribute.cs
- RegexStringValidator.cs
- SystemTcpConnection.cs
- DesignerMetadata.cs