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
- TypeLibraryHelper.cs
- ToolStripSettings.cs
- Control.cs
- Rectangle.cs
- ResourceProviderFactory.cs
- CreateRefExpr.cs
- StatusBarAutomationPeer.cs
- SpeakInfo.cs
- UserControl.cs
- NativeMethods.cs
- NamedObject.cs
- IconConverter.cs
- WebPartDescription.cs
- SqlDataRecord.cs
- FastEncoderWindow.cs
- RenderData.cs
- ConfigurationManagerInternal.cs
- EntityTransaction.cs
- WinCategoryAttribute.cs
- DynamicMethod.cs
- QilLoop.cs
- _NetworkingPerfCounters.cs
- SamlDoNotCacheCondition.cs
- Crypto.cs
- CategoryGridEntry.cs
- safemediahandle.cs
- InvokeProviderWrapper.cs
- DataList.cs
- basecomparevalidator.cs
- XpsImageSerializationService.cs
- DataSourceControl.cs
- CancelEventArgs.cs
- LockRenewalTask.cs
- TextTreeTextElementNode.cs
- FontWeights.cs
- DateTimeOffset.cs
- WebPartEventArgs.cs
- RequestQueue.cs
- BamlRecords.cs
- ColumnResizeUndoUnit.cs
- EmissiveMaterial.cs
- Comparer.cs
- Scanner.cs
- ObjectView.cs
- XmlnsCompatibleWithAttribute.cs
- FormViewUpdatedEventArgs.cs
- VisualTreeHelper.cs
- SubMenuStyleCollectionEditor.cs
- SemaphoreSecurity.cs
- EventsTab.cs
- _TimerThread.cs
- XmlReflectionImporter.cs
- DataTableReader.cs
- ProfileGroupSettings.cs
- PropertyValueChangedEvent.cs
- SqlTrackingQuery.cs
- QuadraticBezierSegment.cs
- MDIClient.cs
- TabControlAutomationPeer.cs
- ByteConverter.cs
- MatrixValueSerializer.cs
- Publisher.cs
- StorageConditionPropertyMapping.cs
- VariantWrapper.cs
- DataTableMappingCollection.cs
- Margins.cs
- DataGridTextColumn.cs
- View.cs
- TextElementEnumerator.cs
- AdvancedBindingEditor.cs
- UserInitiatedNavigationPermission.cs
- ProfileSettingsCollection.cs
- ProviderException.cs
- Vars.cs
- ImageCodecInfoPrivate.cs
- BCryptHashAlgorithm.cs
- ComplexLine.cs
- TdsParameterSetter.cs
- PageHandlerFactory.cs
- InvalidPropValue.cs
- TextRangeAdaptor.cs
- wgx_exports.cs
- AtomParser.cs
- XmlDataImplementation.cs
- NamespaceMapping.cs
- DataExpression.cs
- BooleanToVisibilityConverter.cs
- ProxyManager.cs
- PrintEvent.cs
- MessagePropertyFilter.cs
- EncryptedData.cs
- HostingEnvironmentException.cs
- ViewKeyConstraint.cs
- TypeContext.cs
- ClientOperationFormatterProvider.cs
- Empty.cs
- GridViewHeaderRowPresenter.cs
- PhoneCall.cs
- SqlBooleanMismatchVisitor.cs
- EmptyStringExpandableObjectConverter.cs