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
- OpenTypeLayoutCache.cs
- IOThreadScheduler.cs
- WSSecureConversationFeb2005.cs
- MeasurementDCInfo.cs
- CornerRadiusConverter.cs
- WebPartManagerDesigner.cs
- Highlights.cs
- FieldNameLookup.cs
- ColorConvertedBitmapExtension.cs
- IBuiltInEvidence.cs
- cache.cs
- BinaryNode.cs
- WinFormsUtils.cs
- ConnectionManagementElement.cs
- FormatConvertedBitmap.cs
- WindowsListViewScroll.cs
- DataBindEngine.cs
- BooleanExpr.cs
- sqlstateclientmanager.cs
- TreeNodeBindingCollection.cs
- DefaultBinder.cs
- WebEncodingValidatorAttribute.cs
- CellPartitioner.cs
- ScriptResourceDefinition.cs
- ImmutablePropertyDescriptorGridEntry.cs
- CharConverter.cs
- CompilerScopeManager.cs
- XmlSchemas.cs
- LoginName.cs
- MenuAdapter.cs
- xmlglyphRunInfo.cs
- ToolBarButton.cs
- NameValuePair.cs
- Positioning.cs
- RecognitionEventArgs.cs
- LinkAreaEditor.cs
- X509ScopedServiceCertificateElementCollection.cs
- DataPointer.cs
- ProcessHostConfigUtils.cs
- SQLMembershipProvider.cs
- PerfCounters.cs
- ListChangedEventArgs.cs
- View.cs
- sqlinternaltransaction.cs
- MethodAccessException.cs
- SetterBase.cs
- SubstitutionList.cs
- PageStatePersister.cs
- DoubleCollectionConverter.cs
- DecoderBestFitFallback.cs
- NativeRightsManagementAPIsStructures.cs
- ListSourceHelper.cs
- PackagingUtilities.cs
- _NestedSingleAsyncResult.cs
- TokenFactoryCredential.cs
- StrokeNodeOperations.cs
- MachineKeySection.cs
- ChangeConflicts.cs
- BaseCollection.cs
- MdiWindowListItemConverter.cs
- FullTextState.cs
- DataGridCommandEventArgs.cs
- EntitySetBaseCollection.cs
- OleDbMetaDataFactory.cs
- DataObjectEventArgs.cs
- CurrentChangingEventArgs.cs
- Utils.cs
- GeneralTransform3DTo2D.cs
- ImageDesigner.cs
- IsolatedStorageSecurityState.cs
- Matrix3D.cs
- ProfilePropertySettingsCollection.cs
- FilterQuery.cs
- BoolLiteral.cs
- XmlSchemaSimpleContentExtension.cs
- ClientData.cs
- TreeViewImageIndexConverter.cs
- DataGridAutomationPeer.cs
- MailMessageEventArgs.cs
- SAPIEngineTypes.cs
- UserValidatedEventArgs.cs
- BrowserCapabilitiesFactory.cs
- SafeNativeMethodsCLR.cs
- MSAAWinEventWrap.cs
- FilterableAttribute.cs
- TextElementCollectionHelper.cs
- HeaderCollection.cs
- DbSource.cs
- ServiceReference.cs
- SHA512.cs
- wgx_commands.cs
- IndentedWriter.cs
- CorePropertiesFilter.cs
- Models.cs
- LockCookie.cs
- MouseGesture.cs
- XmlQueryStaticData.cs
- HtmlPhoneCallAdapter.cs
- StringSorter.cs
- TextPenaltyModule.cs