Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- URLMembershipCondition.cs
- EntityTransaction.cs
- ClientSettingsProvider.cs
- TokenCreationException.cs
- DataGridSortCommandEventArgs.cs
- serverconfig.cs
- SessionEndedEventArgs.cs
- QueryPageSettingsEventArgs.cs
- Membership.cs
- DoubleAverageAggregationOperator.cs
- WindowsListBox.cs
- RuntimeIdentifierPropertyAttribute.cs
- ConsoleCancelEventArgs.cs
- HwndSource.cs
- HttpCacheParams.cs
- FilterFactory.cs
- TokenizerHelper.cs
- MSAAEventDispatcher.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- SvcMapFileSerializer.cs
- RenamedEventArgs.cs
- SerializerDescriptor.cs
- ResourcePool.cs
- CmsUtils.cs
- Input.cs
- UIElement3DAutomationPeer.cs
- CalendarDay.cs
- DropSource.cs
- ProgressBarRenderer.cs
- MessageBuffer.cs
- LicenseProviderAttribute.cs
- DbResourceAllocator.cs
- ItemCheckEvent.cs
- XmlSerializerSection.cs
- PropertyCondition.cs
- DataBoundControlHelper.cs
- DataGridViewCheckBoxCell.cs
- OdbcInfoMessageEvent.cs
- ModelTreeEnumerator.cs
- PropertyIdentifier.cs
- SolidColorBrush.cs
- GridItemPatternIdentifiers.cs
- MemberProjectedSlot.cs
- SoapMessage.cs
- ColorDialog.cs
- AnnouncementInnerClient11.cs
- Compress.cs
- _SingleItemRequestCache.cs
- ImageInfo.cs
- OleDbError.cs
- XmlProcessingInstruction.cs
- ConfigurationStrings.cs
- FileDataSourceCache.cs
- DirectoryObjectSecurity.cs
- IncrementalCompileAnalyzer.cs
- MexHttpsBindingCollectionElement.cs
- DeclarativeConditionsCollection.cs
- DataTableClearEvent.cs
- UserControl.cs
- MenuItemAutomationPeer.cs
- DataKey.cs
- BufferedGraphics.cs
- CssStyleCollection.cs
- SplitContainer.cs
- XPathDocument.cs
- BasicKeyConstraint.cs
- DPCustomTypeDescriptor.cs
- RoleServiceManager.cs
- DataGridViewControlCollection.cs
- GridViewCommandEventArgs.cs
- DataSet.cs
- StylusPointCollection.cs
- PeerResolverElement.cs
- DBNull.cs
- TemplateDefinition.cs
- Base64WriteStateInfo.cs
- FilterException.cs
- XmlHierarchicalEnumerable.cs
- TypeElement.cs
- EncodingNLS.cs
- DTCTransactionManager.cs
- Padding.cs
- GuidelineCollection.cs
- PeerNodeAddress.cs
- SqlTransaction.cs
- LingerOption.cs
- ApplicationCommands.cs
- MLangCodePageEncoding.cs
- TakeOrSkipWhileQueryOperator.cs
- webbrowsersite.cs
- PowerModeChangedEventArgs.cs
- DrawingGroup.cs
- VideoDrawing.cs
- CrossSiteScriptingValidation.cs
- X509AsymmetricSecurityKey.cs
- FtpWebRequest.cs
- PartialCachingAttribute.cs
- LoadItemsEventArgs.cs
- Group.cs
- AlternateView.cs