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
- ToolStripPanelRenderEventArgs.cs
- ModelVisual3D.cs
- PerformanceCounter.cs
- DataListItem.cs
- AccessibleObject.cs
- util.cs
- UTF8Encoding.cs
- LogReservationCollection.cs
- CodeMethodMap.cs
- InputScopeNameConverter.cs
- XmlNotation.cs
- ClaimTypes.cs
- LinkUtilities.cs
- TabPanel.cs
- ConfigurationCollectionAttribute.cs
- MailWriter.cs
- ExceptionCollection.cs
- GradientBrush.cs
- FragmentQueryKB.cs
- File.cs
- Deserializer.cs
- Update.cs
- BitmapEffectInput.cs
- BinaryObjectInfo.cs
- WebPartConnectionsConnectVerb.cs
- UIPermission.cs
- CodeCompiler.cs
- EventLogEntry.cs
- TranslateTransform.cs
- ComponentResourceKeyConverter.cs
- HtmlInputSubmit.cs
- WebPartEditorApplyVerb.cs
- ProfileService.cs
- FixedPageAutomationPeer.cs
- PathFigureCollection.cs
- OracleColumn.cs
- ImageAttributes.cs
- KeyInstance.cs
- MaskInputRejectedEventArgs.cs
- messageonlyhwndwrapper.cs
- OutputCacheModule.cs
- SequenceNumber.cs
- DataIdProcessor.cs
- ClientFormsAuthenticationCredentials.cs
- TimelineGroup.cs
- OleDbReferenceCollection.cs
- Viewport3DAutomationPeer.cs
- HttpsHostedTransportConfiguration.cs
- ExpressionEvaluator.cs
- OperatorExpressions.cs
- ErrorRuntimeConfig.cs
- CacheHelper.cs
- StringAnimationBase.cs
- ProjectionCamera.cs
- ArgumentException.cs
- DependencyPropertyDescriptor.cs
- BindingExpressionBase.cs
- UnknownBitmapDecoder.cs
- SecureUICommand.cs
- GeometryModel3D.cs
- NetNamedPipeBindingElement.cs
- TdsParserSessionPool.cs
- HtmlMeta.cs
- EnumMemberAttribute.cs
- WCFBuildProvider.cs
- EmptyReadOnlyDictionaryInternal.cs
- TextRunProperties.cs
- OletxTransactionManager.cs
- MessageHeader.cs
- HTMLTagNameToTypeMapper.cs
- CachedCompositeFamily.cs
- PrtCap_Base.cs
- SelectionGlyph.cs
- ConstraintCollection.cs
- HitTestResult.cs
- CompareInfo.cs
- XmlHelper.cs
- ParsedAttributeCollection.cs
- EntityDescriptor.cs
- WindowsFormsLinkLabel.cs
- ApplicationTrust.cs
- NotFiniteNumberException.cs
- SymbolEqualComparer.cs
- OutputBuffer.cs
- Calendar.cs
- MetadataArtifactLoaderResource.cs
- SmtpMail.cs
- Errors.cs
- BindableAttribute.cs
- CompilerCollection.cs
- VersionPair.cs
- DataPagerFieldItem.cs
- Win32SafeHandles.cs
- Rectangle.cs
- Viewport2DVisual3D.cs
- CodeAccessPermission.cs
- GradientBrush.cs
- MenuItemCollection.cs
- TrackBarRenderer.cs
- InputLangChangeEvent.cs