Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Controls / DeferredSelectedIndexReference.cs / 1 / DeferredSelectedIndexReference.cs
//----------------------------------------------------------------------------
//
// File: DeferredSelectedIndexReference.cs
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
// Description: Proxy object passed to the property system to delay load
// Selector.SelectedIndex values.
//
//---------------------------------------------------------------------------
using System.Windows.Controls.Primitives;
namespace System.Windows.Controls
{
// Proxy object passed to the property system to delay load Selector.SelectedIndex
// values.
internal class DeferredSelectedIndexReference : DeferredReference
{
//-----------------------------------------------------
//
// Constructors
//
//-----------------------------------------------------
#region Constructors
internal DeferredSelectedIndexReference(Selector selector)
{
_selector = selector;
}
#endregion Constructors
//------------------------------------------------------
//
// Internal Methods
//
//-----------------------------------------------------
#region Internal Methods
// Does the real work to calculate the current SelectedIndexProperty value.
internal override object GetValue(BaseValueSourceInternal valueSource)
{
return _selector.InternalSelectedIndex;
}
// Gets the type of the value it represents
internal override Type GetValueType()
{
return typeof(int);
}
#endregion Internal Methods
//------------------------------------------------------
//
// Private Fields
//
//------------------------------------------------------
#region Private Fields
// Selector mapped to this object.
private readonly Selector _selector;
#endregion Private Fields
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------------------
//
// File: DeferredSelectedIndexReference.cs
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
// Description: Proxy object passed to the property system to delay load
// Selector.SelectedIndex values.
//
//---------------------------------------------------------------------------
using System.Windows.Controls.Primitives;
namespace System.Windows.Controls
{
// Proxy object passed to the property system to delay load Selector.SelectedIndex
// values.
internal class DeferredSelectedIndexReference : DeferredReference
{
//-----------------------------------------------------
//
// Constructors
//
//-----------------------------------------------------
#region Constructors
internal DeferredSelectedIndexReference(Selector selector)
{
_selector = selector;
}
#endregion Constructors
//------------------------------------------------------
//
// Internal Methods
//
//-----------------------------------------------------
#region Internal Methods
// Does the real work to calculate the current SelectedIndexProperty value.
internal override object GetValue(BaseValueSourceInternal valueSource)
{
return _selector.InternalSelectedIndex;
}
// Gets the type of the value it represents
internal override Type GetValueType()
{
return typeof(int);
}
#endregion Internal Methods
//------------------------------------------------------
//
// Private Fields
//
//------------------------------------------------------
#region Private Fields
// Selector mapped to this object.
private readonly Selector _selector;
#endregion Private Fields
}
}
// 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
- SystemNetworkInterface.cs
- DefinitionUpdate.cs
- KeyNotFoundException.cs
- UpdateProgress.cs
- BitmapEffectGroup.cs
- BindingFormattingDialog.cs
- InkSerializer.cs
- DataGridView.cs
- UnsafeMethods.cs
- XmlSerializerFactory.cs
- ObjectRef.cs
- ImageDrawing.cs
- ControlPropertyNameConverter.cs
- ErrorActivity.cs
- CreateUserWizard.cs
- BitmapEffectGroup.cs
- SnapshotChangeTrackingStrategy.cs
- FloaterBaseParaClient.cs
- LocationInfo.cs
- TableAutomationPeer.cs
- MediaElement.cs
- HttpListenerRequest.cs
- DataGridViewSelectedColumnCollection.cs
- SpecialNameAttribute.cs
- VisualBasicSettingsConverter.cs
- DataRecordObjectView.cs
- DeviceContext.cs
- OuterGlowBitmapEffect.cs
- Model3D.cs
- ListBoxAutomationPeer.cs
- ProjectionNode.cs
- QueryRewriter.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- safesecurityhelperavalon.cs
- ProfileGroupSettings.cs
- AspProxy.cs
- StaticFileHandler.cs
- UnmanagedBitmapWrapper.cs
- Action.cs
- EncoderExceptionFallback.cs
- CompiledQuery.cs
- MissingFieldException.cs
- ParentControlDesigner.cs
- SpellerStatusTable.cs
- CharEntityEncoderFallback.cs
- TextCompositionManager.cs
- XmlDocumentSurrogate.cs
- InstanceView.cs
- TrustLevel.cs
- XmlWrappingWriter.cs
- UInt32Converter.cs
- RefreshPropertiesAttribute.cs
- CharStorage.cs
- StateWorkerRequest.cs
- Range.cs
- SyndicationPerson.cs
- SafeEventLogWriteHandle.cs
- Brush.cs
- ArrayTypeMismatchException.cs
- Model3DGroup.cs
- EventHandlerList.cs
- TemplateControl.cs
- XmlIlGenerator.cs
- XD.cs
- PermissionSetTriple.cs
- ToolStripAdornerWindowService.cs
- MembershipSection.cs
- TableLayoutPanelCellPosition.cs
- HttpWebRequestElement.cs
- _TimerThread.cs
- ClassDataContract.cs
- TableLayoutStyleCollection.cs
- Rect3D.cs
- BufferAllocator.cs
- AsyncOperation.cs
- BaseCodeDomTreeGenerator.cs
- ConnectionProviderAttribute.cs
- PingReply.cs
- CreateUserWizardDesigner.cs
- FixedTextPointer.cs
- DefaultEventAttribute.cs
- DocumentSequence.cs
- NativeMethods.cs
- DataObjectCopyingEventArgs.cs
- PLINQETWProvider.cs
- DBAsyncResult.cs
- TextElementCollectionHelper.cs
- AsynchronousChannelMergeEnumerator.cs
- WindowsGraphicsWrapper.cs
- AssemblyCollection.cs
- Light.cs
- PageCodeDomTreeGenerator.cs
- Bits.cs
- XamlWriter.cs
- ScriptManager.cs
- QueryCursorEventArgs.cs
- HtmlControl.cs
- MulticastDelegate.cs
- PartBasedPackageProperties.cs
- ScrollBarAutomationPeer.cs