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
- XmlDataProvider.cs
- GenericEnumConverter.cs
- WeakReferenceKey.cs
- SByte.cs
- RowUpdatingEventArgs.cs
- DataPagerField.cs
- TransformConverter.cs
- ContentPosition.cs
- FixedSOMSemanticBox.cs
- LinqDataSourceHelper.cs
- Brushes.cs
- ListViewGroupItemCollection.cs
- Sorting.cs
- FtpWebResponse.cs
- TraversalRequest.cs
- ColumnMap.cs
- NominalTypeEliminator.cs
- XmlElementAttributes.cs
- Publisher.cs
- SHA512Managed.cs
- Merger.cs
- PropertyGridView.cs
- TableLayout.cs
- Automation.cs
- AddingNewEventArgs.cs
- SubqueryRules.cs
- CodeTypeReferenceCollection.cs
- ToolStripHighContrastRenderer.cs
- RewritingProcessor.cs
- XmlILModule.cs
- QueryGenerator.cs
- BasicExpressionVisitor.cs
- OverrideMode.cs
- Ticks.cs
- DataGridColumnDropSeparator.cs
- QueryParameter.cs
- PerformanceCounterPermissionEntry.cs
- PerfCounters.cs
- OdbcConnectionStringbuilder.cs
- InheritedPropertyChangedEventArgs.cs
- SocketInformation.cs
- TreeNodeCollection.cs
- DocumentXPathNavigator.cs
- TransactionProxy.cs
- TypedCompletedAsyncResult.cs
- LinearQuaternionKeyFrame.cs
- EventLogPermissionEntry.cs
- CommandArguments.cs
- EndPoint.cs
- MetafileHeader.cs
- Array.cs
- AVElementHelper.cs
- FlagsAttribute.cs
- Stroke.cs
- XmlDeclaration.cs
- TextDecorationCollectionConverter.cs
- JavaScriptString.cs
- cookiecollection.cs
- RelationshipEndMember.cs
- XmlSchemaChoice.cs
- SessionStateContainer.cs
- VisualStates.cs
- ServiceDebugBehavior.cs
- SecurityState.cs
- InkCollectionBehavior.cs
- Underline.cs
- NetNamedPipeSecurityElement.cs
- JsonQNameDataContract.cs
- DataBindingList.cs
- UserUseLicenseDictionaryLoader.cs
- DataReaderContainer.cs
- Base64Encoder.cs
- UrlMappingsSection.cs
- SamlAdvice.cs
- TraceContextRecord.cs
- Walker.cs
- SchemaComplexType.cs
- FormViewDesigner.cs
- TabletDeviceInfo.cs
- ContainerControl.cs
- CheckBoxPopupAdapter.cs
- MasterPageBuildProvider.cs
- HMAC.cs
- Byte.cs
- StringBuilder.cs
- InternalResources.cs
- MediaElementAutomationPeer.cs
- Visual.cs
- TranslateTransform.cs
- SingleObjectCollection.cs
- SrgsGrammar.cs
- LiteralControl.cs
- CompositeScriptReferenceEventArgs.cs
- ListItemCollection.cs
- XamlReader.cs
- TabOrder.cs
- RegexStringValidatorAttribute.cs
- PointLight.cs
- FontFamily.cs
- DataGridLinkButton.cs