Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- FunctionNode.cs
- WindowsListViewGroupHelper.cs
- PasswordTextContainer.cs
- ServicePointManagerElement.cs
- ValueType.cs
- ZoneIdentityPermission.cs
- ItemsChangedEventArgs.cs
- ScriptingAuthenticationServiceSection.cs
- BaseDataListPage.cs
- Size3D.cs
- DataServiceContext.cs
- List.cs
- PersistenceTypeAttribute.cs
- ServicePoint.cs
- RC2.cs
- IgnoreDataMemberAttribute.cs
- TextContainerChangeEventArgs.cs
- SendMailErrorEventArgs.cs
- CellTreeNode.cs
- DefinitionUpdate.cs
- ExpressionPrefixAttribute.cs
- WorkflowPageSetupDialog.cs
- DataColumnMappingCollection.cs
- OleDbConnectionInternal.cs
- OrderedEnumerableRowCollection.cs
- SchemaConstraints.cs
- DataException.cs
- Attributes.cs
- ProfileSection.cs
- DesignerCategoryAttribute.cs
- WindowsHyperlink.cs
- NumericUpDownAcceleration.cs
- StringSorter.cs
- EdmItemError.cs
- TransformerInfoCollection.cs
- wgx_commands.cs
- PingOptions.cs
- AxisAngleRotation3D.cs
- MediaContext.cs
- ASCIIEncoding.cs
- EventSourceCreationData.cs
- EpmHelper.cs
- ContentDefinition.cs
- BypassElement.cs
- SessionStateSection.cs
- DocumentGridContextMenu.cs
- AnimatedTypeHelpers.cs
- ListDictionary.cs
- RuntimeVariablesExpression.cs
- SimpleMailWebEventProvider.cs
- WindowInteractionStateTracker.cs
- safesecurityhelperavalon.cs
- CmsUtils.cs
- TreeBuilderBamlTranslator.cs
- StrictModeSecurityHeaderElementInferenceEngine.cs
- HitTestParameters.cs
- JoinElimination.cs
- MethodSignatureGenerator.cs
- ObjectStateManagerMetadata.cs
- DataGridDetailsPresenter.cs
- MouseGestureConverter.cs
- XPathNode.cs
- DataError.cs
- StrokeRenderer.cs
- MenuItemBindingCollection.cs
- ScrollableControl.cs
- InvalidCastException.cs
- ToolStripHighContrastRenderer.cs
- IImplicitResourceProvider.cs
- CookieProtection.cs
- GatewayIPAddressInformationCollection.cs
- ParserHooks.cs
- ListViewItem.cs
- SplashScreen.cs
- LocalizableResourceBuilder.cs
- IOException.cs
- EmptyControlCollection.cs
- IisTraceListener.cs
- EventLogException.cs
- PtsPage.cs
- MasterPageBuildProvider.cs
- CredentialSelector.cs
- RevocationPoint.cs
- SqlDataSourceEnumerator.cs
- FileDialogPermission.cs
- ExclusiveCanonicalizationTransform.cs
- UpdateManifestForBrowserApplication.cs
- objectquery_tresulttype.cs
- ReadOnlyPropertyMetadata.cs
- GroupBox.cs
- FlowDocumentReader.cs
- EastAsianLunisolarCalendar.cs
- Win32PrintDialog.cs
- VirtualDirectoryMappingCollection.cs
- DataServiceRequestOfT.cs
- TraceLevelStore.cs
- LinqDataSourceStatusEventArgs.cs
- XmlTextAttribute.cs
- Perspective.cs
- ColorTransform.cs