Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / Separator.cs / 1458001 / 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
- OracleRowUpdatedEventArgs.cs
- TreeBuilderBamlTranslator.cs
- TreeNodeCollection.cs
- CroppedBitmap.cs
- ControlIdConverter.cs
- XmlSchemaSet.cs
- LicFileLicenseProvider.cs
- MetadataItem_Static.cs
- NameValuePair.cs
- OdbcReferenceCollection.cs
- WebPartCatalogAddVerb.cs
- SignalGate.cs
- PerformanceCounterCategory.cs
- Funcletizer.cs
- PerformanceCounterPermissionEntryCollection.cs
- EncoderNLS.cs
- UidManager.cs
- TypeConverterValueSerializer.cs
- EnumerableRowCollection.cs
- ToolStripOverflowButton.cs
- TrackingStringDictionary.cs
- RealizationContext.cs
- ModelFactory.cs
- CompiledQueryCacheKey.cs
- MarkupCompilePass2.cs
- CultureInfo.cs
- XpsFilter.cs
- PrintPreviewControl.cs
- __FastResourceComparer.cs
- SettingsPropertyValue.cs
- KeyGesture.cs
- DrawingContextWalker.cs
- DataServiceContext.cs
- FrameworkElementFactory.cs
- HwndSubclass.cs
- CompilerParameters.cs
- HtmlToClrEventProxy.cs
- Size3DValueSerializer.cs
- ExtendedProtectionPolicy.cs
- RankException.cs
- RadioButtonAutomationPeer.cs
- HtmlInputReset.cs
- unitconverter.cs
- IntSecurity.cs
- SslSecurityTokenParameters.cs
- ServicePointManager.cs
- InkSerializer.cs
- ServerType.cs
- WindowsTitleBar.cs
- EdgeModeValidation.cs
- TemplateLookupAction.cs
- CounterCreationDataCollection.cs
- DataGridViewColumnEventArgs.cs
- TypeConverterHelper.cs
- SrgsGrammarCompiler.cs
- AuthenticationManager.cs
- ScriptResourceInfo.cs
- ParagraphResult.cs
- PrtCap_Base.cs
- CorrelationService.cs
- Size.cs
- EventSinkActivityDesigner.cs
- SupportingTokenBindingElement.cs
- EventMappingSettings.cs
- CompareInfo.cs
- DispatcherObject.cs
- SQLCharsStorage.cs
- SynchronizationHandlesCodeDomSerializer.cs
- ContextMenu.cs
- EntityType.cs
- InsufficientMemoryException.cs
- AssemblyCollection.cs
- ScrollableControl.cs
- AssemblyUtil.cs
- ToolStripRendererSwitcher.cs
- DataTableReaderListener.cs
- AbsoluteQuery.cs
- CallbackValidator.cs
- DeriveBytes.cs
- SystemWebCachingSectionGroup.cs
- HttpDebugHandler.cs
- Section.cs
- MatrixConverter.cs
- TextRunCacheImp.cs
- SortQuery.cs
- DataServiceOperationContext.cs
- Literal.cs
- WindowsTokenRoleProvider.cs
- CryptoConfig.cs
- HttpCacheParams.cs
- precedingsibling.cs
- SecurityManager.cs
- HttpResponseHeader.cs
- NamedElement.cs
- NameValuePermission.cs
- SvcMapFile.cs
- HotSpotCollectionEditor.cs
- CategoryGridEntry.cs
- ViewGenerator.cs
- AssemblySettingAttributes.cs