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
- InstanceCreationEditor.cs
- CharacterBuffer.cs
- UInt16Storage.cs
- SchemaObjectWriter.cs
- CommonDialog.cs
- Nullable.cs
- UniqueIdentifierService.cs
- DataViewSettingCollection.cs
- ProfileEventArgs.cs
- Unit.cs
- EnumerableRowCollectionExtensions.cs
- PathFigureCollectionConverter.cs
- RedistVersionInfo.cs
- Policy.cs
- XamlVector3DCollectionSerializer.cs
- ChooseAction.cs
- SecurityTokenRequirement.cs
- ExtractorMetadata.cs
- LineProperties.cs
- Resources.Designer.cs
- StreamWriter.cs
- ReverseInheritProperty.cs
- InkSerializer.cs
- EventProviderBase.cs
- AdapterDictionary.cs
- EventWaitHandleSecurity.cs
- SerialReceived.cs
- entityreference_tresulttype.cs
- Context.cs
- GatewayIPAddressInformationCollection.cs
- SchemaImporterExtensionsSection.cs
- XmlSerializerOperationFormatter.cs
- CodeGroup.cs
- PrivateFontCollection.cs
- HostingPreferredMapPath.cs
- CounterCreationDataCollection.cs
- PolicyException.cs
- PageStatePersister.cs
- StructuralType.cs
- DefaultEvaluationContext.cs
- WebPartDisplayModeCollection.cs
- QilVisitor.cs
- StringCollectionMarkupSerializer.cs
- IDispatchConstantAttribute.cs
- AssemblyCollection.cs
- GroupedContextMenuStrip.cs
- HtmlSelect.cs
- MouseEventArgs.cs
- RequiredAttributeAttribute.cs
- VisualTreeFlattener.cs
- embossbitmapeffect.cs
- HtmlAnchor.cs
- StickyNoteAnnotations.cs
- SrgsItemList.cs
- HtmlTableCell.cs
- XhtmlTextWriter.cs
- UdpContractFilterBehavior.cs
- ServiceBehaviorAttribute.cs
- IISMapPath.cs
- MediaTimeline.cs
- StorageFunctionMapping.cs
- CompositionDesigner.cs
- MetabaseServerConfig.cs
- TextStore.cs
- Component.cs
- SessionPageStateSection.cs
- DataComponentGenerator.cs
- DebugView.cs
- StatusBarDrawItemEvent.cs
- DomNameTable.cs
- WebDisplayNameAttribute.cs
- CroppedBitmap.cs
- HttpProfileBase.cs
- FormsAuthenticationUserCollection.cs
- MsmqOutputSessionChannel.cs
- HttpConfigurationContext.cs
- WinCategoryAttribute.cs
- SolidColorBrush.cs
- LogicalTreeHelper.cs
- DialogResultConverter.cs
- RijndaelManagedTransform.cs
- CallSiteHelpers.cs
- WebDescriptionAttribute.cs
- XmlReflectionImporter.cs
- OverflowException.cs
- AuthenticationConfig.cs
- BamlTreeMap.cs
- CryptographicAttribute.cs
- CompatibleComparer.cs
- QueryCacheEntry.cs
- DbConnectionOptions.cs
- MatrixTransform3D.cs
- EmbeddedObject.cs
- ApplicationFileParser.cs
- KeyTimeConverter.cs
- DBBindings.cs
- XmlDigitalSignatureProcessor.cs
- ProtectedConfiguration.cs
- ResizeGrip.cs
- TaskResultSetter.cs