Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / DataGridRowClipboardEventArgs.cs / 1305600 / DataGridRowClipboardEventArgs.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Text; namespace System.Windows.Controls { ////// This class encapsulates a selected row information necessary for CopyingRowClipboardContent event /// public class DataGridRowClipboardEventArgs : EventArgs { ////// Creates DataGridRowClipboardEventArgs object initializing the properties. /// /// /// /// /// public DataGridRowClipboardEventArgs(object item, int startColumnDisplayIndex, int endColumnDisplayIndex, bool isColumnHeadersRow) { _item = item; _startColumnDisplayIndex = startColumnDisplayIndex; _endColumnDisplayIndex = endColumnDisplayIndex; _isColumnHeadersRow = isColumnHeadersRow; } internal DataGridRowClipboardEventArgs(object item, int startColumnDisplayIndex, int endColumnDisplayIndex, bool isColumnHeadersRow, int rowIndexHint) : this(item, startColumnDisplayIndex, endColumnDisplayIndex, isColumnHeadersRow) { _rowIndexHint = rowIndexHint; } ////// DataGrid row item for which we prepare ClipboardRowContent /// public object Item { get { return _item; } } ////// This list should be used to modify, add ot remove a cell content before it gets stored into the clipboard. /// public ListClipboardRowContent { get { if (_clipboardRowContent == null) { _clipboardRowContent = new List (); } return _clipboardRowContent; } } /// /// This method serialize ClipboardRowContent list into string using the specified format. /// /// ///public string FormatClipboardCellValues(string format) { StringBuilder sb = new StringBuilder(); int count = ClipboardRowContent.Count; for (int i = 0; i < count; i++) { DataGridClipboardHelper.FormatCell(ClipboardRowContent[i].Content, i == 0 /* firstCell */, i == count - 1 /* lastCell */, sb, format); } return sb.ToString(); } /// /// Represents the DisplayIndex of the first selected column /// public int StartColumnDisplayIndex { get { return _startColumnDisplayIndex; } } ////// Represents the DisplayIndex of the last selected column /// public int EndColumnDisplayIndex { get { return _endColumnDisplayIndex; } } ////// This property is true when the ClipboardRowContent represents column headers. In this case Item is null. /// public bool IsColumnHeadersRow { get { return _isColumnHeadersRow; } } ////// If the row index was known at creation time, this will be non-negative. /// internal int RowIndexHint { get { return _rowIndexHint; } } private int _startColumnDisplayIndex; private int _endColumnDisplayIndex; private object _item; private bool _isColumnHeadersRow; private List_clipboardRowContent; private int _rowIndexHint = -1; } } // 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
- SQLRoleProvider.cs
- ConfigsHelper.cs
- Exceptions.cs
- RegexRunner.cs
- DataFieldEditor.cs
- NavigatorInput.cs
- TcpConnectionPool.cs
- OleDbException.cs
- ClientOptions.cs
- JapaneseLunisolarCalendar.cs
- LinkButton.cs
- DictionaryCustomTypeDescriptor.cs
- Substitution.cs
- TransformerTypeCollection.cs
- LayoutEngine.cs
- UrlAuthFailedErrorFormatter.cs
- dbenumerator.cs
- Convert.cs
- XsdValidatingReader.cs
- SmtpReplyReader.cs
- SerializationBinder.cs
- StringTraceRecord.cs
- CollectionBuilder.cs
- StaticExtension.cs
- ColorPalette.cs
- Substitution.cs
- EngineSiteSapi.cs
- WindowsSysHeader.cs
- StylusPointProperties.cs
- SelectorAutomationPeer.cs
- DataTableReaderListener.cs
- ItemContainerPattern.cs
- SecurityTokenException.cs
- FixedDocument.cs
- AnnotationAdorner.cs
- TypeBrowserDialog.cs
- StackBuilderSink.cs
- UserCancellationException.cs
- DocumentXmlWriter.cs
- RawStylusInputReport.cs
- CaseStatementSlot.cs
- Separator.cs
- GradientStopCollection.cs
- MultiPropertyDescriptorGridEntry.cs
- RuleSettingsCollection.cs
- TextRunCacheImp.cs
- CompModSwitches.cs
- SqlWorkflowPersistenceService.cs
- AmbientValueAttribute.cs
- XslCompiledTransform.cs
- WebPartDisplayModeCancelEventArgs.cs
- KeyInterop.cs
- ControlBindingsCollection.cs
- DayRenderEvent.cs
- IgnoreDataMemberAttribute.cs
- SqlUdtInfo.cs
- CommandManager.cs
- HttpHandler.cs
- GenericXmlSecurityTokenAuthenticator.cs
- BinaryOperationBinder.cs
- MatrixTransform.cs
- EdgeProfileValidation.cs
- Compiler.cs
- CompositeFontInfo.cs
- TagMapCollection.cs
- DBSchemaTable.cs
- Emitter.cs
- TextEditor.cs
- LinqDataSourceView.cs
- AdornerDecorator.cs
- BitmapEffectInputData.cs
- ReadOnlyCollectionBuilder.cs
- ByteAnimationUsingKeyFrames.cs
- BitmapDownload.cs
- LocatorPartList.cs
- FixUpCollection.cs
- ISAPIApplicationHost.cs
- PixelFormat.cs
- WorkflowViewStateService.cs
- PointUtil.cs
- XPathPatternParser.cs
- ObjectSecurity.cs
- MethodToken.cs
- _Connection.cs
- ZipIOModeEnforcingStream.cs
- BinHexDecoder.cs
- ListInitExpression.cs
- ConnectionPoolManager.cs
- AttachedAnnotation.cs
- InvalidAsynchronousStateException.cs
- PolicyManager.cs
- PriorityQueue.cs
- ReadOnlyTernaryTree.cs
- ConcurrentDictionary.cs
- _ChunkParse.cs
- FilterElement.cs
- RuntimeConfigLKG.cs
- OdbcStatementHandle.cs
- TextParagraphProperties.cs
- FixedSOMTableRow.cs