Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / Separator.cs / 1458001 / 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
- ActivityInstance.cs
- HandlerWithFactory.cs
- SafeWaitHandle.cs
- EventHandlerList.cs
- UnsafeNativeMethodsMilCoreApi.cs
- altserialization.cs
- DataGridViewButtonCell.cs
- DBParameter.cs
- ApplicationBuildProvider.cs
- InputReportEventArgs.cs
- DataControlButton.cs
- XPathBinder.cs
- XmlUrlResolver.cs
- XPathEmptyIterator.cs
- DataServiceBuildProvider.cs
- ToolStripScrollButton.cs
- PropertyEmitter.cs
- CacheDict.cs
- ClusterUtils.cs
- _RegBlobWebProxyDataBuilder.cs
- XmlUtf8RawTextWriter.cs
- Opcode.cs
- SchemaDeclBase.cs
- ByteFacetDescriptionElement.cs
- NameTable.cs
- SystemIcmpV4Statistics.cs
- Propagator.JoinPropagator.SubstitutingCloneVisitor.cs
- StorageRoot.cs
- MailMessage.cs
- ToggleProviderWrapper.cs
- EastAsianLunisolarCalendar.cs
- XDRSchema.cs
- SelectingProviderEventArgs.cs
- PersonalizationDictionary.cs
- initElementDictionary.cs
- WpfWebRequestHelper.cs
- FloaterBaseParagraph.cs
- NamespaceEmitter.cs
- CompositeTypefaceMetrics.cs
- InvalidPropValue.cs
- OpCellTreeNode.cs
- EncryptedType.cs
- XmlUtil.cs
- MapPathBasedVirtualPathProvider.cs
- mactripleDES.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- ArrayWithOffset.cs
- KeyTimeConverter.cs
- Validator.cs
- dbenumerator.cs
- Simplifier.cs
- DockPatternIdentifiers.cs
- GeneralTransformGroup.cs
- CompiledQuery.cs
- ReadOnlyAttribute.cs
- TimersDescriptionAttribute.cs
- PolicyConversionContext.cs
- OletxVolatileEnlistment.cs
- Label.cs
- Object.cs
- BamlResourceContent.cs
- CollectionChangeEventArgs.cs
- AssemblyResourceLoader.cs
- InkCanvasSelectionAdorner.cs
- DNS.cs
- DataKeyCollection.cs
- BrowserCapabilitiesFactory.cs
- SvcMapFileLoader.cs
- Interlocked.cs
- ApplicationFileParser.cs
- TextAction.cs
- SynchronizationLockException.cs
- AssemblyAssociatedContentFileAttribute.cs
- OdbcConnectionPoolProviderInfo.cs
- DeploymentExceptionMapper.cs
- SkewTransform.cs
- ContainerVisual.cs
- XmlTextReaderImpl.cs
- Hash.cs
- GC.cs
- InitializationEventAttribute.cs
- ContextMenu.cs
- Matrix3DValueSerializer.cs
- NumberSubstitution.cs
- odbcmetadatacolumnnames.cs
- BoundingRectTracker.cs
- WebPartConnectionsCancelVerb.cs
- XmlConverter.cs
- OleDbTransaction.cs
- DesignerTransactionCloseEvent.cs
- CompositeKey.cs
- ConnectionPointCookie.cs
- TemplatedAdorner.cs
- UnsafeNativeMethods.cs
- SqlStream.cs
- NoClickablePointException.cs
- HierarchicalDataBoundControl.cs
- IPPacketInformation.cs
- DataGridPagerStyle.cs
- UITypeEditors.cs