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
- _BaseOverlappedAsyncResult.cs
- ToolboxItemSnapLineBehavior.cs
- SecurityKeyUsage.cs
- Crc32.cs
- ScrollBarAutomationPeer.cs
- BStrWrapper.cs
- XPathBinder.cs
- EntityConnection.cs
- GPRECT.cs
- FileDialog_Vista_Interop.cs
- StructuredProperty.cs
- AsyncResult.cs
- RegistrationProxy.cs
- HMACSHA256.cs
- CodeEntryPointMethod.cs
- HasCopySemanticsAttribute.cs
- AttachmentCollection.cs
- TemplatedMailWebEventProvider.cs
- DesignerAttributeInfo.cs
- ZipIOCentralDirectoryBlock.cs
- WebPartHeaderCloseVerb.cs
- DocumentGridContextMenu.cs
- SqlReorderer.cs
- DoubleAnimationClockResource.cs
- SpecularMaterial.cs
- ControlBindingsCollection.cs
- RijndaelManaged.cs
- ObjectDataSourceDisposingEventArgs.cs
- ProcessModelSection.cs
- EventListenerClientSide.cs
- HighContrastHelper.cs
- DeadCharTextComposition.cs
- MouseButton.cs
- ContentPresenter.cs
- HttpVersion.cs
- GraphicsContainer.cs
- SmiEventStream.cs
- RequestQueryProcessor.cs
- DXD.cs
- DebugViewWriter.cs
- FormViewInsertedEventArgs.cs
- InternalConfigConfigurationFactory.cs
- ProvidersHelper.cs
- DataAccessor.cs
- QuestionEventArgs.cs
- elementinformation.cs
- Brush.cs
- WebPartCatalogAddVerb.cs
- ProcessThreadCollection.cs
- CodeLabeledStatement.cs
- ResourceDictionary.cs
- NativeMethods.cs
- PlatformCulture.cs
- ListViewDeleteEventArgs.cs
- WinInetCache.cs
- BindingManagerDataErrorEventArgs.cs
- XmlSchemaAll.cs
- QilGeneratorEnv.cs
- DataSourceXmlSerializer.cs
- KnownBoxes.cs
- HttpClientCertificate.cs
- DurableOperationAttribute.cs
- DataSourceDescriptorCollection.cs
- CreateUserWizardStep.cs
- DelegateSerializationHolder.cs
- DBBindings.cs
- SQLInt16.cs
- RegexFCD.cs
- FileBasedResourceGroveler.cs
- ResourceReferenceExpressionConverter.cs
- TextEvent.cs
- CommonRemoteMemoryBlock.cs
- _SSPISessionCache.cs
- UnsafeNativeMethods.cs
- ProcessMonitor.cs
- FieldMetadata.cs
- WebPartPersonalization.cs
- TypeElement.cs
- OdbcConnectionPoolProviderInfo.cs
- InfoCardTrace.cs
- DBBindings.cs
- MultipleCopiesCollection.cs
- PrimitiveSchema.cs
- IndexedEnumerable.cs
- EntityDataSourceReferenceGroup.cs
- ProfileSettingsCollection.cs
- ListManagerBindingsCollection.cs
- ListViewEditEventArgs.cs
- SrgsRule.cs
- AttachedAnnotation.cs
- XmlSchemaSimpleTypeUnion.cs
- GroupByExpressionRewriter.cs
- TypeReference.cs
- XamlVector3DCollectionSerializer.cs
- ButtonChrome.cs
- XmlSchemaChoice.cs
- FixedDocumentSequencePaginator.cs
- ValidatorCompatibilityHelper.cs
- Screen.cs
- ConfigurationManagerInternalFactory.cs