Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Core.Presentation / System / Activities / Core / Presentation / MaxValueConverter.cs / 1305376 / MaxValueConverter.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.Activities.Core.Presentation { using System.Globalization; using System.Windows.Data; using System.Activities.Presentation; using System.Activities.Presentation.Model; using System.Activities.Statements; //Returns the maximum of input values. Input values should be of type double. class MaxValueConverter : IMultiValueConverter { public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { double maxValue = double.MinValue; foreach (object value in values) { double val = (double)value; if (!double.IsNaN(val) && val > maxValue) { maxValue = val; } } if (maxValue == double.MinValue) { maxValue = double.NaN; } return maxValue; } public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) { throw FxTrace.Exception.AsError(new NotSupportedException()); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextEndOfParagraph.cs
- DataDocumentXPathNavigator.cs
- EventLogger.cs
- ProxyHelper.cs
- EditingCommands.cs
- OneOfScalarConst.cs
- XamlStackWriter.cs
- LightweightCodeGenerator.cs
- VersionPair.cs
- BitmapEffectCollection.cs
- RtfNavigator.cs
- Rotation3D.cs
- ToolStripRenderer.cs
- FontClient.cs
- GroupBoxRenderer.cs
- ZipArchive.cs
- StylusLogic.cs
- TransactionException.cs
- TableLayout.cs
- XNameTypeConverter.cs
- SetStoryboardSpeedRatio.cs
- DocumentSequenceHighlightLayer.cs
- HttpApplicationStateBase.cs
- FixUp.cs
- ObjectPropertyMapping.cs
- TextFindEngine.cs
- PerformanceCounter.cs
- XPathQilFactory.cs
- HiddenFieldPageStatePersister.cs
- BrowserInteropHelper.cs
- Transform3DCollection.cs
- DataTablePropertyDescriptor.cs
- ForceCopyBuildProvider.cs
- OleDbRowUpdatedEvent.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- FlowchartStart.xaml.cs
- SubMenuStyleCollection.cs
- XmlSerializationReader.cs
- HScrollBar.cs
- MaskPropertyEditor.cs
- HttpAsyncResult.cs
- DataPagerFieldCollection.cs
- RectAnimationUsingKeyFrames.cs
- OdbcUtils.cs
- SelectionChangedEventArgs.cs
- SyntaxCheck.cs
- ProjectedSlot.cs
- HandlerBase.cs
- DataListItem.cs
- TabItemWrapperAutomationPeer.cs
- MenuRenderer.cs
- DiagnosticEventProvider.cs
- _SSPISessionCache.cs
- ElementAction.cs
- CultureInfoConverter.cs
- DataConnectionHelper.cs
- StringFormat.cs
- GenericWebPart.cs
- XmlObjectSerializerReadContextComplex.cs
- HtmlInputHidden.cs
- SqlDelegatedTransaction.cs
- PerformanceCounterCategory.cs
- HashRepartitionEnumerator.cs
- DataGridViewElement.cs
- IndexedWhereQueryOperator.cs
- Model3D.cs
- NameTable.cs
- DbDataReader.cs
- PartialList.cs
- AttachedPropertyDescriptor.cs
- BulletChrome.cs
- CursorConverter.cs
- TransformedBitmap.cs
- Renderer.cs
- XmlTypeAttribute.cs
- BuildProvider.cs
- SqlEnums.cs
- EventlogProvider.cs
- KeyMatchBuilder.cs
- CodeCommentStatement.cs
- SplashScreen.cs
- StylusButton.cs
- DispatcherHookEventArgs.cs
- MultiPartWriter.cs
- CodeObjectCreateExpression.cs
- MemberHolder.cs
- EditingCoordinator.cs
- CalendarSelectionChangedEventArgs.cs
- CacheDependency.cs
- SubstitutionList.cs
- DataDocumentXPathNavigator.cs
- XMLDiffLoader.cs
- SEHException.cs
- Italic.cs
- DBConcurrencyException.cs
- MarkupExtensionReturnTypeAttribute.cs
- DefaultSection.cs
- XmlSerializationGeneratedCode.cs
- HttpValueCollection.cs
- ReadContentAsBinaryHelper.cs