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
- CompensationDesigner.cs
- KeyGestureConverter.cs
- DataObjectMethodAttribute.cs
- MouseEventArgs.cs
- DependencyPropertyKind.cs
- SubpageParagraph.cs
- ProxyHwnd.cs
- MulticastDelegate.cs
- ClassicBorderDecorator.cs
- AssociativeAggregationOperator.cs
- HttpStreams.cs
- SqlCachedBuffer.cs
- SafeCryptHandles.cs
- ServiceOperationWrapper.cs
- EventEntry.cs
- HtmlElementErrorEventArgs.cs
- JsonReader.cs
- MessageDescriptionCollection.cs
- FrameworkElementFactory.cs
- COM2ComponentEditor.cs
- UrlMapping.cs
- DataGridViewCheckBoxColumn.cs
- ArglessEventHandlerProxy.cs
- MdbDataFileEditor.cs
- ResourcePool.cs
- Int32Rect.cs
- Point3DIndependentAnimationStorage.cs
- WebHeaderCollection.cs
- KeyValuePair.cs
- PropertyDescriptorGridEntry.cs
- XmlRootAttribute.cs
- QueryCursorEventArgs.cs
- SqlDelegatedTransaction.cs
- Ray3DHitTestResult.cs
- RegexNode.cs
- ListViewGroupCollectionEditor.cs
- XmlSchemaAttributeGroup.cs
- RawContentTypeMapper.cs
- ProgressBar.cs
- FlowThrottle.cs
- CodeDomSerializer.cs
- SimpleLine.cs
- ListBoxItemWrapperAutomationPeer.cs
- AvTraceFormat.cs
- AvTraceDetails.cs
- PairComparer.cs
- LineBreakRecord.cs
- PerformanceCounterManager.cs
- CapabilitiesPattern.cs
- TextModifier.cs
- WorkflowMessageEventArgs.cs
- DbConnectionPool.cs
- CalendarDayButton.cs
- GridViewHeaderRowPresenter.cs
- IisNotInstalledException.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- InternalRelationshipCollection.cs
- ProgressiveCrcCalculatingStream.cs
- CodeGenHelper.cs
- unitconverter.cs
- Typography.cs
- TableProviderWrapper.cs
- MethodToken.cs
- GridViewSortEventArgs.cs
- ByteAnimationBase.cs
- CodeDomSerializerBase.cs
- NamespaceMapping.cs
- ExpressionConverter.cs
- JavaScriptObjectDeserializer.cs
- TextDecoration.cs
- WizardPanelChangingEventArgs.cs
- IgnorePropertiesAttribute.cs
- GenerateTemporaryAssemblyTask.cs
- ProcessInputEventArgs.cs
- Tuple.cs
- ElementMarkupObject.cs
- RuntimeResourceSet.cs
- AccessControlList.cs
- CodeObject.cs
- SmtpReplyReaderFactory.cs
- MainMenu.cs
- InternalResources.cs
- TextRange.cs
- Point4DConverter.cs
- __Error.cs
- DataPagerFieldItem.cs
- CheckedPointers.cs
- PipeStream.cs
- FormsIdentity.cs
- CleanUpVirtualizedItemEventArgs.cs
- DataObjectSettingDataEventArgs.cs
- EdmSchemaAttribute.cs
- InstanceValue.cs
- XPathDocumentNavigator.cs
- MembershipSection.cs
- SynchronizationContext.cs
- BufferedGraphics.cs
- WindowManager.cs
- AppDomainUnloadedException.cs
- TrackPoint.cs