Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- SecurityToken.cs
- FormatterServices.cs
- MethodImplAttribute.cs
- ActivationArguments.cs
- __ComObject.cs
- KeySplineConverter.cs
- SelectedDatesCollection.cs
- TogglePatternIdentifiers.cs
- HyperLinkColumn.cs
- Assert.cs
- GenerateHelper.cs
- SimpleRecyclingCache.cs
- PropertyGridView.cs
- MetadataSerializer.cs
- DependencyObjectCodeDomSerializer.cs
- FlatButtonAppearance.cs
- SpotLight.cs
- ObjectParameterCollection.cs
- BackgroundWorker.cs
- ReliableSession.cs
- FileLogRecordHeader.cs
- DataServiceKeyAttribute.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- RotateTransform3D.cs
- QuadraticBezierSegment.cs
- ToolStripLabel.cs
- ProofTokenCryptoHandle.cs
- httpapplicationstate.cs
- PermissionSetEnumerator.cs
- Collection.cs
- BamlResourceDeserializer.cs
- ConnectionStringSettingsCollection.cs
- DataGridViewCheckBoxColumn.cs
- OleCmdHelper.cs
- Light.cs
- CacheDependency.cs
- ExpandSegmentCollection.cs
- _BasicClient.cs
- TaiwanCalendar.cs
- TrackBar.cs
- CollectionBuilder.cs
- ZoneLinkButton.cs
- SelectionItemProviderWrapper.cs
- EDesignUtil.cs
- SpeechDetectedEventArgs.cs
- ConstructorArgumentAttribute.cs
- XsdCachingReader.cs
- TextParaLineResult.cs
- ObjectTokenCategory.cs
- HyperLinkColumn.cs
- SpanIndex.cs
- EmptyStringExpandableObjectConverter.cs
- BuildResult.cs
- EFAssociationProvider.cs
- ellipse.cs
- ReadOnlyNameValueCollection.cs
- BufferedWebEventProvider.cs
- SR.cs
- ScriptDescriptor.cs
- DecimalSumAggregationOperator.cs
- EventPrivateKey.cs
- Command.cs
- FormatConvertedBitmap.cs
- Timeline.cs
- ScriptingWebServicesSectionGroup.cs
- ItemCheckEvent.cs
- ClientWindowsAuthenticationMembershipProvider.cs
- CodeRemoveEventStatement.cs
- FontCacheLogic.cs
- QuadraticBezierSegment.cs
- AuthenticatedStream.cs
- SegmentInfo.cs
- GradientStop.cs
- HierarchicalDataSourceControl.cs
- CompressEmulationStream.cs
- XmlSecureResolver.cs
- TraceSection.cs
- IdleTimeoutMonitor.cs
- BrowserTree.cs
- SegmentInfo.cs
- SplayTreeNode.cs
- UriWriter.cs
- TextDecorations.cs
- CompilerGlobalScopeAttribute.cs
- WindowsPen.cs
- DCSafeHandle.cs
- ZipIOFileItemStream.cs
- _CacheStreams.cs
- AlgoModule.cs
- SerializationAttributes.cs
- FormViewModeEventArgs.cs
- ToolStripOverflowButton.cs
- odbcmetadatacollectionnames.cs
- SoapRpcMethodAttribute.cs
- EmptyStringExpandableObjectConverter.cs
- InvokeGenerator.cs
- RepeatInfo.cs
- PageHandlerFactory.cs
- OracleException.cs
- DataReaderContainer.cs