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
- PasswordDeriveBytes.cs
- ListSourceHelper.cs
- ConfigurationSchemaErrors.cs
- NodeCounter.cs
- Simplifier.cs
- ConfigurationElement.cs
- ToolboxItem.cs
- TextServicesCompartmentEventSink.cs
- Ops.cs
- JsonDataContract.cs
- OracleDataAdapter.cs
- CryptoHelper.cs
- GridViewAutomationPeer.cs
- LinkedList.cs
- HwndHostAutomationPeer.cs
- TypeHelper.cs
- Guid.cs
- ConfigXmlText.cs
- CacheMemory.cs
- XmlEnumAttribute.cs
- DesignerMetadata.cs
- FieldDescriptor.cs
- StrongNameUtility.cs
- CollectionBase.cs
- Rect.cs
- WebBrowserNavigatedEventHandler.cs
- ExcCanonicalXml.cs
- DefinitionProperties.cs
- SqlAggregateChecker.cs
- ToolConsole.cs
- EncoderExceptionFallback.cs
- LabelInfo.cs
- ListBoxItem.cs
- XPathItem.cs
- StorageBasedPackageProperties.cs
- ToolStripOverflow.cs
- TransportSecurityHelpers.cs
- TileBrush.cs
- NewExpression.cs
- TokenCreationException.cs
- _SSPIWrapper.cs
- DynamicDataRouteHandler.cs
- MulticastNotSupportedException.cs
- ParamArrayAttribute.cs
- Underline.cs
- ContentPathSegment.cs
- BaseUriHelper.cs
- Vector.cs
- _AuthenticationState.cs
- Soap.cs
- PropertyEntry.cs
- HwndStylusInputProvider.cs
- ConfigurationLocationCollection.cs
- Image.cs
- DiscoveryDocumentSearchPattern.cs
- ArrayTypeMismatchException.cs
- DataControlFieldsEditor.cs
- IntSecurity.cs
- CodeTypeReference.cs
- MouseGesture.cs
- SafeRegistryHandle.cs
- JapaneseCalendar.cs
- PeerNameRecord.cs
- ResourceContainer.cs
- ObjectQueryState.cs
- CodeLabeledStatement.cs
- SHA512.cs
- RegistryKey.cs
- RotateTransform3D.cs
- BufferedGraphicsContext.cs
- WorkflowServiceHost.cs
- TextDecorationCollectionConverter.cs
- XmlHelper.cs
- IdentityReference.cs
- ProgressiveCrcCalculatingStream.cs
- ExpandoObject.cs
- InvokeGenerator.cs
- BamlTreeUpdater.cs
- ProxyManager.cs
- ColumnResizeUndoUnit.cs
- WarningException.cs
- StylusPointPropertyInfoDefaults.cs
- SweepDirectionValidation.cs
- WindowsFont.cs
- NullableConverter.cs
- DesignRelation.cs
- PrintControllerWithStatusDialog.cs
- OrderPreservingMergeHelper.cs
- ButtonChrome.cs
- ValidationPropertyAttribute.cs
- CalculatedColumn.cs
- EvidenceTypeDescriptor.cs
- SchemaSetCompiler.cs
- SystemNetworkInterface.cs
- RolePrincipal.cs
- Win32Interop.cs
- PageMediaType.cs
- ITreeGenerator.cs
- RandomNumberGenerator.cs
- securestring.cs