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
- FixedStringLookup.cs
- SapiGrammar.cs
- Nullable.cs
- MenuItemCollection.cs
- ShaperBuffers.cs
- BindToObject.cs
- Vector3dCollection.cs
- DataTransferEventArgs.cs
- EndOfStreamException.cs
- DbBuffer.cs
- FrameworkTemplate.cs
- Gdiplus.cs
- OdbcCommandBuilder.cs
- RSAOAEPKeyExchangeFormatter.cs
- RuntimeEnvironment.cs
- ActivityExecutorSurrogate.cs
- ProviderIncompatibleException.cs
- MemberInfoSerializationHolder.cs
- DrawingContextDrawingContextWalker.cs
- ScriptManagerProxy.cs
- webclient.cs
- CommandManager.cs
- IgnoreSection.cs
- CompressStream.cs
- StoreContentChangedEventArgs.cs
- IdleTimeoutMonitor.cs
- AnimationClockResource.cs
- UpWmlPageAdapter.cs
- ThemeableAttribute.cs
- TraceContext.cs
- NativeMethods.cs
- Triangle.cs
- XLinq.cs
- ToolStripTextBox.cs
- TagPrefixAttribute.cs
- HttpModulesSection.cs
- GridSplitterAutomationPeer.cs
- StorageModelBuildProvider.cs
- ReflectionUtil.cs
- AutoScrollHelper.cs
- CatalogPartChrome.cs
- JoinQueryOperator.cs
- Hex.cs
- AppDomainShutdownMonitor.cs
- CorrelationManager.cs
- XmlSortKey.cs
- Light.cs
- SoapTypeAttribute.cs
- UserControlFileEditor.cs
- ColorMatrix.cs
- ActivationProxy.cs
- BamlReader.cs
- Translator.cs
- MimeXmlImporter.cs
- DeferredBinaryDeserializerExtension.cs
- Formatter.cs
- FolderBrowserDialog.cs
- securitycriticaldataformultiplegetandset.cs
- ToolStripLabel.cs
- GridViewSortEventArgs.cs
- EventWaitHandle.cs
- TypeConverter.cs
- ServerValidateEventArgs.cs
- DirectoryInfo.cs
- TakeQueryOptionExpression.cs
- ConfigXmlDocument.cs
- StylusOverProperty.cs
- InternalControlCollection.cs
- EventRoute.cs
- BitConverter.cs
- Automation.cs
- SqlConnectionManager.cs
- DayRenderEvent.cs
- assertwrapper.cs
- MatchingStyle.cs
- RelationshipDetailsCollection.cs
- ExpressionBinding.cs
- PrintingPermissionAttribute.cs
- AncillaryOps.cs
- Configuration.cs
- StrokeNodeData.cs
- ActivityCodeDomSerializer.cs
- EnterpriseServicesHelper.cs
- WebBrowser.cs
- ConnectionsZoneAutoFormat.cs
- RecordsAffectedEventArgs.cs
- FastEncoder.cs
- VariableDesigner.xaml.cs
- Stylesheet.cs
- FileUtil.cs
- FileDetails.cs
- XmlSchemaDatatype.cs
- MSAANativeProvider.cs
- AncillaryOps.cs
- ThemeableAttribute.cs
- DataColumnMapping.cs
- WorkflowApplicationCompletedEventArgs.cs
- SymbolEqualComparer.cs
- WebEventTraceProvider.cs
- BitmapEncoder.cs