Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Controls / Separator.cs / 1 / Separator.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using MS.Internal.KnownBoxes; using System.Windows.Automation.Peers; namespace System.Windows.Controls { ////// Separator control is a simple Control subclass that is used in different styles /// depend on container control. Common usage is inside ListBox, ComboBox, MenuItem and ToolBar. /// [Localizability(LocalizationCategory.None, Readability = Readability.Unreadable)] // cannot be read & localized as string public class Separator : Control { static Separator() { DefaultStyleKeyProperty.OverrideMetadata(typeof(Separator), new FrameworkPropertyMetadata(typeof(Separator))); _dType = DependencyObjectType.FromSystemTypeInternal(typeof(Separator)); IsEnabledProperty.OverrideMetadata(typeof(Separator), new FrameworkPropertyMetadata(BooleanBoxes.FalseBox)); } internal static void PrepareContainer(Control container) { if (container != null) { // Disable the control and set the alignment to stretch container.IsEnabled = false; container.HorizontalContentAlignment = HorizontalAlignment.Stretch; } } ////// Creates AutomationPeer ( protected override AutomationPeer OnCreateAutomationPeer() { return new SeparatorAutomationPeer(this); } #region DTypeThemeStyleKey // Returns the DependencyObjectType for the registered ThemeStyleKey's default // value. Controls will override this method to return approriate types. internal override DependencyObjectType DTypeThemeStyleKey { get { return _dType; } } private static DependencyObjectType _dType; #endregion DTypeThemeStyleKey } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using MS.Internal.KnownBoxes; using System.Windows.Automation.Peers; namespace System.Windows.Controls { ///) /// /// Separator control is a simple Control subclass that is used in different styles /// depend on container control. Common usage is inside ListBox, ComboBox, MenuItem and ToolBar. /// [Localizability(LocalizationCategory.None, Readability = Readability.Unreadable)] // cannot be read & localized as string public class Separator : Control { static Separator() { DefaultStyleKeyProperty.OverrideMetadata(typeof(Separator), new FrameworkPropertyMetadata(typeof(Separator))); _dType = DependencyObjectType.FromSystemTypeInternal(typeof(Separator)); IsEnabledProperty.OverrideMetadata(typeof(Separator), new FrameworkPropertyMetadata(BooleanBoxes.FalseBox)); } internal static void PrepareContainer(Control container) { if (container != null) { // Disable the control and set the alignment to stretch container.IsEnabled = false; container.HorizontalContentAlignment = HorizontalAlignment.Stretch; } } ////// Creates AutomationPeer ( protected override AutomationPeer OnCreateAutomationPeer() { return new SeparatorAutomationPeer(this); } #region DTypeThemeStyleKey // Returns the DependencyObjectType for the registered ThemeStyleKey's default // value. Controls will override this method to return approriate types. internal override DependencyObjectType DTypeThemeStyleKey { get { return _dType; } } private static DependencyObjectType _dType; #endregion DTypeThemeStyleKey } } // 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
- NotSupportedException.cs
- ArrayTypeMismatchException.cs
- AdRotatorDesigner.cs
- ICspAsymmetricAlgorithm.cs
- NullableDoubleAverageAggregationOperator.cs
- ColumnWidthChangedEvent.cs
- CodeSubDirectoriesCollection.cs
- StoragePropertyMapping.cs
- SqlDependencyListener.cs
- SmtpDigestAuthenticationModule.cs
- OptimalBreakSession.cs
- PipelineModuleStepContainer.cs
- WrappedIUnknown.cs
- TextEditorDragDrop.cs
- HandleTable.cs
- COM2ExtendedBrowsingHandler.cs
- FrameworkTemplate.cs
- SqlMethodAttribute.cs
- SizeAnimationBase.cs
- PixelShader.cs
- WebPartConnectionsConfigureVerb.cs
- EnglishPluralizationService.cs
- DynamicEndpoint.cs
- NamedPipeProcessProtocolHandler.cs
- DocumentViewerHelper.cs
- HtmlSelect.cs
- WebPartPersonalization.cs
- IgnorePropertiesAttribute.cs
- RegionIterator.cs
- RNGCryptoServiceProvider.cs
- DataGridTablesFactory.cs
- TimeIntervalCollection.cs
- SafeProcessHandle.cs
- ScrollItemPattern.cs
- MultiSelectRootGridEntry.cs
- XmlComplianceUtil.cs
- DataServiceConfiguration.cs
- SQLBinaryStorage.cs
- RubberbandSelector.cs
- EnumerableRowCollection.cs
- PeerApplication.cs
- WebRequestModuleElementCollection.cs
- TextEditorThreadLocalStore.cs
- ThrowOnMultipleAssignment.cs
- XmlSerializerVersionAttribute.cs
- DocumentationServerProtocol.cs
- HttpModuleActionCollection.cs
- XsltCompileContext.cs
- Soap11ServerProtocol.cs
- ObjectManager.cs
- QueryResults.cs
- LoginName.cs
- EditCommandColumn.cs
- Size.cs
- RegexRunner.cs
- Imaging.cs
- LocalFileSettingsProvider.cs
- CryptoConfig.cs
- UnsafeNativeMethods.cs
- HttpHandlerActionCollection.cs
- DataGridViewCellCancelEventArgs.cs
- XmlObjectSerializerContext.cs
- WindowShowOrOpenTracker.cs
- AppDomainUnloadedException.cs
- ComponentResourceManager.cs
- CodeFieldReferenceExpression.cs
- TemplateField.cs
- RuntimeConfigLKG.cs
- SHA384.cs
- ContentPosition.cs
- RowSpanVector.cs
- ProcessThreadDesigner.cs
- ConfigurationCollectionAttribute.cs
- ColumnResizeAdorner.cs
- BrushValueSerializer.cs
- ValidationService.cs
- GeometryCollection.cs
- ApplicationFileParser.cs
- validationstate.cs
- BamlResourceContent.cs
- SymbolTable.cs
- EastAsianLunisolarCalendar.cs
- EventPropertyMap.cs
- TypeDescriptionProviderAttribute.cs
- DataGridViewColumnHeaderCell.cs
- EntityDescriptor.cs
- SymbolPair.cs
- DataGridLinkButton.cs
- WindowsRegion.cs
- TdsParserSafeHandles.cs
- UserControlDesigner.cs
- ClientFormsIdentity.cs
- SourceChangedEventArgs.cs
- PriorityQueue.cs
- IODescriptionAttribute.cs
- HandoffBehavior.cs
- HiddenFieldPageStatePersister.cs
- TakeOrSkipQueryOperator.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- ImagingCache.cs