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
- SelectedDatesCollection.cs
- EventPropertyMap.cs
- FilteredAttributeCollection.cs
- QueryContinueDragEventArgs.cs
- Binding.cs
- OutputCacheProfileCollection.cs
- ConfigurationStrings.cs
- ResourceReferenceKeyNotFoundException.cs
- ThemeDirectoryCompiler.cs
- HtmlLiteralTextAdapter.cs
- SatelliteContractVersionAttribute.cs
- BehaviorEditorPart.cs
- XmlSerializerAssemblyAttribute.cs
- cache.cs
- ToolboxItemCollection.cs
- Substitution.cs
- AnonymousIdentificationSection.cs
- SoapElementAttribute.cs
- XmlNodeReader.cs
- basemetadatamappingvisitor.cs
- ItemDragEvent.cs
- ListItem.cs
- IIS7WorkerRequest.cs
- CodeChecksumPragma.cs
- NumberFunctions.cs
- MethodBuilder.cs
- XmlBoundElement.cs
- nulltextnavigator.cs
- SignatureDescription.cs
- AlphabetConverter.cs
- DataControlFieldCollection.cs
- RootBrowserWindowAutomationPeer.cs
- TiffBitmapEncoder.cs
- _OSSOCK.cs
- TrustLevel.cs
- TextParagraphView.cs
- ColorConverter.cs
- Size3D.cs
- BindingExpressionUncommonField.cs
- TakeOrSkipQueryOperator.cs
- QueryExpr.cs
- BooleanAnimationBase.cs
- RuleEngine.cs
- AssemblyCollection.cs
- SiteMapNodeItem.cs
- QilFunction.cs
- IdleTimeoutMonitor.cs
- XDRSchema.cs
- DebugHandleTracker.cs
- PlaceHolder.cs
- ListViewItemSelectionChangedEvent.cs
- SystemDiagnosticsSection.cs
- ObjectListCommandEventArgs.cs
- BindingMAnagerBase.cs
- Registration.cs
- Events.cs
- ModelPropertyCollectionImpl.cs
- ServiceNotStartedException.cs
- JoinSymbol.cs
- WebPartVerb.cs
- FlowLayout.cs
- Model3DGroup.cs
- HandlerFactoryWrapper.cs
- CodeMethodReturnStatement.cs
- CodeExporter.cs
- TypeContext.cs
- NullEntityWrapper.cs
- StorageInfo.cs
- TableItemStyle.cs
- EncryptedKey.cs
- WeakReference.cs
- NumberEdit.cs
- XmlCodeExporter.cs
- GeneralTransformGroup.cs
- DirectoryNotFoundException.cs
- StaticSiteMapProvider.cs
- SourceFileBuildProvider.cs
- BindingSourceDesigner.cs
- ClientTarget.cs
- ObjectConverter.cs
- XmlQueryContext.cs
- BamlReader.cs
- XmlCodeExporter.cs
- ListDictionary.cs
- ListItem.cs
- PlatformCulture.cs
- ExpandoObject.cs
- HebrewCalendar.cs
- CrossContextChannel.cs
- ToolStripDropTargetManager.cs
- VirtualDirectoryMappingCollection.cs
- KnownColorTable.cs
- ProfileGroupSettings.cs
- System.Data_BID.cs
- VectorCollection.cs
- listitem.cs
- PageBreakRecord.cs
- ResponseStream.cs
- keycontainerpermission.cs
- DeviceContext.cs