Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Presentation / System / Activities / Presentation / View / ExpressionTextBoxAutomationPeer.cs / 1305376 / ExpressionTextBoxAutomationPeer.cs
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Automation.Peers; using System.Windows; using System.Runtime.InteropServices; using System.Xml.Linq; using System.Globalization; namespace System.Activities.Presentation.View { [System.Runtime.Fx.Tag.XamlVisible(false)] class ExpressionTextBoxAutomationPeer : UIElementAutomationPeer { public ExpressionTextBoxAutomationPeer(ExpressionTextBox owner) : base(owner) { } protected override string GetItemStatusCore() { ExpressionTextBox textBox = this.Owner as ExpressionTextBox; if (textBox != null) { XElement itemStatus = new XElement("ExpressionTextBoxItemStatus", new XAttribute("Status", textBox.HasErrors ? "Invalid" : "Valid"), new XAttribute("EditingState", textBox.EditingState.ToString(CultureInfo.InvariantCulture)), new XAttribute("ErrorMessage", String.IsNullOrEmpty(textBox.ErrorMessage) ? String.Empty : textBox.ErrorMessage)); return itemStatus.ToString(); } return base.GetItemStatusCore(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Automation.Peers; using System.Windows; using System.Runtime.InteropServices; using System.Xml.Linq; using System.Globalization; namespace System.Activities.Presentation.View { [System.Runtime.Fx.Tag.XamlVisible(false)] class ExpressionTextBoxAutomationPeer : UIElementAutomationPeer { public ExpressionTextBoxAutomationPeer(ExpressionTextBox owner) : base(owner) { } protected override string GetItemStatusCore() { ExpressionTextBox textBox = this.Owner as ExpressionTextBox; if (textBox != null) { XElement itemStatus = new XElement("ExpressionTextBoxItemStatus", new XAttribute("Status", textBox.HasErrors ? "Invalid" : "Valid"), new XAttribute("EditingState", textBox.EditingState.ToString(CultureInfo.InvariantCulture)), new XAttribute("ErrorMessage", String.IsNullOrEmpty(textBox.ErrorMessage) ? String.Empty : textBox.ErrorMessage)); return itemStatus.ToString(); } return base.GetItemStatusCore(); } } } // 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
- Viewport3DVisual.cs
- DataTemplate.cs
- Int64.cs
- SafeHandles.cs
- DataServices.cs
- BitmapEffectCollection.cs
- CodeSnippetCompileUnit.cs
- ProjectionPruner.cs
- RegisteredScript.cs
- HGlobalSafeHandle.cs
- WeakEventManager.cs
- MouseGestureConverter.cs
- OperatorExpressions.cs
- FormViewDesigner.cs
- MainMenu.cs
- StateItem.cs
- TreeViewCancelEvent.cs
- ContextMenuStrip.cs
- JsonFormatGeneratorStatics.cs
- AlphabeticalEnumConverter.cs
- NameValueFileSectionHandler.cs
- DesignerSelectionListAdapter.cs
- PropertyReference.cs
- TwoPhaseCommit.cs
- DataObjectCopyingEventArgs.cs
- MethodBuilderInstantiation.cs
- TextChange.cs
- WindowsMenu.cs
- TextElementEditingBehaviorAttribute.cs
- OleDragDropHandler.cs
- CFGGrammar.cs
- GridEntry.cs
- SinglePageViewer.cs
- SecurityManager.cs
- Activity.cs
- ThemeInfoAttribute.cs
- SurrogateChar.cs
- ObjectViewQueryResultData.cs
- ISO2022Encoding.cs
- SafeCryptHandles.cs
- XmlSubtreeReader.cs
- SiblingIterators.cs
- GridViewRowPresenterBase.cs
- MergePropertyDescriptor.cs
- FormsAuthenticationTicket.cs
- CreateUserWizardDesigner.cs
- SmiEventSink.cs
- ListItem.cs
- TextEndOfLine.cs
- CodeIterationStatement.cs
- TextTreeNode.cs
- EventEntry.cs
- WindowsBrush.cs
- KeyValueSerializer.cs
- BamlResourceDeserializer.cs
- EditorAttribute.cs
- WebRequestModuleElementCollection.cs
- ResourcesBuildProvider.cs
- TransferMode.cs
- CompatibleIComparer.cs
- GroupBoxRenderer.cs
- AssociationProvider.cs
- WinFormsUtils.cs
- ContainerControl.cs
- ListView.cs
- PresentationSource.cs
- BasicDesignerLoader.cs
- FormsIdentity.cs
- LockRecoveryTask.cs
- XmlDictionaryString.cs
- WebPartConnectVerb.cs
- TypeRestriction.cs
- EventHandlers.cs
- SamlAuthenticationStatement.cs
- CommentEmitter.cs
- ListControl.cs
- HScrollProperties.cs
- LogStream.cs
- TreeViewDesigner.cs
- PeekCompletedEventArgs.cs
- BrowserTree.cs
- AttachedAnnotation.cs
- PathGradientBrush.cs
- SchemaNames.cs
- AlignmentXValidation.cs
- BaseInfoTable.cs
- SmtpMail.cs
- CounterCreationDataCollection.cs
- UnsafeNativeMethods.cs
- ContentValidator.cs
- PerformanceCounterCategory.cs
- FloatUtil.cs
- Single.cs
- SoapIgnoreAttribute.cs
- JavascriptXmlWriterWrapper.cs
- KeySplineConverter.cs
- IPAddressCollection.cs
- MetafileHeader.cs
- SingleBodyParameterMessageFormatter.cs
- CompModSwitches.cs