Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / Input / InputLanguageEventArgs.cs / 1 / InputLanguageEventArgs.cs
using System; using System.Collections; using System.Windows.Threading; using System.Windows; using System.Globalization; namespace System.Windows.Input { ////// The InputLanguageEventArgs class represents a type of /// RoutedEventArgs that are relevant to events raised to indicate /// changes. /// public abstract class InputLanguageEventArgs : EventArgs { //------------------------------------------------------ // // Constructors // //----------------------------------------------------- ////// Constructs an instance of the InputLanguageEventArgs class. /// /// /// The new language id. /// /// /// The previous language id. /// protected InputLanguageEventArgs(CultureInfo newLanguageId, CultureInfo previousLanguageId) { _newLanguageId = newLanguageId; _previousLanguageId = previousLanguageId; } //----------------------------------------------------- // // Public Properties // //----------------------------------------------------- ////// New Language Id. /// public virtual CultureInfo NewLanguage { get { return _newLanguageId; } } ////// Previous Language Id. /// public virtual CultureInfo PreviousLanguage { get { return _previousLanguageId; } } //------------------------------------------------------ // // Private Fields // //----------------------------------------------------- #region Private Fields // the new input language. private CultureInfo _newLanguageId; // the previous input language. private CultureInfo _previousLanguageId; #endregion Private Fields } ////// The InputLanguageEventArgs class represents a type of /// RoutedEventArgs that are relevant to events raised to indicate /// changes. /// public class InputLanguageChangedEventArgs : InputLanguageEventArgs { //------------------------------------------------------ // // Constructors // //------------------------------------------------------ ////// Constructs an instance of the InputLanguageEventArgs class. /// /// /// The new language id. /// /// /// The new language id. /// public InputLanguageChangedEventArgs(CultureInfo newLanguageId, CultureInfo previousLanguageId) : base(newLanguageId, previousLanguageId) { } } ////// The InputLanguageEventArgs class represents a type of /// RoutedEventArgs that are relevant to events raised to indicate /// changes. /// ///public class InputLanguageChangingEventArgs : InputLanguageEventArgs { //----------------------------------------------------- // // Constructors // //------------------------------------------------------ /// /// Constructs an instance of the InputLanguageEventArgs class. /// /// /// The new language id. /// /// /// The previous language id. /// public InputLanguageChangingEventArgs(CultureInfo newLanguageId, CultureInfo previousLanguageId) : base(newLanguageId, previousLanguageId) { _rejected = false; } //----------------------------------------------------- // // Public Properties // //----------------------------------------------------- ////// This is a value to reject the input language change. /// public bool Rejected { get { return _rejected; } set { _rejected = value; } } //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ #region Private Fields // bool to reject the input language change. private bool _rejected; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Collections; using System.Windows.Threading; using System.Windows; using System.Globalization; namespace System.Windows.Input { ////// The InputLanguageEventArgs class represents a type of /// RoutedEventArgs that are relevant to events raised to indicate /// changes. /// public abstract class InputLanguageEventArgs : EventArgs { //------------------------------------------------------ // // Constructors // //----------------------------------------------------- ////// Constructs an instance of the InputLanguageEventArgs class. /// /// /// The new language id. /// /// /// The previous language id. /// protected InputLanguageEventArgs(CultureInfo newLanguageId, CultureInfo previousLanguageId) { _newLanguageId = newLanguageId; _previousLanguageId = previousLanguageId; } //----------------------------------------------------- // // Public Properties // //----------------------------------------------------- ////// New Language Id. /// public virtual CultureInfo NewLanguage { get { return _newLanguageId; } } ////// Previous Language Id. /// public virtual CultureInfo PreviousLanguage { get { return _previousLanguageId; } } //------------------------------------------------------ // // Private Fields // //----------------------------------------------------- #region Private Fields // the new input language. private CultureInfo _newLanguageId; // the previous input language. private CultureInfo _previousLanguageId; #endregion Private Fields } ////// The InputLanguageEventArgs class represents a type of /// RoutedEventArgs that are relevant to events raised to indicate /// changes. /// public class InputLanguageChangedEventArgs : InputLanguageEventArgs { //------------------------------------------------------ // // Constructors // //------------------------------------------------------ ////// Constructs an instance of the InputLanguageEventArgs class. /// /// /// The new language id. /// /// /// The new language id. /// public InputLanguageChangedEventArgs(CultureInfo newLanguageId, CultureInfo previousLanguageId) : base(newLanguageId, previousLanguageId) { } } ////// The InputLanguageEventArgs class represents a type of /// RoutedEventArgs that are relevant to events raised to indicate /// changes. /// ///public class InputLanguageChangingEventArgs : InputLanguageEventArgs { //----------------------------------------------------- // // Constructors // //------------------------------------------------------ /// /// Constructs an instance of the InputLanguageEventArgs class. /// /// /// The new language id. /// /// /// The previous language id. /// public InputLanguageChangingEventArgs(CultureInfo newLanguageId, CultureInfo previousLanguageId) : base(newLanguageId, previousLanguageId) { _rejected = false; } //----------------------------------------------------- // // Public Properties // //----------------------------------------------------- ////// This is a value to reject the input language change. /// public bool Rejected { get { return _rejected; } set { _rejected = value; } } //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ #region Private Fields // bool to reject the input language change. private bool _rejected; #endregion Private Fields } } // 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
- PriorityBinding.cs
- Select.cs
- GB18030Encoding.cs
- ForeignConstraint.cs
- UpWmlMobileTextWriter.cs
- COSERVERINFO.cs
- LazyLoadBehavior.cs
- HttpChannelHelper.cs
- ReflectPropertyDescriptor.cs
- BitmapEffectInputData.cs
- DBDataPermissionAttribute.cs
- XmlAnyElementAttribute.cs
- CommandCollectionEditor.cs
- BamlRecords.cs
- MobileControlDesigner.cs
- DataGridColumnCollection.cs
- COM2ExtendedUITypeEditor.cs
- ScriptManagerProxy.cs
- WebEventCodes.cs
- ConditionalBranch.cs
- StyleHelper.cs
- EnumerationRangeValidationUtil.cs
- OrderedDictionaryStateHelper.cs
- TransformedBitmap.cs
- XomlCompilerError.cs
- MatrixKeyFrameCollection.cs
- Selection.cs
- WSFederationHttpBindingCollectionElement.cs
- SiteMapHierarchicalDataSourceView.cs
- MessageContractImporter.cs
- DocumentAutomationPeer.cs
- LocatorManager.cs
- ApplicationBuildProvider.cs
- BuiltInExpr.cs
- DesigntimeLicenseContext.cs
- CollectionBase.cs
- ReadOnlyDictionary.cs
- AssemblyBuilder.cs
- DataGridPageChangedEventArgs.cs
- NameGenerator.cs
- SmtpClient.cs
- BaseTemplateParser.cs
- ContextProperty.cs
- ThrowHelper.cs
- DeclarativeCatalogPart.cs
- EditorResources.cs
- RIPEMD160.cs
- CodeDomLoader.cs
- Soap.cs
- DebugView.cs
- Single.cs
- UMPAttributes.cs
- DataGridTextBoxColumn.cs
- XmlSchemaNotation.cs
- Matrix.cs
- NoPersistHandle.cs
- WebPartTransformerCollection.cs
- HandlerWithFactory.cs
- OdbcEnvironment.cs
- HtmlTableCellCollection.cs
- IndexerNameAttribute.cs
- InvalidPropValue.cs
- SqlUserDefinedAggregateAttribute.cs
- SafeWaitHandle.cs
- HttpRequest.cs
- MultilineStringEditor.cs
- PersonalizationProviderCollection.cs
- Point3DCollectionValueSerializer.cs
- ChangePassword.cs
- TextAdaptor.cs
- Directory.cs
- ColorConvertedBitmap.cs
- GridView.cs
- TimeoutValidationAttribute.cs
- CultureInfo.cs
- GroupItem.cs
- ComponentRenameEvent.cs
- Adorner.cs
- TextDecorationCollection.cs
- ProfileManager.cs
- PropertyChangedEventManager.cs
- XmlAttributeAttribute.cs
- InternalResources.cs
- HtmlTableRowCollection.cs
- KeyboardDevice.cs
- MouseGestureConverter.cs
- BufferedGraphics.cs
- NavigationWindowAutomationPeer.cs
- WindowsPen.cs
- Condition.cs
- CodeSnippetTypeMember.cs
- DocumentViewerConstants.cs
- NonceCache.cs
- NumericPagerField.cs
- PartManifestEntry.cs
- XmlWrappingReader.cs
- Base64Stream.cs
- DataServiceConfiguration.cs
- SingleStorage.cs
- CorrelationQuery.cs