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
- Certificate.cs
- FixedPage.cs
- ListViewCommandEventArgs.cs
- SqlBinder.cs
- ThreadAbortException.cs
- MdImport.cs
- InternalTypeHelper.cs
- ManifestSignatureInformation.cs
- ImageBrush.cs
- UInt32Storage.cs
- OleDbMetaDataFactory.cs
- TextServicesContext.cs
- CryptographicAttribute.cs
- documentation.cs
- IChannel.cs
- HttpContextServiceHost.cs
- SystemPens.cs
- ProxySimple.cs
- DockAndAnchorLayout.cs
- UIPermission.cs
- XmlSchemaIdentityConstraint.cs
- SmtpNtlmAuthenticationModule.cs
- PropertyChangedEventArgs.cs
- ContextMenuStrip.cs
- ConfigurationLocation.cs
- NativeWindow.cs
- Matrix3DStack.cs
- Package.cs
- BuildProvidersCompiler.cs
- TableCellCollection.cs
- PointKeyFrameCollection.cs
- XmlParser.cs
- WebHttpBinding.cs
- _NegoStream.cs
- EntitySqlException.cs
- ArgumentException.cs
- PrivilegeNotHeldException.cs
- EntityChangedParams.cs
- FormsAuthenticationModule.cs
- TextRangeEditTables.cs
- TypeReference.cs
- TreeNodeStyle.cs
- BCLDebug.cs
- CompiledQueryCacheKey.cs
- BrowserDefinitionCollection.cs
- CookieProtection.cs
- Mappings.cs
- InvalidComObjectException.cs
- RelationshipWrapper.cs
- CompiledRegexRunnerFactory.cs
- CursorConverter.cs
- ParagraphResult.cs
- TimeStampChecker.cs
- MappedMetaModel.cs
- ParameterCollection.cs
- ThumbAutomationPeer.cs
- TextBox.cs
- XmlWriterSettings.cs
- PropertyConverter.cs
- EncoderFallback.cs
- _LocalDataStore.cs
- Atom10ItemFormatter.cs
- XmlWriterTraceListener.cs
- GPRECT.cs
- DecimalFormatter.cs
- RawTextInputReport.cs
- PaperSize.cs
- HttpModulesSection.cs
- DesignerContextDescriptor.cs
- RegexWriter.cs
- DelimitedListTraceListener.cs
- DataGridViewCellValueEventArgs.cs
- SignedXml.cs
- CssStyleCollection.cs
- webbrowsersite.cs
- ThreadAbortException.cs
- AuthorizationRule.cs
- CapabilitiesUse.cs
- PropertyFilterAttribute.cs
- FormViewCommandEventArgs.cs
- TraceSection.cs
- ToolStripStatusLabel.cs
- SvcMapFileSerializer.cs
- ScriptHandlerFactory.cs
- RuntimeWrappedException.cs
- Activity.cs
- SafeProcessHandle.cs
- CompiledXpathExpr.cs
- Selection.cs
- ColorTransform.cs
- MethodImplAttribute.cs
- InvokePattern.cs
- CodeRegionDirective.cs
- webproxy.cs
- PlanCompilerUtil.cs
- ITreeGenerator.cs
- GridErrorDlg.cs
- HtmlTableCell.cs
- RestHandler.cs
- StringKeyFrameCollection.cs