Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / DataGridItemAttachedStorage.cs / 1305600 / DataGridItemAttachedStorage.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Windows; namespace System.Windows.Controls { ////// Holds all of the information that we need to attach to row items so that we can restore rows when they're devirtualized. /// internal class DataGridItemAttachedStorage { public void SetValue(object item, DependencyProperty property, object value) { var map = EnsureItem(item); map[property] = value; } public bool TryGetValue(object item, DependencyProperty property, out object value) { value = null; Dictionarymap; EnsureItemStorageMap(); if (_itemStorageMap.TryGetValue(item, out map)) { return map.TryGetValue(property, out value); } return false; } public void ClearValue(object item, DependencyProperty property) { Dictionary map; EnsureItemStorageMap(); if (_itemStorageMap.TryGetValue(item, out map)) { map.Remove(property); } } public void ClearItem(object item) { EnsureItemStorageMap(); _itemStorageMap.Remove(item); } public void Clear() { _itemStorageMap = null; } private void EnsureItemStorageMap() { if (_itemStorageMap == null) { _itemStorageMap = new Dictionary
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Cursor.cs
- BaseProcessor.cs
- SequentialUshortCollection.cs
- SqlDuplicator.cs
- SeekStoryboard.cs
- HttpProxyTransportBindingElement.cs
- ControlIdConverter.cs
- SingleBodyParameterMessageFormatter.cs
- BuildResult.cs
- SqlLiftWhereClauses.cs
- ResourcesBuildProvider.cs
- DockAndAnchorLayout.cs
- XamlStyleSerializer.cs
- ResourceType.cs
- XsltArgumentList.cs
- IndexedGlyphRun.cs
- MsmqTransportBindingElement.cs
- IteratorDescriptor.cs
- XpsTokenContext.cs
- ReadOnlyNameValueCollection.cs
- GetImportedCardRequest.cs
- TransactedReceiveData.cs
- XmlDictionaryString.cs
- CapabilitiesSection.cs
- EntityProviderFactory.cs
- LicenseException.cs
- VariantWrapper.cs
- TraceSection.cs
- TextDecoration.cs
- FileNameEditor.cs
- ColumnCollection.cs
- VirtualPath.cs
- Util.cs
- NumericUpDownAcceleration.cs
- XmlNodeReader.cs
- DocumentPageTextView.cs
- DataGridViewCellParsingEventArgs.cs
- WebPartMovingEventArgs.cs
- RegexMatch.cs
- OleDbWrapper.cs
- UpdateException.cs
- HtmlInputText.cs
- InstanceDataCollection.cs
- Keywords.cs
- FtpRequestCacheValidator.cs
- InlineObject.cs
- ColumnMapVisitor.cs
- Vector3DAnimationUsingKeyFrames.cs
- RadioButton.cs
- PageRequestManager.cs
- ToolStripPanel.cs
- EmitterCache.cs
- Model3DCollection.cs
- HttpCapabilitiesEvaluator.cs
- ShapingEngine.cs
- DPAPIProtectedConfigurationProvider.cs
- ButtonRenderer.cs
- XPathDocumentIterator.cs
- CalendarDateRangeChangingEventArgs.cs
- _AutoWebProxyScriptWrapper.cs
- SerializableAttribute.cs
- SspiHelper.cs
- ColorContextHelper.cs
- ActiveDocumentEvent.cs
- StrongTypingException.cs
- DbRetry.cs
- ButtonBase.cs
- HashRepartitionStream.cs
- Size3D.cs
- DataTablePropertyDescriptor.cs
- ImagingCache.cs
- WindowVisualStateTracker.cs
- MetadataSection.cs
- RTTypeWrapper.cs
- DivideByZeroException.cs
- Point3DKeyFrameCollection.cs
- MenuItemStyleCollectionEditor.cs
- PeerCredential.cs
- ModelItemExtensions.cs
- SqlDataSourceEnumerator.cs
- SafeRightsManagementPubHandle.cs
- EntityDataSourceReferenceGroup.cs
- HtmlTable.cs
- ListViewPagedDataSource.cs
- Processor.cs
- GenericIdentity.cs
- RtType.cs
- ComplexPropertyEntry.cs
- CodeAttributeArgumentCollection.cs
- TranslateTransform3D.cs
- DefaultMemberAttribute.cs
- DesignOnlyAttribute.cs
- sqlinternaltransaction.cs
- RightsManagementUser.cs
- TraceUtility.cs
- MetadataArtifactLoaderComposite.cs
- ContainerUIElement3D.cs
- TextEndOfLine.cs
- WorkflowInstanceQuery.cs
- InvalidFilterCriteriaException.cs