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
- FullTextBreakpoint.cs
- WorkflowQueue.cs
- XmlEventCache.cs
- TableChangeProcessor.cs
- Attributes.cs
- OracleDataAdapter.cs
- SqlInfoMessageEvent.cs
- RoleManagerSection.cs
- CorePropertiesFilter.cs
- RadioButtonPopupAdapter.cs
- PageCache.cs
- WorkflowServiceHost.cs
- TableRowCollection.cs
- MetabaseServerConfig.cs
- LogicalTreeHelper.cs
- MailWriter.cs
- RtfControls.cs
- TextRunCacheImp.cs
- BamlResourceDeserializer.cs
- HtmlInputCheckBox.cs
- DataColumn.cs
- CodeDomSerializationProvider.cs
- ComponentEvent.cs
- ObjectNotFoundException.cs
- OutputCacheModule.cs
- ClientBuildManagerCallback.cs
- ManipulationVelocities.cs
- BasicExpandProvider.cs
- StylusPlugin.cs
- processwaithandle.cs
- WebAdminConfigurationHelper.cs
- FolderBrowserDialog.cs
- Object.cs
- Stylesheet.cs
- PropertyCollection.cs
- TdsEnums.cs
- CompressStream.cs
- EventRoute.cs
- BaseParagraph.cs
- HtmlWindow.cs
- XmlSortKeyAccumulator.cs
- WindowsIPAddress.cs
- DataGridCheckBoxColumn.cs
- tooltip.cs
- HandleScope.cs
- XmlKeywords.cs
- StreamUpdate.cs
- Point4D.cs
- Image.cs
- UnicodeEncoding.cs
- GetLedgerEntryForRecipientRequest.cs
- Classification.cs
- SecurityHeader.cs
- CodeRemoveEventStatement.cs
- CodeMemberMethod.cs
- NameSpaceExtractor.cs
- XmlDigitalSignatureProcessor.cs
- OdbcRowUpdatingEvent.cs
- BaseTemplateBuildProvider.cs
- ScrollData.cs
- WebFormsRootDesigner.cs
- DrawingState.cs
- Rectangle.cs
- UndoEngine.cs
- XmlComment.cs
- ManagedFilter.cs
- XmlWrappingReader.cs
- XPathNavigatorKeyComparer.cs
- EvidenceBase.cs
- LocalizabilityAttribute.cs
- UnsafeNativeMethods.cs
- ActiveXSerializer.cs
- SourceLineInfo.cs
- DataStreams.cs
- Size3D.cs
- Triplet.cs
- LogStore.cs
- Metadata.cs
- DataQuery.cs
- XmlRawWriterWrapper.cs
- VirtualizingStackPanel.cs
- StructuredType.cs
- DataServiceQueryProvider.cs
- EntityKeyElement.cs
- UnsafeNativeMethods.cs
- TransformCollection.cs
- Dump.cs
- MapPathBasedVirtualPathProvider.cs
- CustomAttributeFormatException.cs
- SafeRightsManagementHandle.cs
- ItemCollectionEditor.cs
- DocumentViewerHelper.cs
- SizeConverter.cs
- SQLInt32.cs
- SecurityBindingElementImporter.cs
- DataGridViewRowPostPaintEventArgs.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- HtmlInputCheckBox.cs
- InvariantComparer.cs
- FileDialog.cs