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
- ApplicationFileCodeDomTreeGenerator.cs
- ColorAnimationUsingKeyFrames.cs
- SubpageParagraph.cs
- CorrelationTokenInvalidatedHandler.cs
- TypeResolvingOptionsAttribute.cs
- EnumerableWrapperWeakToStrong.cs
- FamilyTypefaceCollection.cs
- EntityTypeEmitter.cs
- FormattedTextSymbols.cs
- AuthenticationException.cs
- SR.cs
- Transform3D.cs
- XmlNamedNodeMap.cs
- Polygon.cs
- BaseDataList.cs
- RequiredAttributeAttribute.cs
- DesignTimeValidationFeature.cs
- DataListComponentEditor.cs
- Utils.cs
- EdmPropertyAttribute.cs
- QueryConverter.cs
- SystemUnicastIPAddressInformation.cs
- CounterSetInstance.cs
- EventLogPermissionHolder.cs
- ContainsRowNumberChecker.cs
- BlobPersonalizationState.cs
- _LazyAsyncResult.cs
- DbParameterCollectionHelper.cs
- PanelDesigner.cs
- HttpResponseWrapper.cs
- FontNameConverter.cs
- DataControlCommands.cs
- ColorPalette.cs
- TextLineResult.cs
- ToolBarDesigner.cs
- EntityContainer.cs
- SecureUICommand.cs
- BitmapEffectDrawingContextWalker.cs
- XmlDomTextWriter.cs
- DataGridViewUtilities.cs
- MouseEvent.cs
- PermissionAttributes.cs
- TableRowsCollectionEditor.cs
- RtfControls.cs
- Thickness.cs
- SqlFileStream.cs
- DbProviderFactory.cs
- UnauthorizedWebPart.cs
- UIHelper.cs
- CaseInsensitiveOrdinalStringComparer.cs
- WinFormsSecurity.cs
- HttpModuleCollection.cs
- PagesSection.cs
- LayoutTableCell.cs
- ChtmlFormAdapter.cs
- CaseInsensitiveHashCodeProvider.cs
- DesignerLoader.cs
- ImageMapEventArgs.cs
- Formatter.cs
- Utils.cs
- MessageQueuePermissionEntryCollection.cs
- MachineSettingsSection.cs
- Function.cs
- WindowsListViewItem.cs
- StaticContext.cs
- FileClassifier.cs
- ApplicationContext.cs
- UnsafeNativeMethods.cs
- CopyNodeSetAction.cs
- _AutoWebProxyScriptHelper.cs
- BeginStoryboard.cs
- FieldAccessException.cs
- TextDecorationCollection.cs
- LocationReference.cs
- DataGridViewCellStateChangedEventArgs.cs
- XamlRtfConverter.cs
- EntityClassGenerator.cs
- EntityDataSourceState.cs
- FieldDescriptor.cs
- UnrecognizedAssertionsBindingElement.cs
- Internal.cs
- WebPartMenuStyle.cs
- FormsAuthenticationTicket.cs
- WebServiceParameterData.cs
- Baml2006ReaderFrame.cs
- WebServiceHandler.cs
- ObjectIDGenerator.cs
- JournalEntryListConverter.cs
- ConfigXmlWhitespace.cs
- Literal.cs
- CommonDialog.cs
- CellConstant.cs
- XPathNodePointer.cs
- BlurEffect.cs
- XmlSerializerVersionAttribute.cs
- LockedAssemblyCache.cs
- SqlInternalConnectionSmi.cs
- OleDbConnectionFactory.cs
- AssemblyBuilder.cs
- XmlStrings.cs