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
- ViewGenResults.cs
- Image.cs
- remotingproxy.cs
- X509Certificate2.cs
- GenericUriParser.cs
- TextInfo.cs
- ToolStripDropDownItem.cs
- BitmapVisualManager.cs
- NamespaceQuery.cs
- ElementNotAvailableException.cs
- RegexTree.cs
- CodeAttributeDeclarationCollection.cs
- TemplatePartAttribute.cs
- DigestTraceRecordHelper.cs
- TemplatingOptionsDialog.cs
- TraceXPathNavigator.cs
- TrackingValidationObjectDictionary.cs
- TableChangeProcessor.cs
- TraceFilter.cs
- ToolStripSplitButton.cs
- ConfigurationConverterBase.cs
- SafeFileMappingHandle.cs
- SqlMethods.cs
- TextServicesContext.cs
- sqlser.cs
- RepeatBehavior.cs
- Stackframe.cs
- AsyncParams.cs
- MethodRental.cs
- RequestBringIntoViewEventArgs.cs
- CheckedPointers.cs
- Stroke2.cs
- UriExt.cs
- LabelLiteral.cs
- DATA_BLOB.cs
- MaskedTextBoxDesignerActionList.cs
- GroupBox.cs
- ServerValidateEventArgs.cs
- PartialCachingAttribute.cs
- Pair.cs
- WebPartEditVerb.cs
- CustomBinding.cs
- OdbcHandle.cs
- RuntimeArgumentHandle.cs
- TextServicesCompartmentContext.cs
- InheritanceContextChangedEventManager.cs
- ParameterCollection.cs
- RemotingServices.cs
- StorageEntityTypeMapping.cs
- TrackingRecord.cs
- DataStreamFromComStream.cs
- RealProxy.cs
- ADConnectionHelper.cs
- SapiRecoInterop.cs
- WpfGeneratedKnownTypes.cs
- SessionPageStateSection.cs
- FamilyMap.cs
- VisualBrush.cs
- StoreConnection.cs
- ColumnHeaderConverter.cs
- View.cs
- DataGridViewColumnCollection.cs
- PrincipalPermission.cs
- ConfigurationManagerHelper.cs
- SafeNativeMethods.cs
- Bits.cs
- TextBoxBase.cs
- XmlSchemaAttributeGroupRef.cs
- SqlDataSourceCache.cs
- TextEvent.cs
- CodeRegionDirective.cs
- XmlHierarchicalEnumerable.cs
- ErrorHandler.cs
- AttributeQuery.cs
- XmlTextReaderImplHelpers.cs
- StreamingContext.cs
- ThicknessAnimation.cs
- XmlC14NWriter.cs
- PtsCache.cs
- Border.cs
- DesignTimeTemplateParser.cs
- OdbcParameterCollection.cs
- StickyNote.cs
- CloseCryptoHandleRequest.cs
- BitmapEffectCollection.cs
- SqlRowUpdatedEvent.cs
- GenericWebPart.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- BamlBinaryReader.cs
- WpfMemberInvoker.cs
- TreeViewCancelEvent.cs
- ITreeGenerator.cs
- HTTPNotFoundHandler.cs
- EventBuilder.cs
- SoapIncludeAttribute.cs
- FileIOPermission.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- VirtualDirectoryMappingCollection.cs
- DetailsViewPagerRow.cs
- WebPartDeleteVerb.cs