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
- ProfileInfo.cs
- CounterCreationData.cs
- diagnosticsswitches.cs
- PhysicalFontFamily.cs
- Label.cs
- DesignObjectWrapper.cs
- WebServicesDescriptionAttribute.cs
- HttpModulesSection.cs
- DNS.cs
- BaseAddressElementCollection.cs
- OverlappedAsyncResult.cs
- DataGridCell.cs
- AudioSignalProblemOccurredEventArgs.cs
- SecurityCapabilities.cs
- ToolboxItem.cs
- Brushes.cs
- DataObjectEventArgs.cs
- EntityContainerEntitySetDefiningQuery.cs
- RadialGradientBrush.cs
- SqlTrackingQuery.cs
- RowParagraph.cs
- WebPartZoneCollection.cs
- SQLInt64.cs
- DiscoveryVersionConverter.cs
- BindingExpression.cs
- RemoteWebConfigurationHostServer.cs
- ExtensibleClassFactory.cs
- ApplicationDirectoryMembershipCondition.cs
- Dictionary.cs
- DependencyObjectCodeDomSerializer.cs
- PauseStoryboard.cs
- LeftCellWrapper.cs
- WindowsListViewSubItem.cs
- ObjectPersistData.cs
- XslCompiledTransform.cs
- XmlRawWriter.cs
- CapabilitiesSection.cs
- MultiSelectRootGridEntry.cs
- ControlParameter.cs
- MethodToken.cs
- ObfuscationAttribute.cs
- WebPartZoneBase.cs
- EnumCodeDomSerializer.cs
- RowToParametersTransformer.cs
- XmlSchemaComplexContent.cs
- DirectoryObjectSecurity.cs
- OdbcCommand.cs
- COM2ExtendedBrowsingHandler.cs
- BuilderPropertyEntry.cs
- CreateUserWizard.cs
- FunctionImportElement.cs
- SecurityDocument.cs
- HttpApplicationFactory.cs
- BitmapEffectInputData.cs
- ProcessExitedException.cs
- Enumerable.cs
- LineServicesRun.cs
- processwaithandle.cs
- ObjectStateManager.cs
- InfiniteIntConverter.cs
- ObjectViewQueryResultData.cs
- PathGeometry.cs
- ReferenceConverter.cs
- ExtentJoinTreeNode.cs
- ReadOnlyDataSourceView.cs
- QilBinary.cs
- AstTree.cs
- PackWebResponse.cs
- RichListBox.cs
- ColorConverter.cs
- OracleDateTime.cs
- AssemblyUtil.cs
- SoapServerMessage.cs
- NamespaceEmitter.cs
- RowVisual.cs
- Selection.cs
- WebPartAddingEventArgs.cs
- Switch.cs
- DBCommand.cs
- XmlTextReader.cs
- Point3DAnimation.cs
- HttpProfileGroupBase.cs
- InternalConfigHost.cs
- ContentPlaceHolderDesigner.cs
- XMLDiffLoader.cs
- ElementsClipboardData.cs
- ExpressionBuilder.cs
- ArrayEditor.cs
- ConfigUtil.cs
- XmlSchemaAnnotated.cs
- SqlDataSourceSelectingEventArgs.cs
- XsdBuildProvider.cs
- ObjectManager.cs
- RuleCache.cs
- SiteMapNodeItemEventArgs.cs
- RouteData.cs
- StorageFunctionMapping.cs
- DropShadowBitmapEffect.cs
- DataSourceXmlSerializationAttribute.cs
- ConfigurationValue.cs