Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- Table.cs
- ThreadExceptionEvent.cs
- Delegate.cs
- IndicCharClassifier.cs
- TransformedBitmap.cs
- RoleService.cs
- SqlProcedureAttribute.cs
- SiteIdentityPermission.cs
- UIElementPropertyUndoUnit.cs
- DbProviderSpecificTypePropertyAttribute.cs
- BindingContext.cs
- ThreadStateException.cs
- keycontainerpermission.cs
- MimeFormImporter.cs
- GenericEnumerator.cs
- ArcSegment.cs
- SettingsPropertyValue.cs
- ListBoxItemWrapperAutomationPeer.cs
- BufferedGraphics.cs
- DataGridViewDataErrorEventArgs.cs
- WindowsListViewSubItem.cs
- SerializationFieldInfo.cs
- DataColumnMappingCollection.cs
- SwitchCase.cs
- AudioBase.cs
- StreamGeometry.cs
- RectangleF.cs
- ColumnMap.cs
- ToolStrip.cs
- HostProtectionPermission.cs
- TableLayoutPanel.cs
- GlyphingCache.cs
- TypeInformation.cs
- JsonCollectionDataContract.cs
- ConfigXmlReader.cs
- TextBoxDesigner.cs
- ModelTreeEnumerator.cs
- ProfileModule.cs
- Helpers.cs
- DesignerTextWriter.cs
- ExpressionConverter.cs
- XmlWrappingWriter.cs
- ImplicitInputBrush.cs
- _NTAuthentication.cs
- QueryOutputWriter.cs
- DataTablePropertyDescriptor.cs
- __Filters.cs
- CodeCompileUnit.cs
- TemplatedWizardStep.cs
- AmbiguousMatchException.cs
- FieldBuilder.cs
- _SecureChannel.cs
- ContextProperty.cs
- WCFModelStrings.Designer.cs
- ErrorView.xaml.cs
- LocalizationParserHooks.cs
- Stacktrace.cs
- XmlIterators.cs
- Context.cs
- DataGridViewColumnCollection.cs
- Page.cs
- Image.cs
- MessagingDescriptionAttribute.cs
- StateMachine.cs
- KnownBoxes.cs
- precedingquery.cs
- UniqueCodeIdentifierScope.cs
- PermissionListSet.cs
- ConfigurationSettings.cs
- PixelFormat.cs
- fixedPageContentExtractor.cs
- XhtmlBasicLiteralTextAdapter.cs
- TextParentUndoUnit.cs
- ObjectAnimationUsingKeyFrames.cs
- IPipelineRuntime.cs
- CornerRadiusConverter.cs
- HorizontalAlignConverter.cs
- BoundPropertyEntry.cs
- CommandDevice.cs
- DocumentViewer.cs
- PathFigureCollectionConverter.cs
- DataServices.cs
- DrawingContextDrawingContextWalker.cs
- XmlSchemaObjectCollection.cs
- AttributeEmitter.cs
- ObjectToIdCache.cs
- BamlRecords.cs
- AnimationLayer.cs
- DataSetFieldSchema.cs
- Attributes.cs
- DocumentXPathNavigator.cs
- ArithmeticException.cs
- CfgParser.cs
- TagPrefixCollection.cs
- DocumentViewerBaseAutomationPeer.cs
- XmlSerializerOperationBehavior.cs
- SplineKeyFrames.cs
- CheckBox.cs
- OpenTypeLayoutCache.cs
- UrlPath.cs