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
- EnvelopedPkcs7.cs
- AccessibilityApplicationManager.cs
- CqlErrorHelper.cs
- EmptyEnumerable.cs
- Quad.cs
- ApplicationHost.cs
- ObjectPersistData.cs
- TraceHandlerErrorFormatter.cs
- ClientTarget.cs
- DispatcherExceptionEventArgs.cs
- SessionPageStateSection.cs
- WindowsToolbarAsMenu.cs
- PhysicalAddress.cs
- ParseChildrenAsPropertiesAttribute.cs
- SqlStream.cs
- BitmapPalettes.cs
- SupportsEventValidationAttribute.cs
- OdbcDataReader.cs
- CheckedPointers.cs
- StickyNoteContentControl.cs
- TraceSection.cs
- VirtualDirectoryMappingCollection.cs
- OperationValidationEventArgs.cs
- LinkGrep.cs
- PropertyTab.cs
- Constraint.cs
- InstallerTypeAttribute.cs
- SupportingTokenProviderSpecification.cs
- PersonalizationState.cs
- XPathDocument.cs
- PasswordRecovery.cs
- ObjectDataSourceDisposingEventArgs.cs
- SizeConverter.cs
- SecUtil.cs
- ReachDocumentPageSerializerAsync.cs
- WrapPanel.cs
- EncoderExceptionFallback.cs
- Point3DCollection.cs
- ExtensionQuery.cs
- StringReader.cs
- MetadataItemSerializer.cs
- KeyValuePair.cs
- InvalidPropValue.cs
- ConfigurationCollectionAttribute.cs
- EncodingDataItem.cs
- OleDbEnumerator.cs
- thaishape.cs
- SchemaTypeEmitter.cs
- WebPartTracker.cs
- Bits.cs
- nulltextcontainer.cs
- Schema.cs
- ColumnResult.cs
- Model3D.cs
- QilTypeChecker.cs
- ExpressionNode.cs
- DrawListViewColumnHeaderEventArgs.cs
- Timer.cs
- FieldToken.cs
- VariantWrapper.cs
- LayoutExceptionEventArgs.cs
- XmlValidatingReaderImpl.cs
- HttpProfileBase.cs
- ContainerSelectorGlyph.cs
- RewritingPass.cs
- SortedDictionary.cs
- ThicknessAnimation.cs
- NegotiateStream.cs
- StylusButton.cs
- Point.cs
- WbmpConverter.cs
- SvcMapFileLoader.cs
- Mouse.cs
- DataFormats.cs
- BezierSegment.cs
- EndpointBehaviorElementCollection.cs
- Preprocessor.cs
- DebugView.cs
- CqlBlock.cs
- FullTextLine.cs
- PhonemeEventArgs.cs
- BitSet.cs
- AdornedElementPlaceholder.cs
- TextProviderWrapper.cs
- ContractListAdapter.cs
- HwndSourceKeyboardInputSite.cs
- ReadOnlyCollection.cs
- IImplicitResourceProvider.cs
- RuntimeCompatibilityAttribute.cs
- MaskedTextBoxDesignerActionList.cs
- ProfileParameter.cs
- BufferModesCollection.cs
- ColumnHeaderConverter.cs
- ListBox.cs
- AssemblyHash.cs
- DeleteIndexBinder.cs
- RepeaterItemEventArgs.cs
- PageCatalogPart.cs
- XmlQueryRuntime.cs
- SqlConnectionFactory.cs