Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- EntityTemplateUserControl.cs
- DocumentViewerBase.cs
- OutputWindow.cs
- EventLogPermissionAttribute.cs
- BreakRecordTable.cs
- DeferredElementTreeState.cs
- ViewSimplifier.cs
- TdsValueSetter.cs
- TypeSchema.cs
- ApplicationServicesHostFactory.cs
- InvokeHandlers.cs
- MeshGeometry3D.cs
- XmlDocument.cs
- StylusSystemGestureEventArgs.cs
- ADMembershipProvider.cs
- ToolStripContainerDesigner.cs
- ReverseComparer.cs
- LazyTextWriterCreator.cs
- ConfigDefinitionUpdates.cs
- ListControlDataBindingHandler.cs
- Matrix3DConverter.cs
- IntSecurity.cs
- HtmlTableRowCollection.cs
- DataSourceView.cs
- MenuItemBindingCollection.cs
- HeaderedContentControl.cs
- ChannelManager.cs
- ApplicationDirectoryMembershipCondition.cs
- UIElement3D.cs
- FocusChangedEventArgs.cs
- System.Data_BID.cs
- TreeNodeBinding.cs
- HandleCollector.cs
- SelectionProcessor.cs
- IItemContainerGenerator.cs
- DescriptionAttribute.cs
- IProvider.cs
- AdapterDictionary.cs
- NetworkInterface.cs
- InlineUIContainer.cs
- ReachDocumentReferenceCollectionSerializerAsync.cs
- NotImplementedException.cs
- ConfigurationManagerInternalFactory.cs
- SqlMethodAttribute.cs
- BitVector32.cs
- ConnectionManagementElement.cs
- ExpressionVisitorHelpers.cs
- PartialArray.cs
- StringStorage.cs
- LockedAssemblyCache.cs
- WebPartZoneCollection.cs
- MetadataItem.cs
- SHA384.cs
- WebServiceData.cs
- LabelEditEvent.cs
- TimeSpan.cs
- InputMethodStateTypeInfo.cs
- Baml2006ReaderFrame.cs
- CustomErrorsSectionWrapper.cs
- SerialStream.cs
- PersistChildrenAttribute.cs
- Function.cs
- FixedSOMTableCell.cs
- XmlSchemaAnnotation.cs
- ReadOnlyCollectionBase.cs
- WebServiceResponseDesigner.cs
- RightsManagementPermission.cs
- AuthorizationRuleCollection.cs
- EntityDataSourceMemberPath.cs
- BamlResourceSerializer.cs
- ChildChangedEventArgs.cs
- Missing.cs
- TypeProvider.cs
- SspiSecurityTokenParameters.cs
- BroadcastEventHelper.cs
- ListMarkerSourceInfo.cs
- MouseCaptureWithinProperty.cs
- DayRenderEvent.cs
- Events.cs
- VariableQuery.cs
- WorkflowApplicationTerminatedException.cs
- ToolStripSettings.cs
- XmlSchemaSequence.cs
- BlockCollection.cs
- DataGridViewCellFormattingEventArgs.cs
- ExpressionBuilder.cs
- RemotingConfiguration.cs
- TabletDevice.cs
- UnsafeNativeMethods.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- _CommandStream.cs
- TreeNodeCollection.cs
- ListMarkerSourceInfo.cs
- ProgressiveCrcCalculatingStream.cs
- WindowPattern.cs
- StateBag.cs
- ComplexBindingPropertiesAttribute.cs
- BridgeDataReader.cs
- BulletedList.cs
- SerializationHelper.cs