Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / BooleanToSelectiveScrollingOrientationConverter.cs / 1305600 / BooleanToSelectiveScrollingOrientationConverter.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Globalization; using System.Windows; using System.Windows.Data; namespace System.Windows.Controls { ////// Converts Boolean to SelectiveScrollin----entation based on the given parameter. /// [Localizability(LocalizationCategory.NeverLocalize)] internal sealed class BooleanToSelectiveScrollin----entationConverter : IValueConverter { ////// Convert Boolean to SelectiveScrollin----entation /// /// Boolean /// SelectiveScrollin----entation /// SelectiveScrollin----entation that should be used when the Boolean is true /// null public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value is bool && parameter is SelectiveScrollin----entation) { var valueAsBool = (bool)value; var parameterSelectiveScrollin----entation = (SelectiveScrollin----entation)parameter; if (valueAsBool) { return parameterSelectiveScrollin----entation; } } return SelectiveScrollin----entation.Both; } ////// Not implemented /// public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Globalization; using System.Windows; using System.Windows.Data; namespace System.Windows.Controls { ////// Converts Boolean to SelectiveScrollin----entation based on the given parameter. /// [Localizability(LocalizationCategory.NeverLocalize)] internal sealed class BooleanToSelectiveScrollin----entationConverter : IValueConverter { ////// Convert Boolean to SelectiveScrollin----entation /// /// Boolean /// SelectiveScrollin----entation /// SelectiveScrollin----entation that should be used when the Boolean is true /// null public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value is bool && parameter is SelectiveScrollin----entation) { var valueAsBool = (bool)value; var parameterSelectiveScrollin----entation = (SelectiveScrollin----entation)parameter; if (valueAsBool) { return parameterSelectiveScrollin----entation; } } return SelectiveScrollin----entation.Both; } ////// Not implemented /// public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } } // 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
- MasterPageCodeDomTreeGenerator.cs
- ExternalDataExchangeService.cs
- NullableLongSumAggregationOperator.cs
- SqlDelegatedTransaction.cs
- CollectionViewGroupInternal.cs
- PeerName.cs
- ToolStripStatusLabel.cs
- DBSchemaRow.cs
- ExpressionTextBoxAutomationPeer.cs
- ServiceHost.cs
- TabOrder.cs
- XmlElementCollection.cs
- EtwTrace.cs
- UnicodeEncoding.cs
- DataControlField.cs
- XmlValueConverter.cs
- HostExecutionContextManager.cs
- EdmItemError.cs
- ObjectComplexPropertyMapping.cs
- MemoryRecordBuffer.cs
- ArrayWithOffset.cs
- XmlNamespaceDeclarationsAttribute.cs
- URI.cs
- UITypeEditor.cs
- ResourcePermissionBase.cs
- Win32KeyboardDevice.cs
- Stackframe.cs
- MinMaxParagraphWidth.cs
- ClientTarget.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- WSHttpBinding.cs
- LocalizationParserHooks.cs
- HTMLTextWriter.cs
- LoadedOrUnloadedOperation.cs
- MethodBuilderInstantiation.cs
- BinaryObjectReader.cs
- TextUtf8RawTextWriter.cs
- DependencySource.cs
- QilInvokeEarlyBound.cs
- TimelineCollection.cs
- HostVisual.cs
- WindowsToolbar.cs
- TypeLoadException.cs
- XmlSchema.cs
- SemanticKeyElement.cs
- SiteOfOriginPart.cs
- CngProvider.cs
- Matrix3DValueSerializer.cs
- BitmapEffect.cs
- BreakRecordTable.cs
- UpdatePanelTrigger.cs
- SqlParameter.cs
- AddInContractAttribute.cs
- CursorConverter.cs
- DifferencingCollection.cs
- CustomPopupPlacement.cs
- ArithmeticException.cs
- ConnectAlgorithms.cs
- ViewStateException.cs
- HttpException.cs
- TrustSection.cs
- ValidatingCollection.cs
- EntityDataSourceSelectedEventArgs.cs
- ApplicationFileCodeDomTreeGenerator.cs
- counter.cs
- TraceSwitch.cs
- RemotingConfiguration.cs
- Invariant.cs
- TableLayoutPanel.cs
- ProfileSection.cs
- TraceUtility.cs
- TableCell.cs
- ExtensionFile.cs
- WindowsToolbarAsMenu.cs
- XmlNotation.cs
- WindowsHyperlink.cs
- LoginView.cs
- Track.cs
- NonBatchDirectoryCompiler.cs
- WithParamAction.cs
- SQLByte.cs
- EdmMember.cs
- Polygon.cs
- StringStorage.cs
- InheritanceContextHelper.cs
- FormViewInsertedEventArgs.cs
- EntityProxyTypeInfo.cs
- X509CertificateInitiatorClientCredential.cs
- LogicalTreeHelper.cs
- RemotingAttributes.cs
- XpsFilter.cs
- SoapServerMessage.cs
- validationstate.cs
- DataGridViewTextBoxEditingControl.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- StringFunctions.cs
- DataGridSortCommandEventArgs.cs
- SQLGuid.cs
- XsdDateTime.cs
- TextRangeBase.cs