53 references to CanConvertTo
PresentationBuildTasks (2)
BuildTasks\Ms\Internal\MarkupCompiler\MarkupCompiler.cs (2)
1603if (converter.CanConvertTo(typeof(string))) 1671if (converter.CanConvertTo(typeof(string)))
PresentationFramework (8)
src\Framework\MS\Internal\Data\DefaultValueConverter.cs (2)
157canConvertTo = (typeConverter != null) ? typeConverter.CanConvertTo(targetType) : false; 169canConvertTo = (typeConverter != null) ? typeConverter.CanConvertTo(sourceType) : false;
src\Framework\System\Windows\Controls\ContentPresenter.cs (3)
1016Debug.Assert(tc.CanConvertTo(typeof(UIElement))); 1126Debug.Assert(!(tc != null && tc.CanConvertTo(typeof(UIElement)))); // this is handled by a different template 1188tc.CanConvertTo(typeof(UIElement)))
src\Framework\System\Windows\Documents\TextRangeSerialization.cs (1)
1158Invariant.Assert(typeConverter.CanConvertTo(typeof(string)), "type is expected to be convertable into string type");
src\Framework\System\Windows\Markup\Primitives\ElementMarkupObject.cs (1)
832converter.CanConvertTo(typeof(MarkupExtension)))
src\Framework\System\Windows\PropertyPathConverter.cs (1)
289if (converter.CanConvertTo(typeof(string)) && converter.CanConvertFrom(typeof(string)))
System (3)
sys\system\configuration\ApplicationSettingsBase.cs (1)
653bool toString = tc.CanConvertTo(typeof(string));
sys\system\configuration\SettingsPropertyValue.cs (2)
207if (converter != null && converter.CanConvertTo(typeof(String)) && converter.CanConvertFrom(typeof(String))) 248if (converter != null && converter.CanConvertTo(typeof(String)) && converter.CanConvertFrom(typeof(String)))
System.Activities (2)
System\Activities\Expressions\Literal.cs (2)
88converter.CanConvertTo(TypeHelper.StringType) && 162converter.CanConvertTo(TypeHelper.StringType) &&
System.Activities.Core.Presentation (1)
System\Activities\Core\Presentation\CaseKeyBox.ViewModel.cs (1)
276if (!converter.CanConvertFrom(typeof(string)) || !converter.CanConvertTo(typeof(string)))
System.Activities.Presentation (3)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Editors\PropertyValueToStandardValuesConverter.cs (1)
95if (standardValues != null && (converter == null || !converter.CanConvertTo(typeof(string))))
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Model\ModelPropertyValue.cs (1)
292else if (typeConverter != null && typeConverter.CanConvertTo(typeof(string)))
System.Activities.Presentation\System\Activities\Presentation\View\ArgumentDesigner.xaml.cs (1)
1353if (oldConverter.CanConvertTo(typeof(string)))
System.Configuration (1)
System\Configuration\ConfigurationProperty.cs (1)
434!_converter.CanConvertTo(typeof(String))) {
System.Data (3)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Editors\PropertyValueToStandardValuesConverter.cs (1)
95if (standardValues != null && (converter == null || !converter.CanConvertTo(typeof(string))))
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Model\ModelPropertyValue.cs (1)
292else if (typeConverter != null && typeConverter.CanConvertTo(typeof(string)))
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\ArgumentDesigner.xaml.cs (1)
1353if (oldConverter.CanConvertTo(typeof(string)))
System.ServiceModel.Web (1)
System\ServiceModel\Dispatcher\QueryStringConverter.cs (1)
314if (converter.CanConvertTo(typeof(string)) && converter.CanConvertFrom(typeof(string)))
System.Web (3)
Compilation\CodeDOMUtility.cs (1)
95if (converter.CanConvertTo(typeof(InstanceDescriptor))) {
ModelBinding\ValueProviderResult.cs (1)
61if (!(canConvertFrom || converter.CanConvertTo(destinationType))) {
UI\Util.cs (1)
62return (converter != null && converter.CanConvertTo(type) &&
System.Web.DataVisualization (1)
Common\Utilities\XmlSerializer.cs (1)
1800if (converter != null && converter.CanConvertTo(typeof(string)))
System.Web.DynamicData (1)
DynamicData\Util\Misc.cs (1)
108if (otherConverter.CanConvertTo(type)) {
System.Windows.Forms (16)
winforms\Managed\System\Resources\ResXDataNode.cs (2)
382bool toString = tc.CanConvertTo(typeof(string)); 401bool toByteArray = tc.CanConvertTo(typeof(byte[]));
winforms\Managed\System\WinForms\Binding.cs (2)
747if (typeConverter != null && typeConverter.CanConvertTo(type)) { 817if (typeConverter != null && typeConverter.CanConvertTo(type)) {
winforms\Managed\System\WinForms\Control.cs (1)
17245if (converter.CanConvertTo(t) && converter.CanConvertFrom(t)) {
winforms\Managed\System\WinForms\DataGridTextBoxColumn.cs (1)
541if (this.typeConverter != null && this.typeConverter.CanConvertTo(typeof(string)))
winforms\Managed\System\WinForms\DataGridViewCell.cs (1)
4972if (converter != null && converter.CanConvertTo(typeof(string)))
winforms\Managed\System\WinForms\DataGridViewDataConnection.cs (1)
1590if (valueConverter != null && valueConverter.CanConvertTo(columnType))
winforms\Managed\System\WinForms\Formatter.cs (5)
136if (sourceConverter != null && sourceConverter != sourceTypeTypeConverter && sourceConverter.CanConvertTo(targetType)) { 153if (sourceConverter != null && sourceConverter.CanConvertTo(booleanType)) { 180if (sourceConverter != null && sourceConverter.CanConvertTo(targetType)) { 282if (sourceConverter != null && sourceTypeTypeConverter != sourceConverter && sourceConverter.CanConvertTo(targetType)) { 333else if (sourceConverter != null && sourceConverter.CanConvertTo(targetType)) {
winforms\Managed\System\WinForms\PropertyGridInternal\MergePropertyDescriptor.cs (2)
199if (converter.CanConvertTo(typeof(InstanceDescriptor))) { 209if (clonedValue == null && converter.CanConvertTo(typeof(string)) && converter.CanConvertFrom(typeof(string))) {
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyDescriptorGridEntry.cs (1)
877if (handler == null && value != null && TypeConverter != null && TypeConverter.CanConvertTo(typeof(string))) {
System.Windows.Forms.DataVisualization (1)
Common\Utilities\XmlSerializer.cs (1)
1800if (converter != null && converter.CanConvertTo(typeof(string)))
System.Workflow.ComponentModel (5)
AuthoringOM\Design\ActivityDesignerLayoutSerializers.cs (2)
379if (converter != null && converter.CanConvertTo(typeof(string))) 429if (converter != null && converter.CanConvertTo(typeof(string)))
AuthoringOM\Design\UITypeEditors.cs (1)
84if (value != null && typeDescriptorContext.PropertyDescriptor.PropertyType != typeof(string) && typeDescriptorContext.PropertyDescriptor.Converter != null && typeDescriptorContext.PropertyDescriptor.Converter.CanConvertTo(typeof(string)))
AuthoringOM\Serializer\ActivityCodeDomSerializationManager.cs (1)
211if (converter != null && converter.CanConvertTo(typeof(InstanceDescriptor)))
AuthoringOM\Serializer\WorkflowMarkupSerializer.cs (1)
661if (typeConverter != null && typeConverter.CanConvertTo(typeof(string)))
XamlBuildTask (2)
Microsoft\Build\Tasks\Xaml\XamlBuildTaskServices.cs (2)
86if (memberAttributesConverter.CanConvertTo(typeof(string))) 106if (typeAttributesConverter.CanConvertTo(typeof(string)))