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
- ResourcesBuildProvider.cs
- HebrewNumber.cs
- AccessDataSource.cs
- ConsoleTraceListener.cs
- ConstructorNeedsTagAttribute.cs
- HistoryEventArgs.cs
- PrintEvent.cs
- ServiceCredentialsElement.cs
- ConnectionStringSettingsCollection.cs
- ConsumerConnectionPoint.cs
- UIPermission.cs
- _ProxyChain.cs
- SQLInt64.cs
- InstancePersistenceContext.cs
- UnmanagedMemoryStreamWrapper.cs
- Permission.cs
- TypeForwardedFromAttribute.cs
- AsmxEndpointPickerExtension.cs
- CaseInsensitiveOrdinalStringComparer.cs
- NamespaceMapping.cs
- OpenFileDialog.cs
- UnmanagedMemoryAccessor.cs
- DateTimeUtil.cs
- ListControl.cs
- ElementMarkupObject.cs
- SynchronizationLockException.cs
- ElementAction.cs
- Utils.cs
- Lease.cs
- SortedDictionary.cs
- OutputCacheSection.cs
- SecurityTokenSerializer.cs
- Encoding.cs
- _LazyAsyncResult.cs
- RuleAction.cs
- PermissionSetTriple.cs
- FixedPageStructure.cs
- AppSettingsSection.cs
- ColumnCollection.cs
- BridgeDataRecord.cs
- Policy.cs
- ManagedIStream.cs
- ExpanderAutomationPeer.cs
- SqlGenericUtil.cs
- XmlNamespaceDeclarationsAttribute.cs
- XmlValidatingReaderImpl.cs
- HtmlFormParameterWriter.cs
- SimpleWebHandlerParser.cs
- FirstQueryOperator.cs
- InkCanvasFeedbackAdorner.cs
- ViewManager.cs
- TextOptions.cs
- ZipIOExtraFieldZip64Element.cs
- ApplicationFileParser.cs
- HelpKeywordAttribute.cs
- TdsParserStaticMethods.cs
- NamespaceTable.cs
- AssemblyAssociatedContentFileAttribute.cs
- ApplicationSecurityInfo.cs
- ConfigurationManagerHelper.cs
- DesignerAutoFormatStyle.cs
- XamlPathDataSerializer.cs
- FloatAverageAggregationOperator.cs
- StorageComplexPropertyMapping.cs
- ReliableSession.cs
- PrePrepareMethodAttribute.cs
- ContentPosition.cs
- FreezableDefaultValueFactory.cs
- ClientScriptManager.cs
- MessageSmuggler.cs
- SubtreeProcessor.cs
- newinstructionaction.cs
- XappLauncher.cs
- XmlObjectSerializerReadContextComplex.cs
- MemberProjectedSlot.cs
- MaterializeFromAtom.cs
- WorkerRequest.cs
- CollectionViewProxy.cs
- IdlingCommunicationPool.cs
- PrivilegeNotHeldException.cs
- PlanCompiler.cs
- PenThread.cs
- DocumentReference.cs
- MessageParameterAttribute.cs
- VirtualizedContainerService.cs
- TableLayoutRowStyleCollection.cs
- FileEnumerator.cs
- activationcontext.cs
- BounceEase.cs
- DBSqlParser.cs
- QuadraticBezierSegment.cs
- XPathChildIterator.cs
- FragmentNavigationEventArgs.cs
- WebEventTraceProvider.cs
- Descriptor.cs
- IIS7ConfigurationLoader.cs
- SafeRightsManagementHandle.cs
- XmlSchemaExternal.cs
- WindowsRichEdit.cs
- TreeNodeBinding.cs