Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- VolatileResourceManager.cs
- ResourcePermissionBase.cs
- MultipartContentParser.cs
- BuildProvider.cs
- PackagingUtilities.cs
- WebServiceEnumData.cs
- AliasedSlot.cs
- BookmarkEventArgs.cs
- JsonClassDataContract.cs
- RemoteWebConfigurationHostServer.cs
- XmlTypeAttribute.cs
- Crypto.cs
- SqlConnectionString.cs
- XmlDocumentFieldSchema.cs
- PaintValueEventArgs.cs
- InvalidContentTypeException.cs
- GZipDecoder.cs
- HtmlString.cs
- X509ChainPolicy.cs
- XmlSchemaInfo.cs
- BamlMapTable.cs
- AsymmetricAlgorithm.cs
- DialogDivider.cs
- SuspendDesigner.cs
- XmlAnyAttributeAttribute.cs
- LinkedList.cs
- ApplicationServiceManager.cs
- XhtmlConformanceSection.cs
- PolicyChain.cs
- selecteditemcollection.cs
- EncryptedPackage.cs
- ByteStack.cs
- SiblingIterators.cs
- HtmlTableRow.cs
- StaticExtension.cs
- WorkflowInlining.cs
- XmlNodeReader.cs
- Underline.cs
- OperationSelectorBehavior.cs
- ActiveDocumentEvent.cs
- SoapAttributes.cs
- HierarchicalDataBoundControlAdapter.cs
- TargetPerspective.cs
- ObservableDictionary.cs
- MouseButton.cs
- BoundField.cs
- StructuredTypeInfo.cs
- MessageQueueCriteria.cs
- PartialCachingControl.cs
- EncryptedData.cs
- ResourceProperty.cs
- UIHelper.cs
- CapabilitiesUse.cs
- UnitySerializationHolder.cs
- HelpProvider.cs
- NetworkStream.cs
- Pen.cs
- GenericIdentity.cs
- ControlCommandSet.cs
- PropertyGridCommands.cs
- TypeDependencyAttribute.cs
- FilteredAttributeCollection.cs
- WindowsStartMenu.cs
- BuildProviderCollection.cs
- CacheMemory.cs
- UserNameSecurityToken.cs
- FontEmbeddingManager.cs
- FloaterBaseParagraph.cs
- AlternateViewCollection.cs
- KeyConverter.cs
- NavigationProgressEventArgs.cs
- SequenceFullException.cs
- GiveFeedbackEvent.cs
- PixelFormats.cs
- DoubleLink.cs
- WindowsToolbarItemAsMenuItem.cs
- HijriCalendar.cs
- SimpleModelProvider.cs
- EncoderReplacementFallback.cs
- IApplicationTrustManager.cs
- FormsAuthenticationEventArgs.cs
- SqlStream.cs
- ObjectDataSourceDisposingEventArgs.cs
- ToolBarButton.cs
- LogEntrySerializer.cs
- UpdateCompiler.cs
- DefaultProxySection.cs
- ContextMenu.cs
- UInt16.cs
- NativeMethodsOther.cs
- RenderingEventArgs.cs
- TreeView.cs
- XmlSchemaComplexContentRestriction.cs
- MarkupCompilePass2.cs
- CallbackBehaviorAttribute.cs
- Asn1IntegerConverter.cs
- FilterException.cs
- CodeSnippetTypeMember.cs
- ResourceKey.cs
- EllipticalNodeOperations.cs