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
- ObjectStateFormatter.cs
- Shape.cs
- ErrorBehavior.cs
- WrappedReader.cs
- Interfaces.cs
- complextypematerializer.cs
- InkCanvasFeedbackAdorner.cs
- StickyNoteHelper.cs
- Bits.cs
- TypedTableHandler.cs
- PolicyManager.cs
- WebPartEventArgs.cs
- ADConnectionHelper.cs
- RijndaelManaged.cs
- CustomAttributeSerializer.cs
- TextBox.cs
- StatusBar.cs
- QilParameter.cs
- EventPrivateKey.cs
- RandomNumberGenerator.cs
- HtmlAnchor.cs
- Material.cs
- ParameterElement.cs
- PackagePart.cs
- VideoDrawing.cs
- ImpersonationContext.cs
- DateBoldEvent.cs
- DocumentGrid.cs
- ListViewUpdateEventArgs.cs
- DocumentAutomationPeer.cs
- DataTableMappingCollection.cs
- UnknownBitmapEncoder.cs
- WSDualHttpSecurityMode.cs
- StylusOverProperty.cs
- WindowsMenu.cs
- DataGridViewImageCell.cs
- RecipientIdentity.cs
- ResolveNameEventArgs.cs
- ImmutableObjectAttribute.cs
- FixedTextBuilder.cs
- ParallelQuery.cs
- Column.cs
- ShimAsPublicXamlType.cs
- DataList.cs
- ArrayConverter.cs
- DbDataReader.cs
- LocatorGroup.cs
- SmiTypedGetterSetter.cs
- CodeSnippetStatement.cs
- XmlMemberMapping.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- OpCopier.cs
- OleDbError.cs
- VariableModifiersHelper.cs
- DynamicPropertyReader.cs
- Normalizer.cs
- Util.cs
- CacheSection.cs
- HtmlEncodedRawTextWriter.cs
- DesignUtil.cs
- ResourceDescriptionAttribute.cs
- AppDomainGrammarProxy.cs
- CommandID.cs
- SqlRowUpdatingEvent.cs
- AbstractSvcMapFileLoader.cs
- FrameworkPropertyMetadata.cs
- AccessibleObject.cs
- ISessionStateStore.cs
- XmlResolver.cs
- Line.cs
- AutoCompleteStringCollection.cs
- TypeElementCollection.cs
- HttpPostedFile.cs
- Itemizer.cs
- XmlSchemaInclude.cs
- PersonalizationStateInfoCollection.cs
- SpeechSynthesizer.cs
- SocketInformation.cs
- SparseMemoryStream.cs
- HexParser.cs
- HttpApplication.cs
- ListMarkerSourceInfo.cs
- BufferModesCollection.cs
- DesignerActionMethodItem.cs
- ConstNode.cs
- Input.cs
- EntityProviderServices.cs
- EditCommandColumn.cs
- EventProviderClassic.cs
- Sql8ConformanceChecker.cs
- XmlNodeChangedEventManager.cs
- MTConfigUtil.cs
- TerminatorSinks.cs
- WbmpConverter.cs
- MapPathBasedVirtualPathProvider.cs
- DataRecordObjectView.cs
- TemplatePartAttribute.cs
- DataControlCommands.cs
- TextElementEnumerator.cs
- ExecutionTracker.cs