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
- MatchingStyle.cs
- CellLabel.cs
- MembershipUser.cs
- wgx_sdk_version.cs
- KeyToListMap.cs
- ContextMenu.cs
- CompositeFontParser.cs
- Memoizer.cs
- Stroke.cs
- EdmMember.cs
- CompilerParameters.cs
- HyperLinkColumn.cs
- ImageBrush.cs
- BufferedWebEventProvider.cs
- SystemResources.cs
- FileDialogCustomPlacesCollection.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- DbConnectionPoolOptions.cs
- DbParameterHelper.cs
- ScrollItemPatternIdentifiers.cs
- DecoderFallback.cs
- templategroup.cs
- DesignerGenericWebPart.cs
- PolicyValidator.cs
- SafeMarshalContext.cs
- SettingsPropertyNotFoundException.cs
- ModifierKeysValueSerializer.cs
- EntityProviderServices.cs
- MetricEntry.cs
- HtmlTable.cs
- TemplateControlBuildProvider.cs
- UnsafeNativeMethodsMilCoreApi.cs
- ProxyHelper.cs
- FilteredXmlReader.cs
- followingquery.cs
- SQLInt16Storage.cs
- WithParamAction.cs
- PersonalizationStateQuery.cs
- CfgParser.cs
- Variant.cs
- PrimitiveOperationFormatter.cs
- MatrixTransform3D.cs
- WindowsListView.cs
- CssClassPropertyAttribute.cs
- SafeLibraryHandle.cs
- XmlSerializer.cs
- ExpandButtonVisibilityConverter.cs
- Helpers.cs
- PasswordTextNavigator.cs
- Panel.cs
- GridViewColumn.cs
- Win32.cs
- SiteMap.cs
- Variant.cs
- MatcherBuilder.cs
- AnonymousIdentificationModule.cs
- ViewLoader.cs
- Filter.cs
- ObjectDataSourceView.cs
- HijriCalendar.cs
- UpdatePanel.cs
- SafePEFileHandle.cs
- XPathNodeHelper.cs
- XPathArrayIterator.cs
- TraceAsyncResult.cs
- DrawingImage.cs
- XmlDomTextWriter.cs
- Int32AnimationUsingKeyFrames.cs
- AbandonedMutexException.cs
- DataGridViewColumnTypeEditor.cs
- PassportAuthentication.cs
- Empty.cs
- ControlParameter.cs
- InternalPermissions.cs
- ToolStripOverflow.cs
- DesignObjectWrapper.cs
- InvalidDataContractException.cs
- DataMember.cs
- StringValidator.cs
- ImageSource.cs
- LeaseManager.cs
- DataColumnCollection.cs
- BooleanKeyFrameCollection.cs
- ProtocolsConfigurationEntry.cs
- PingReply.cs
- NamespaceListProperty.cs
- BitArray.cs
- RangeContentEnumerator.cs
- SafeEventLogWriteHandle.cs
- RemotingSurrogateSelector.cs
- AuthStoreRoleProvider.cs
- FormattedText.cs
- ThumbAutomationPeer.cs
- WebPartConnectionsCancelVerb.cs
- sqlser.cs
- TypeTypeConverter.cs
- EntitySet.cs
- Attachment.cs
- CheckBoxPopupAdapter.cs
- LinqDataSourceHelper.cs