Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / DeferredSelectedIndexReference.cs / 1305600 / 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
- ControlCollection.cs
- CanExecuteRoutedEventArgs.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- ExtensibleClassFactory.cs
- FileChangesMonitor.cs
- SerialPinChanges.cs
- AssemblyInfo.cs
- ProviderManager.cs
- BinarySerializer.cs
- XmlSiteMapProvider.cs
- Frame.cs
- UIElement3DAutomationPeer.cs
- WebReferenceCollection.cs
- SymmetricKeyWrap.cs
- PropertyDescriptorGridEntry.cs
- DispatchWrapper.cs
- HtmlLink.cs
- InvalidPropValue.cs
- SystemIPAddressInformation.cs
- GACIdentityPermission.cs
- EventLogPropertySelector.cs
- StringValueSerializer.cs
- MenuItemBindingCollection.cs
- SpecularMaterial.cs
- PartialList.cs
- DataGridViewColumnCollection.cs
- CryptoApi.cs
- DataControlFieldHeaderCell.cs
- PanelStyle.cs
- DataRecordInternal.cs
- SemaphoreFullException.cs
- EntityFunctions.cs
- Transform3D.cs
- MsmqHostedTransportConfiguration.cs
- EventDescriptor.cs
- ObjectDataSourceEventArgs.cs
- AsnEncodedData.cs
- AnonymousIdentificationModule.cs
- LabelDesigner.cs
- DiscoveryInnerClientAdhocCD1.cs
- PrintController.cs
- AspCompat.cs
- EntityProviderFactory.cs
- DtdParser.cs
- XmlObjectSerializer.cs
- UnsafeNativeMethodsMilCoreApi.cs
- StrongBox.cs
- PaintEvent.cs
- RangeBase.cs
- SByteConverter.cs
- NativeDirectoryServicesQueryAPIs.cs
- SqlDataSource.cs
- ServiceHandle.cs
- StreamWriter.cs
- AttributeCollection.cs
- FormatterServices.cs
- PageStatePersister.cs
- RtfNavigator.cs
- WindowsTab.cs
- _NtlmClient.cs
- WebBrowserPermission.cs
- FastPropertyAccessor.cs
- CoordinationService.cs
- ReadOnlyObservableCollection.cs
- PersonalizationState.cs
- MaterialCollection.cs
- GroupedContextMenuStrip.cs
- DateTimeConverter.cs
- VirtualDirectoryMapping.cs
- OleServicesContext.cs
- TreeNodeEventArgs.cs
- NativeMethods.cs
- CompilerWrapper.cs
- SystemDiagnosticsSection.cs
- BulletedListEventArgs.cs
- SubMenuStyle.cs
- TypeLibraryHelper.cs
- BamlCollectionHolder.cs
- RawStylusInput.cs
- FreezableDefaultValueFactory.cs
- StylusPointPropertyInfoDefaults.cs
- TreeNodeEventArgs.cs
- SelectionProcessor.cs
- EventSetter.cs
- SafeMemoryMappedFileHandle.cs
- ItemDragEvent.cs
- XMLUtil.cs
- ComplexObject.cs
- OracleConnectionFactory.cs
- ClientData.cs
- SchemaElement.cs
- XmlSchemaChoice.cs
- GridItemPatternIdentifiers.cs
- CodeMethodReturnStatement.cs
- WebPartZone.cs
- WindowsImpersonationContext.cs
- ipaddressinformationcollection.cs
- Composition.cs
- SqlCacheDependencyDatabase.cs
- MetadataItemSerializer.cs