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
- XmlTypeMapping.cs
- LinearQuaternionKeyFrame.cs
- DataPagerCommandEventArgs.cs
- EntityDataSourceStatementEditor.cs
- XPathNodePointer.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- TcpConnectionPoolSettingsElement.cs
- SQLByteStorage.cs
- PaperSize.cs
- EntityDesignerDataSourceView.cs
- StandardBindingElement.cs
- UiaCoreApi.cs
- Block.cs
- RuntimeDelegateArgument.cs
- DesignerTextViewAdapter.cs
- FilterQuery.cs
- RecognizeCompletedEventArgs.cs
- XamlStyleSerializer.cs
- CharUnicodeInfo.cs
- Rotation3DAnimationUsingKeyFrames.cs
- DebugView.cs
- TextEndOfLine.cs
- NameValueSectionHandler.cs
- SoapEnumAttribute.cs
- TransformBlockRequest.cs
- Speller.cs
- HybridDictionary.cs
- Point.cs
- XmlUtilWriter.cs
- UIntPtr.cs
- ErasingStroke.cs
- DependencyPropertyValueSerializer.cs
- WebPartVerb.cs
- GridViewItemAutomationPeer.cs
- SpellCheck.cs
- WaitForChangedResult.cs
- WorkflowElementDialog.cs
- DiscoveryClientReferences.cs
- URLAttribute.cs
- DateTimeConverter.cs
- IgnoreFlushAndCloseStream.cs
- CompoundFileIOPermission.cs
- UTF8Encoding.cs
- SortFieldComparer.cs
- ObjectPersistData.cs
- BinaryReader.cs
- XsltFunctions.cs
- ExpressionBuilderContext.cs
- SizeKeyFrameCollection.cs
- DragAssistanceManager.cs
- SqlServices.cs
- InputDevice.cs
- DeleteCardRequest.cs
- UrlAuthorizationModule.cs
- BypassElement.cs
- NavigatingCancelEventArgs.cs
- CancellationHandlerDesigner.cs
- ImageInfo.cs
- StorageAssociationSetMapping.cs
- FontSource.cs
- DataGridViewCellEventArgs.cs
- CodeThrowExceptionStatement.cs
- ServiceDocument.cs
- MetadataPropertyAttribute.cs
- HttpProfileGroupBase.cs
- SchemaObjectWriter.cs
- DataGridViewControlCollection.cs
- ZipIOLocalFileDataDescriptor.cs
- WmlImageAdapter.cs
- ExtenderControl.cs
- PtsHelper.cs
- WindowsTooltip.cs
- EmptyImpersonationContext.cs
- EntityDataSourceDesigner.cs
- LocationSectionRecord.cs
- PropertyBuilder.cs
- NameHandler.cs
- Config.cs
- SafeTimerHandle.cs
- newinstructionaction.cs
- XmlDocumentSchema.cs
- TableItemStyle.cs
- RangeValueProviderWrapper.cs
- UIElementHelper.cs
- ListViewDeleteEventArgs.cs
- InkCanvasFeedbackAdorner.cs
- PersonalizationDictionary.cs
- ComplexObject.cs
- ComponentCollection.cs
- UpdateRecord.cs
- ElementAction.cs
- ModelFunctionTypeElement.cs
- EditorServiceContext.cs
- bidPrivateBase.cs
- ActivityInterfaces.cs
- Parameter.cs
- milexports.cs
- NavigationPropertyEmitter.cs
- CfgArc.cs
- XmlConverter.cs