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 / UserControl.cs / 1 / UserControl.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.ComponentModel; using System.Windows; using System.Windows.Automation.Peers; using System.Windows.Input; using System.Windows.Media; using System.Windows.Markup; using System.Diagnostics; using MS.Internal.KnownBoxes; namespace System.Windows.Controls { ////// UserControl Class /// public class UserControl : ContentControl { #region Constructors static UserControl() { DefaultStyleKeyProperty.OverrideMetadata(typeof(UserControl), new FrameworkPropertyMetadata(typeof(UserControl))); _dType = DependencyObjectType.FromSystemTypeInternal(typeof(UserControl)); FocusableProperty.OverrideMetadata(typeof(UserControl), new FrameworkPropertyMetadata(BooleanBoxes.FalseBox)); KeyboardNavigation.IsTabStopProperty.OverrideMetadata(typeof(UserControl), new FrameworkPropertyMetadata(BooleanBoxes.FalseBox)); HorizontalContentAlignmentProperty.OverrideMetadata(typeof(UserControl), new FrameworkPropertyMetadata(HorizontalAlignment.Stretch)); VerticalContentAlignmentProperty.OverrideMetadata(typeof(UserControl), new FrameworkPropertyMetadata(VerticalAlignment.Stretch)); } ////// Default constructor /// public UserControl() { } #endregion Constructors // Set the EventArgs' source to be this UserControl internal override void AdjustBranchSource(RoutedEventArgs e) { e.Source=this; } ////// Creates AutomationPeer ( protected override AutomationPeer OnCreateAutomationPeer() { return new UserControlAutomationPeer(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 System; using System.ComponentModel; using System.Windows; using System.Windows.Automation.Peers; using System.Windows.Input; using System.Windows.Media; using System.Windows.Markup; using System.Diagnostics; using MS.Internal.KnownBoxes; namespace System.Windows.Controls { ///) /// /// UserControl Class /// public class UserControl : ContentControl { #region Constructors static UserControl() { DefaultStyleKeyProperty.OverrideMetadata(typeof(UserControl), new FrameworkPropertyMetadata(typeof(UserControl))); _dType = DependencyObjectType.FromSystemTypeInternal(typeof(UserControl)); FocusableProperty.OverrideMetadata(typeof(UserControl), new FrameworkPropertyMetadata(BooleanBoxes.FalseBox)); KeyboardNavigation.IsTabStopProperty.OverrideMetadata(typeof(UserControl), new FrameworkPropertyMetadata(BooleanBoxes.FalseBox)); HorizontalContentAlignmentProperty.OverrideMetadata(typeof(UserControl), new FrameworkPropertyMetadata(HorizontalAlignment.Stretch)); VerticalContentAlignmentProperty.OverrideMetadata(typeof(UserControl), new FrameworkPropertyMetadata(VerticalAlignment.Stretch)); } ////// Default constructor /// public UserControl() { } #endregion Constructors // Set the EventArgs' source to be this UserControl internal override void AdjustBranchSource(RoutedEventArgs e) { e.Source=this; } ////// Creates AutomationPeer ( protected override AutomationPeer OnCreateAutomationPeer() { return new UserControlAutomationPeer(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
- CollectionsUtil.cs
- ListViewHitTestInfo.cs
- MultipleViewProviderWrapper.cs
- NumberFunctions.cs
- ComponentEditorForm.cs
- WindowsScrollBarBits.cs
- XmlTextWriter.cs
- SingleAnimation.cs
- Int32Storage.cs
- TextFormatterHost.cs
- AudioDeviceOut.cs
- QuadraticBezierSegment.cs
- QueryStringParameter.cs
- NotSupportedException.cs
- TextServicesLoader.cs
- TextViewBase.cs
- UniqueConstraint.cs
- ConfigViewGenerator.cs
- Stylesheet.cs
- GradientStop.cs
- NativeMethods.cs
- SqlCommandBuilder.cs
- XmlMessageFormatter.cs
- EventProviderWriter.cs
- ToolStripLabel.cs
- LogicalExpressionEditor.cs
- DataBindingExpressionBuilder.cs
- ConnectionManagementElementCollection.cs
- SymmetricKeyWrap.cs
- ObjectToken.cs
- shaper.cs
- MemoryMappedViewAccessor.cs
- COM2PropertyDescriptor.cs
- SmiEventSink_DeferedProcessing.cs
- SqlExpressionNullability.cs
- RelationshipConverter.cs
- RequestTimeoutManager.cs
- ContentHostHelper.cs
- CodeMemberEvent.cs
- TextFindEngine.cs
- CloseCollectionAsyncResult.cs
- SizeChangedInfo.cs
- SortDescription.cs
- PopupRoot.cs
- SessionIDManager.cs
- MarkedHighlightComponent.cs
- SafeWaitHandle.cs
- SqlDeflator.cs
- Empty.cs
- BinaryObjectReader.cs
- SqlDataSourceCache.cs
- CryptoStream.cs
- DbMetaDataCollectionNames.cs
- ListenerConnectionDemuxer.cs
- odbcmetadatafactory.cs
- PageStatePersister.cs
- Win32SafeHandles.cs
- WindowsGraphics2.cs
- SafeNativeMethods.cs
- RtfControls.cs
- Crypto.cs
- ScriptIgnoreAttribute.cs
- TextCompositionManager.cs
- TraceSection.cs
- IntegerValidatorAttribute.cs
- TextStore.cs
- AmbientEnvironment.cs
- ObjRef.cs
- MaskedTextBoxDesignerActionList.cs
- DropTarget.cs
- ISSmlParser.cs
- DataGridViewButtonCell.cs
- FormatterConverter.cs
- TrackingProfileSerializer.cs
- DispatcherFrame.cs
- ClassGenerator.cs
- SqlAliasesReferenced.cs
- PermissionRequestEvidence.cs
- ICspAsymmetricAlgorithm.cs
- SiteMapPath.cs
- ActivityWithResult.cs
- SimpleType.cs
- LocatorPartList.cs
- CleanUpVirtualizedItemEventArgs.cs
- QuotedPrintableStream.cs
- NamespaceInfo.cs
- TextEditorTyping.cs
- EntityContainerRelationshipSet.cs
- XmlSchema.cs
- PropertyMetadata.cs
- EntityTransaction.cs
- CustomAttributeBuilder.cs
- Pair.cs
- RenderCapability.cs
- PreloadedPackages.cs
- Clipboard.cs
- SmiEventStream.cs
- RangeContentEnumerator.cs
- BindingContext.cs
- ListViewSelectEventArgs.cs