Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / DataGridColumnDropSeparator.cs / 1305600 / DataGridColumnDropSeparator.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Windows; using System.Windows.Controls.Primitives; using MS.Internal; namespace System.Windows.Controls { ////// The separator used to indicate drop location during column header drag-drop /// internal class DataGridColumnDropSeparator : Separator { #region Constructors static DataGridColumnDropSeparator() { DefaultStyleKeyProperty.OverrideMetadata( typeof(DataGridColumnDropSeparator), new FrameworkPropertyMetadata(DataGridColumnHeader.ColumnHeaderDropSeparatorStyleKey)); WidthProperty.OverrideMetadata( typeof(DataGridColumnDropSeparator), new FrameworkPropertyMetadata(null, new CoerceValueCallback(OnCoerceWidth))); HeightProperty.OverrideMetadata( typeof(DataGridColumnDropSeparator), new FrameworkPropertyMetadata(null, new CoerceValueCallback(OnCoerceHeight))); } #endregion #region Static Methods private static object OnCoerceWidth(DependencyObject d, object baseValue) { double width = (double)baseValue; if (DoubleUtil.IsNaN(width)) { return 2.0; } return baseValue; } private static object OnCoerceHeight(DependencyObject d, object baseValue) { double height = (double)baseValue; DataGridColumnDropSeparator separator = (DataGridColumnDropSeparator)d; if (separator._referenceHeader != null && DoubleUtil.IsNaN(height)) { return separator._referenceHeader.ActualHeight; } return baseValue; } #endregion #region Properties internal DataGridColumnHeader ReferenceHeader { get { return _referenceHeader; } set { _referenceHeader = value; } } #endregion #region Data private DataGridColumnHeader _referenceHeader; #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
- ColorConvertedBitmap.cs
- SiteMapDataSourceView.cs
- DivideByZeroException.cs
- StorageConditionPropertyMapping.cs
- DataListItem.cs
- PtsPage.cs
- FillBehavior.cs
- ClientApiGenerator.cs
- KeyValuePair.cs
- UTF32Encoding.cs
- UnsafeNativeMethods.cs
- DataGridViewSelectedColumnCollection.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- PaperSize.cs
- MetadataSource.cs
- AdornerDecorator.cs
- RegexWorker.cs
- ZoneIdentityPermission.cs
- PrePostDescendentsWalker.cs
- ObjectDataSourceMethodEventArgs.cs
- KnownTypes.cs
- ToggleButtonAutomationPeer.cs
- SerializationFieldInfo.cs
- MaskedTextBoxDesigner.cs
- RelatedPropertyManager.cs
- EntityTypeBase.cs
- LinearGradientBrush.cs
- DirectoryRedirect.cs
- XmlNodeComparer.cs
- AspNetRouteServiceHttpHandler.cs
- ConfigXmlWhitespace.cs
- ContextStack.cs
- FormatException.cs
- DataSourceProvider.cs
- ReadOnlyDataSourceView.cs
- CompModSwitches.cs
- ServiceOperationUIEditor.cs
- SoapAttributes.cs
- TimerElapsedEvenArgs.cs
- LinearKeyFrames.cs
- WindowsFormsLinkLabel.cs
- QilUnary.cs
- DataViewManagerListItemTypeDescriptor.cs
- DataServiceQueryException.cs
- JsonClassDataContract.cs
- ClientEventManager.cs
- NaturalLanguageHyphenator.cs
- HttpWebRequest.cs
- BinaryObjectInfo.cs
- Point3DCollection.cs
- SingleAnimationUsingKeyFrames.cs
- FileUpload.cs
- ToolStripSplitStackLayout.cs
- ExclusiveTcpTransportManager.cs
- recordstatescratchpad.cs
- xsdvalidator.cs
- ObjectNotFoundException.cs
- CheckBoxFlatAdapter.cs
- PageEventArgs.cs
- MetafileHeader.cs
- XmlSerializableServices.cs
- XslException.cs
- JapaneseLunisolarCalendar.cs
- TabletDeviceInfo.cs
- ProxyAttribute.cs
- AddressHeaderCollection.cs
- IgnoreDataMemberAttribute.cs
- SchemaElementDecl.cs
- AnnotationAdorner.cs
- OletxEnlistment.cs
- OutputCacheProfileCollection.cs
- WindowsGraphicsCacheManager.cs
- WebDisplayNameAttribute.cs
- AssemblyAssociatedContentFileAttribute.cs
- ShaderEffect.cs
- CodeCatchClauseCollection.cs
- EntityStoreSchemaFilterEntry.cs
- CornerRadius.cs
- ElementMarkupObject.cs
- GroupLabel.cs
- UpdateCompiler.cs
- UnsafeNativeMethods.cs
- TextSelectionProcessor.cs
- ToolStripStatusLabel.cs
- ConvertersCollection.cs
- RtfToken.cs
- ParsedAttributeCollection.cs
- DynamicResourceExtensionConverter.cs
- EventProxy.cs
- KnownBoxes.cs
- ToolStripSeparatorRenderEventArgs.cs
- DateTimeFormat.cs
- DataViewSetting.cs
- XpsImageSerializationService.cs
- TextFormatterHost.cs
- AsyncPostBackTrigger.cs
- IApplicationTrustManager.cs
- InvalidCommandTreeException.cs
- FontInfo.cs
- ContractTypeNameCollection.cs