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
- RepeaterDataBoundAdapter.cs
- SqlFormatter.cs
- DiscoveryDocumentReference.cs
- SubMenuStyleCollection.cs
- DataSourceSelectArguments.cs
- UserControl.cs
- ActivityUtilities.cs
- DataGridViewCellCollection.cs
- FlowLayoutSettings.cs
- ActivityExecutorOperation.cs
- ProcessStartInfo.cs
- ZipFileInfoCollection.cs
- UnsafeNativeMethods.cs
- ErrorEventArgs.cs
- WebPartCollection.cs
- DrawingBrush.cs
- DetailsViewModeEventArgs.cs
- SelectedGridItemChangedEvent.cs
- GetImportedCardRequest.cs
- ComponentEditorPage.cs
- FullTrustAssembly.cs
- DiscoveryInnerClientManaged11.cs
- Wildcard.cs
- AssociationSet.cs
- HeaderedContentControl.cs
- Currency.cs
- CqlParser.cs
- BypassElementCollection.cs
- PerCallInstanceContextProvider.cs
- DataGridTablesFactory.cs
- BlockUIContainer.cs
- NetworkInterface.cs
- OneWayBindingElementImporter.cs
- WebScriptMetadataMessage.cs
- QueryExpr.cs
- ListViewSelectEventArgs.cs
- SoapAttributeOverrides.cs
- DataBoundControl.cs
- TextModifier.cs
- GreenMethods.cs
- Int64Animation.cs
- ObsoleteAttribute.cs
- SocketPermission.cs
- XmlStringTable.cs
- XmlComplianceUtil.cs
- PeerNodeTraceRecord.cs
- followingquery.cs
- TextBoxAutomationPeer.cs
- CellTreeNodeVisitors.cs
- ServicesSection.cs
- MailSettingsSection.cs
- PeerSecurityHelpers.cs
- XmlAnyElementAttribute.cs
- TemplateField.cs
- ListManagerBindingsCollection.cs
- Calendar.cs
- DropShadowBitmapEffect.cs
- filewebresponse.cs
- MarkupCompilePass1.cs
- ObjectQueryExecutionPlan.cs
- ColorKeyFrameCollection.cs
- TableRow.cs
- KnownColorTable.cs
- ServiceContractDetailViewControl.cs
- WindowsHyperlink.cs
- Helper.cs
- OpCellTreeNode.cs
- WebPartDescription.cs
- ConnectionStringSettingsCollection.cs
- AppSettingsReader.cs
- SystemResourceKey.cs
- XmlFormatExtensionPrefixAttribute.cs
- ExtendedPropertyDescriptor.cs
- AdornerLayer.cs
- HtmlMeta.cs
- ExpressionParser.cs
- NullPackagingPolicy.cs
- MarginsConverter.cs
- FixedNode.cs
- Substitution.cs
- RegexRunner.cs
- LineMetrics.cs
- NativeActivity.cs
- SigningCredentials.cs
- DataGridColumnCollection.cs
- SolidColorBrush.cs
- MachineKeyConverter.cs
- ResourceReader.cs
- EnumType.cs
- XsltLibrary.cs
- DiagnosticTraceSource.cs
- DataGridCell.cs
- MetadataHelper.cs
- ObjectIDGenerator.cs
- RoutedEvent.cs
- ProtocolsConfigurationEntry.cs
- MembershipUser.cs
- DataRowExtensions.cs
- ByteKeyFrameCollection.cs
- RegexParser.cs