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
- AsymmetricSignatureFormatter.cs
- ParameterSubsegment.cs
- UnitySerializationHolder.cs
- TextRangeEditTables.cs
- NodeLabelEditEvent.cs
- Int16Animation.cs
- EntityDataSourceReferenceGroup.cs
- GeometryHitTestResult.cs
- LayoutSettings.cs
- EventDescriptor.cs
- TableRowGroupCollection.cs
- NeutralResourcesLanguageAttribute.cs
- ProcessStartInfo.cs
- PixelShader.cs
- InstanceLockQueryResult.cs
- DataGridSortCommandEventArgs.cs
- _CacheStreams.cs
- ProfileSettings.cs
- UrlPath.cs
- RoleManagerModule.cs
- GCHandleCookieTable.cs
- HtmlInputImage.cs
- ReaderWriterLock.cs
- ZipPackagePart.cs
- RoleManagerSection.cs
- ContentElementAutomationPeer.cs
- BlurEffect.cs
- SynchronizationLockException.cs
- ListViewDataItem.cs
- AppDomainManager.cs
- PersonalizableAttribute.cs
- ScrollViewer.cs
- GroupQuery.cs
- ResizeBehavior.cs
- ProtocolsConfigurationEntry.cs
- RelationshipEntry.cs
- DBBindings.cs
- Preprocessor.cs
- BitmapFrameDecode.cs
- RuleDefinitions.cs
- XmlSchemaAttributeGroup.cs
- UnsafeNativeMethods.cs
- PageParserFilter.cs
- MessageHeaderException.cs
- GeneralTransform2DTo3DTo2D.cs
- SeparatorAutomationPeer.cs
- UpdateManifestForBrowserApplication.cs
- SQLString.cs
- DescendantOverDescendantQuery.cs
- PolicyException.cs
- ParameterCollection.cs
- FixedSchema.cs
- UserMapPath.cs
- ConditionedDesigner.cs
- GZipStream.cs
- OrderedDictionary.cs
- UniqueEventHelper.cs
- CodeDomLoader.cs
- FaultHandlingFilter.cs
- LayoutTableCell.cs
- CatalogPartChrome.cs
- SystemPens.cs
- TransportChannelListener.cs
- SqlCommandBuilder.cs
- WebPartsPersonalizationAuthorization.cs
- ConfigurationSection.cs
- FrameworkRichTextComposition.cs
- FrameworkElementFactoryMarkupObject.cs
- HighlightOverlayGlyph.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- PackageDigitalSignature.cs
- ProxyWebPart.cs
- UntypedNullExpression.cs
- StylusPlugin.cs
- CapiSafeHandles.cs
- ByteRangeDownloader.cs
- FactoryGenerator.cs
- ClientRuntimeConfig.cs
- UrlParameterReader.cs
- UnsafeNativeMethodsPenimc.cs
- PrintPreviewGraphics.cs
- HtmlContainerControl.cs
- TreeNodeClickEventArgs.cs
- ReadOnlyDictionary.cs
- DuplexChannelBinder.cs
- BitVector32.cs
- DateTimeUtil.cs
- XPathNodePointer.cs
- UITypeEditor.cs
- GeometryCombineModeValidation.cs
- VerificationAttribute.cs
- VectorCollection.cs
- StrokeCollection.cs
- Subtree.cs
- Helpers.cs
- LineGeometry.cs
- DbProviderManifest.cs
- DataTableReaderListener.cs
- SchemaElement.cs
- ExternalFile.cs