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
- Regex.cs
- SchemaElementDecl.cs
- MulticastNotSupportedException.cs
- LateBoundBitmapDecoder.cs
- PublishLicense.cs
- ArglessEventHandlerProxy.cs
- DataKeyArray.cs
- SpellerStatusTable.cs
- IISUnsafeMethods.cs
- keycontainerpermission.cs
- DataGridColumnHeaderCollection.cs
- BrushConverter.cs
- ConnectionProviderAttribute.cs
- Message.cs
- FontDifferentiator.cs
- Convert.cs
- TreeSet.cs
- BufferedGraphicsContext.cs
- ContentOnlyMessage.cs
- Paragraph.cs
- ConcurrentQueue.cs
- WebPartManagerInternals.cs
- CallbackTimeoutsBehavior.cs
- OutputCacheSettings.cs
- ReaderWriterLockWrapper.cs
- AdRotator.cs
- QueryStringHandler.cs
- AnimationTimeline.cs
- SoapMessage.cs
- GiveFeedbackEvent.cs
- SiteMap.cs
- ConvertEvent.cs
- TextRunProperties.cs
- OverflowException.cs
- ResizeGrip.cs
- SspiSafeHandles.cs
- login.cs
- StrokeCollectionDefaultValueFactory.cs
- AttributeSetAction.cs
- GPRECT.cs
- SchemaReference.cs
- ResetableIterator.cs
- TypedOperationInfo.cs
- DependencyPropertyConverter.cs
- _BufferOffsetSize.cs
- ImageAttributes.cs
- XmlImplementation.cs
- SourceItem.cs
- MemberRestriction.cs
- SqlDataAdapter.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- MessageBox.cs
- COSERVERINFO.cs
- DataGridCaption.cs
- AnyReturnReader.cs
- ObjectQueryProvider.cs
- OleDbDataAdapter.cs
- ColorPalette.cs
- CategoryValueConverter.cs
- EventProviderWriter.cs
- ResourceExpressionBuilder.cs
- UnionExpr.cs
- SystemDiagnosticsSection.cs
- TextEditorSpelling.cs
- CodeDefaultValueExpression.cs
- Tuple.cs
- ServerValidateEventArgs.cs
- Rectangle.cs
- Item.cs
- InputLanguage.cs
- LocalizableAttribute.cs
- ObjectReaderCompiler.cs
- RedBlackList.cs
- PartialToken.cs
- SystemColors.cs
- ParenthesizePropertyNameAttribute.cs
- sqlcontext.cs
- CompressEmulationStream.cs
- MessageHeaderAttribute.cs
- RequestQueryParser.cs
- HostExecutionContextManager.cs
- BitmapEffectOutputConnector.cs
- XamlTypeMapperSchemaContext.cs
- CategoryGridEntry.cs
- DependencyObjectProvider.cs
- DateBoldEvent.cs
- Predicate.cs
- SmtpReplyReader.cs
- Set.cs
- UnSafeCharBuffer.cs
- SmiRecordBuffer.cs
- OleDbReferenceCollection.cs
- StringReader.cs
- MemberMemberBinding.cs
- LookupNode.cs
- XmlQueryContext.cs
- ServerTooBusyException.cs
- DeadCharTextComposition.cs
- SchemaImporterExtensionElement.cs
- TreeViewImageKeyConverter.cs