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
- BitmapDecoder.cs
- Vector3DKeyFrameCollection.cs
- InstancePersistenceCommand.cs
- DynamicQueryableWrapper.cs
- WebResourceAttribute.cs
- BadImageFormatException.cs
- AnnotationHighlightLayer.cs
- ProjectionAnalyzer.cs
- PathFigureCollection.cs
- ConfigurationLockCollection.cs
- EntityType.cs
- HttpEncoder.cs
- XPathDescendantIterator.cs
- MetadataItem_Static.cs
- Evaluator.cs
- BooleanAnimationUsingKeyFrames.cs
- SQLGuidStorage.cs
- Header.cs
- DefaultObjectMappingItemCollection.cs
- AssemblyAssociatedContentFileAttribute.cs
- ActionFrame.cs
- CompoundFileIOPermission.cs
- DefaultAssemblyResolver.cs
- PageRouteHandler.cs
- AbandonedMutexException.cs
- OpacityConverter.cs
- ManifestResourceInfo.cs
- WebPartManagerInternals.cs
- SkewTransform.cs
- NativeMethods.cs
- AttachmentService.cs
- TypeUnloadedException.cs
- UInt64Storage.cs
- CapabilitiesState.cs
- ZipIORawDataFileBlock.cs
- ReadOnlyPermissionSet.cs
- MexTcpBindingCollectionElement.cs
- ObjectListTitleAttribute.cs
- DbConnectionClosed.cs
- TextSimpleMarkerProperties.cs
- MdImport.cs
- LicFileLicenseProvider.cs
- OutputChannelBinder.cs
- ResetableIterator.cs
- CheckBoxRenderer.cs
- InstanceLockException.cs
- EditorZone.cs
- WCFBuildProvider.cs
- ThicknessAnimation.cs
- ObjectAnimationBase.cs
- DBCommand.cs
- PhysicalOps.cs
- SecondaryViewProvider.cs
- DragStartedEventArgs.cs
- DoubleIndependentAnimationStorage.cs
- AssemblyResourceLoader.cs
- XmlValidatingReader.cs
- DBDataPermissionAttribute.cs
- StorageFunctionMapping.cs
- BatchStream.cs
- PKCS1MaskGenerationMethod.cs
- ClientRuntimeConfig.cs
- XmlSubtreeReader.cs
- EntryIndex.cs
- securitymgrsite.cs
- EventSchemaTraceListener.cs
- Configuration.cs
- TypeFieldSchema.cs
- RenderingEventArgs.cs
- CodeDirectionExpression.cs
- DataRowExtensions.cs
- MessageBox.cs
- TransformConverter.cs
- ProfileManager.cs
- PageContentAsyncResult.cs
- XMLUtil.cs
- SchemaCollectionPreprocessor.cs
- Size3D.cs
- SecurityTokenSpecification.cs
- EntryPointNotFoundException.cs
- ServiceOperationParameter.cs
- SliderAutomationPeer.cs
- PointF.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- RotateTransform3D.cs
- EUCJPEncoding.cs
- ResumeStoryboard.cs
- WindowsBrush.cs
- InternalBase.cs
- TraceListeners.cs
- RegistryDataKey.cs
- MetaDataInfo.cs
- TransactionScopeDesigner.cs
- linebase.cs
- CollectionBase.cs
- BaseConfigurationRecord.cs
- HtmlSelect.cs
- ToolStripGripRenderEventArgs.cs
- CommandEventArgs.cs
- LogWriteRestartAreaState.cs