Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / GroupBox.cs / 1305600 / GroupBox.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: Implementation of the GroupBox Control // //--------------------------------------------------------------------------- using System.Windows.Input; // Access Key support namespace System.Windows.Controls { ////// GroupBox Control class /// [Localizability(LocalizationCategory.None, Readability = Readability.Unreadable)] // cannot be read & localized as string public class GroupBox : HeaderedContentControl { #region Constructors static GroupBox() { FocusableProperty.OverrideMetadata(typeof(GroupBox), new FrameworkPropertyMetadata(false)); IsTabStopProperty.OverrideMetadata(typeof(GroupBox), new FrameworkPropertyMetadata(false)); DefaultStyleKeyProperty.OverrideMetadata(typeof(GroupBox), new FrameworkPropertyMetadata(typeof(GroupBox))); EventManager.RegisterClassHandler(typeof(GroupBox), AccessKeyManager.AccessKeyPressedEvent, new AccessKeyPressedEventHandler(OnAccessKeyPressed)); } #endregion #region Override methods ////// Creates AutomationPeer ( protected override System.Windows.Automation.Peers.AutomationPeer OnCreateAutomationPeer() { return new System.Windows.Automation.Peers.GroupBoxAutomationPeer(this); } ///) /// /// The Access key for this control was invoked. /// protected override void OnAccessKey(AccessKeyEventArgs e) { MoveFocus(new TraversalRequest(FocusNavigationDirection.First)); } private static void OnAccessKeyPressed(object sender, AccessKeyPressedEventArgs e) { if (!e.Handled && e.Scope == null && e.Target == null) { e.Target = sender as GroupBox; } } #endregion } } // 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. // // // Description: Implementation of the GroupBox Control // //--------------------------------------------------------------------------- using System.Windows.Input; // Access Key support namespace System.Windows.Controls { ////// GroupBox Control class /// [Localizability(LocalizationCategory.None, Readability = Readability.Unreadable)] // cannot be read & localized as string public class GroupBox : HeaderedContentControl { #region Constructors static GroupBox() { FocusableProperty.OverrideMetadata(typeof(GroupBox), new FrameworkPropertyMetadata(false)); IsTabStopProperty.OverrideMetadata(typeof(GroupBox), new FrameworkPropertyMetadata(false)); DefaultStyleKeyProperty.OverrideMetadata(typeof(GroupBox), new FrameworkPropertyMetadata(typeof(GroupBox))); EventManager.RegisterClassHandler(typeof(GroupBox), AccessKeyManager.AccessKeyPressedEvent, new AccessKeyPressedEventHandler(OnAccessKeyPressed)); } #endregion #region Override methods ////// Creates AutomationPeer ( protected override System.Windows.Automation.Peers.AutomationPeer OnCreateAutomationPeer() { return new System.Windows.Automation.Peers.GroupBoxAutomationPeer(this); } ///) /// /// The Access key for this control was invoked. /// protected override void OnAccessKey(AccessKeyEventArgs e) { MoveFocus(new TraversalRequest(FocusNavigationDirection.First)); } private static void OnAccessKeyPressed(object sender, AccessKeyPressedEventArgs e) { if (!e.Handled && e.Scope == null && e.Target == null) { e.Target = sender as GroupBox; } } #endregion } } // 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
- SingleKeyFrameCollection.cs
- EnvironmentPermission.cs
- MatrixUtil.cs
- GradientStop.cs
- CqlWriter.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- QueryStoreStatusRequest.cs
- DataGridViewButtonColumn.cs
- TextureBrush.cs
- GraphicsContext.cs
- XmlNodeReader.cs
- ellipse.cs
- InternalPermissions.cs
- Converter.cs
- DataPagerFieldCollection.cs
- WsdlParser.cs
- SelectedGridItemChangedEvent.cs
- FontConverter.cs
- PerformanceCounterPermission.cs
- KnownBoxes.cs
- ComponentConverter.cs
- ProfileManager.cs
- Funcletizer.cs
- StringReader.cs
- ColorIndependentAnimationStorage.cs
- EmptyStringExpandableObjectConverter.cs
- MessageDecoder.cs
- XmlSchemaRedefine.cs
- CryptoKeySecurity.cs
- MessageRpc.cs
- CompiledIdentityConstraint.cs
- Baml2006KeyRecord.cs
- SpecialNameAttribute.cs
- ConversionHelper.cs
- ClientSideProviderDescription.cs
- QualifiedCellIdBoolean.cs
- TextDataBindingHandler.cs
- SubMenuStyle.cs
- DynamicILGenerator.cs
- CustomError.cs
- Invariant.cs
- RegexCompilationInfo.cs
- _NtlmClient.cs
- ExpandableObjectConverter.cs
- DelegateArgumentReference.cs
- AxHost.cs
- Mutex.cs
- HttpListenerResponse.cs
- CompilerCollection.cs
- SchemaNamespaceManager.cs
- EdmEntityTypeAttribute.cs
- StsCommunicationException.cs
- TreeNode.cs
- IdentifierService.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- SafeBitVector32.cs
- NativeMethods.cs
- FormViewModeEventArgs.cs
- StickyNoteHelper.cs
- EventsTab.cs
- TableLayoutColumnStyleCollection.cs
- ClientScriptManager.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- BitmapFrame.cs
- RelationshipEnd.cs
- ExcludePathInfo.cs
- ControlBuilderAttribute.cs
- RegexCharClass.cs
- LayoutEvent.cs
- ProcessHostServerConfig.cs
- OrderingInfo.cs
- XmlProcessingInstruction.cs
- Binding.cs
- XComponentModel.cs
- ServicesUtilities.cs
- WmlFormAdapter.cs
- _ShellExpression.cs
- IgnoreDeviceFilterElementCollection.cs
- QueryOperationResponseOfT.cs
- ExtentJoinTreeNode.cs
- LateBoundBitmapDecoder.cs
- AppDomainProtocolHandler.cs
- LoginCancelEventArgs.cs
- ClientApiGenerator.cs
- LocationSectionRecord.cs
- ResizeGrip.cs
- SimpleTextLine.cs
- OSFeature.cs
- BaseDataBoundControl.cs
- TraceProvider.cs
- DropSource.cs
- NativeMethods.cs
- EtwTrace.cs
- TraceContextRecord.cs
- TextElement.cs
- Tracer.cs
- SqlTrackingQuery.cs
- TextFormatter.cs
- CallTemplateAction.cs
- XmlDataImplementation.cs