Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- StorageFunctionMapping.cs
- CodePageUtils.cs
- SectionInput.cs
- CommandConverter.cs
- XmlSchemaInferenceException.cs
- BindingMemberInfo.cs
- FileUtil.cs
- ServicePointManager.cs
- MenuItemCollection.cs
- LayoutTableCell.cs
- CodeTypeOfExpression.cs
- TcpProcessProtocolHandler.cs
- Set.cs
- View.cs
- StrokeCollectionDefaultValueFactory.cs
- GlobalItem.cs
- Base64Encoder.cs
- ParagraphVisual.cs
- ConnectionManagementSection.cs
- TrackingProvider.cs
- QilBinary.cs
- HMACSHA512.cs
- CodeCommentStatementCollection.cs
- AlternateViewCollection.cs
- BasePropertyDescriptor.cs
- TypeLibConverter.cs
- DataObjectFieldAttribute.cs
- DataKeyArray.cs
- SoundPlayer.cs
- ManageRequest.cs
- MdImport.cs
- Deflater.cs
- TypeSource.cs
- HasCopySemanticsAttribute.cs
- CodeBinaryOperatorExpression.cs
- SqlReorderer.cs
- TextElementEnumerator.cs
- Roles.cs
- XmlDictionaryReader.cs
- DefaultTextStoreTextComposition.cs
- documentation.cs
- HtmlFormWrapper.cs
- BinaryFormatterSinks.cs
- PageContent.cs
- HitTestResult.cs
- BooleanFunctions.cs
- LoginView.cs
- BuildResult.cs
- BitmapScalingModeValidation.cs
- WebPartCollection.cs
- Quaternion.cs
- XmlEntity.cs
- PostBackOptions.cs
- ObjectDataSourceSelectingEventArgs.cs
- SystemIPGlobalStatistics.cs
- ContentPlaceHolder.cs
- QilGenerator.cs
- EventEntry.cs
- DbgCompiler.cs
- BindingExpression.cs
- Configuration.cs
- TdsParserStateObject.cs
- Triplet.cs
- SqlWebEventProvider.cs
- PermissionAttributes.cs
- Operator.cs
- TextServicesCompartmentEventSink.cs
- ServiceModelReg.cs
- Console.cs
- SafeNativeMemoryHandle.cs
- CapiSymmetricAlgorithm.cs
- CookieParameter.cs
- CacheModeConverter.cs
- ActivityStateRecord.cs
- PreloadHost.cs
- EntityConnection.cs
- DirectoryObjectSecurity.cs
- Win32Interop.cs
- List.cs
- Message.cs
- Exception.cs
- SpecularMaterial.cs
- ListCollectionView.cs
- ButtonFlatAdapter.cs
- OpenTypeLayoutCache.cs
- NullableFloatMinMaxAggregationOperator.cs
- SqlTypesSchemaImporter.cs
- CompressionTransform.cs
- CompilerLocalReference.cs
- MDIWindowDialog.cs
- CacheVirtualItemsEvent.cs
- WebScriptEnablingElement.cs
- ToolStripItemRenderEventArgs.cs
- DbInsertCommandTree.cs
- DataControlLinkButton.cs
- ToolBarTray.cs
- Renderer.cs
- HtmlShim.cs
- FormViewRow.cs
- RoutedPropertyChangedEventArgs.cs