Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / DataGridAutoGeneratingColumnEventArgs.cs / 1305600 / DataGridAutoGeneratingColumnEventArgs.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Reflection; using System.Text; namespace System.Windows.Controls { ////// The event args class to be used with AutoGeneratingColumn event. /// public class DataGridAutoGeneratingColumnEventArgs : EventArgs { #region Constructors ////// Public constructor /// /// /// /// public DataGridAutoGeneratingColumnEventArgs(string propertyName, Type propertyType, DataGridColumn column) : this(column, propertyName, propertyType, null) { } internal DataGridAutoGeneratingColumnEventArgs(DataGridColumn column, ItemPropertyInfo itemPropertyInfo) : this(column, itemPropertyInfo.Name, itemPropertyInfo.PropertyType, itemPropertyInfo.Descriptor) { } internal DataGridAutoGeneratingColumnEventArgs( DataGridColumn column, string propertyName, Type propertyType, object propertyDescriptor) { _column = column; _propertyName = propertyName; _propertyType = propertyType; PropertyDescriptor = propertyDescriptor; } #endregion #region Properties ////// Column which is being generated /// public DataGridColumn Column { get { return _column; } set { _column = value; } } ////// Property for which the column is getting generated /// public string PropertyName { get { return _propertyName; } } ////// Type of the property for which the column is getting generated /// public Type PropertyType { get { return _propertyType; } } ////// Descriptor of the property for which the column is gettign generated /// public object PropertyDescriptor { get { return _propertyDescriptor; } private set { if (value == null) { _propertyDescriptor = null; } else { Debug.Assert( typeof(PropertyDescriptor).IsAssignableFrom(value.GetType()) || typeof(PropertyInfo).IsAssignableFrom(value.GetType()), "Property descriptor should be either a PropertyDescriptor or a PropertyInfo"); _propertyDescriptor = value; } } } ////// Flag to indicated if generation of this column has to be cancelled /// public bool Cancel { get { return _cancel; } set { _cancel = value; } } #endregion #region Data private DataGridColumn _column; private string _propertyName; private Type _propertyType; private object _propertyDescriptor; private bool _cancel; #endregion } } // 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
- ZipArchive.cs
- FontConverter.cs
- XmlSchemaAll.cs
- Fx.cs
- ProcessModuleCollection.cs
- FeatureSupport.cs
- ParallelDesigner.cs
- PagesSection.cs
- DataSvcMapFileSerializer.cs
- CqlGenerator.cs
- XmlSchemaObjectCollection.cs
- EntityConnection.cs
- TypeDescriptor.cs
- DispatcherFrame.cs
- NotifyCollectionChangedEventArgs.cs
- WinFormsSecurity.cs
- DataGridCommandEventArgs.cs
- ScrollBar.cs
- TypeInitializationException.cs
- Asn1IntegerConverter.cs
- VideoDrawing.cs
- XmlSchemaValidator.cs
- Int16Storage.cs
- Popup.cs
- loginstatus.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- ISO2022Encoding.cs
- DataGridView.cs
- CompatibleIComparer.cs
- DataGridColumnCollection.cs
- TextLineResult.cs
- CriticalExceptions.cs
- _NegoState.cs
- UnicodeEncoding.cs
- XmlSchemaSimpleType.cs
- XmlSerializerNamespaces.cs
- QilPatternVisitor.cs
- AssertFilter.cs
- MultiView.cs
- ConnectionProviderAttribute.cs
- ReadOnlyDataSource.cs
- RemotingConfiguration.cs
- WebHttpSecurityElement.cs
- ConfigXmlDocument.cs
- MediaEntryAttribute.cs
- MaskDescriptor.cs
- CookielessHelper.cs
- SqlBuilder.cs
- CompareInfo.cs
- COM2IDispatchConverter.cs
- PeerIPHelper.cs
- RawStylusActions.cs
- AlgoModule.cs
- CompilerError.cs
- ItemsPanelTemplate.cs
- ConfigDefinitionUpdates.cs
- InvokePattern.cs
- FlowDocumentFormatter.cs
- MDIControlStrip.cs
- DesignerCommandAdapter.cs
- newinstructionaction.cs
- SqlFlattener.cs
- StorageTypeMapping.cs
- ProcessModuleCollection.cs
- DBParameter.cs
- HttpResponseInternalWrapper.cs
- ListViewDesigner.cs
- CacheDependency.cs
- _CommandStream.cs
- ListControl.cs
- ClientSettingsStore.cs
- RichTextBoxAutomationPeer.cs
- TextTreeObjectNode.cs
- TextFindEngine.cs
- XmlText.cs
- BigInt.cs
- SmtpFailedRecipientsException.cs
- XhtmlBasicLabelAdapter.cs
- ObjectStorage.cs
- DataSourceView.cs
- Slider.cs
- Pair.cs
- PreProcessor.cs
- MeasureItemEvent.cs
- DbProviderFactoriesConfigurationHandler.cs
- FragmentNavigationEventArgs.cs
- SortQuery.cs
- CodeArrayIndexerExpression.cs
- EncryptedKeyHashIdentifierClause.cs
- EdmFunctionAttribute.cs
- BufferedStream.cs
- ProviderSettings.cs
- TypeGeneratedEventArgs.cs
- DataTableMapping.cs
- XPathSelfQuery.cs
- TypeLoadException.cs
- TailCallAnalyzer.cs
- DataTableReader.cs
- Int64Animation.cs
- WindowsIdentity.cs