67 references to CanConvertFrom
PresentationFramework (7)
src\Framework\MS\Internal\Data\DefaultValueConverter.cs (2)
158canConvertFrom = (typeConverter != null) ? typeConverter.CanConvertFrom(targetType) : false; 170canConvertFrom = (typeConverter != null) ? typeConverter.CanConvertFrom(sourceType) : false;
src\Framework\MS\Internal\Data\PropertyPathWorker.cs (1)
1406if (tc != null && tc.CanConvertFrom(typeof(string)))
src\Framework\System\Windows\Data\BindingExpressionBase.cs (1)
2189if (converter != null && converter.CanConvertFrom(value.GetType()))
src\Framework\System\Windows\PropertyPath.cs (1)
788if (tc != null && tc.CanConvertFrom(typeof(string)))
src\Framework\System\Windows\PropertyPathConverter.cs (1)
289if (converter.CanConvertTo(typeof(string)) && converter.CanConvertFrom(typeof(string)))
src\Framework\System\Windows\StyleHelper.cs (1)
5915if (typeConverter != null && typeConverter.CanConvertFrom(typeof(String)))
System (3)
sys\system\configuration\ApplicationSettingsBase.cs (1)
654bool fromString = tc.CanConvertFrom(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)
89converter.CanConvertFrom(TypeHelper.StringType)) 163converter.CanConvertFrom(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 (6)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\ValueEditors\ChoiceEditor.cs (1)
1054if (converter != null && converter.CanConvertFrom(this.InternalValue.GetType()))
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Model\ModelPropertyValue.cs (2)
87ParentModelPropertyEntry.Converter.CanConvertFrom(typeof(string)); 237this.ParentModelPropertyEntry.Converter.CanConvertFrom(typeof(string)))
System.Activities.Presentation\System\Activities\Presentation\View\ArgumentDesigner.xaml.cs (3)
1068if (converter.CanConvertFrom(value.GetType())) 1272if (((type != stringTypeReference && (converter == null || !converter.CanConvertFrom(stringTypeReference))) && direction == PropertyKind.Property) 1386if (converter.CanConvertFrom(typeof(string)))
System.Configuration (2)
System\Configuration\ConfigurationProperty.cs (2)
219if (!canAssign && this.Converter.CanConvertFrom(value.GetType())) { 433!_converter.CanConvertFrom(typeof(String)) ||
System.Data (8)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\ValueEditors\ChoiceEditor.cs (1)
1054if (converter != null && converter.CanConvertFrom(this.InternalValue.GetType()))
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Model\ModelPropertyValue.cs (2)
87ParentModelPropertyEntry.Converter.CanConvertFrom(typeof(string)); 237this.ParentModelPropertyEntry.Converter.CanConvertFrom(typeof(string)))
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\ArgumentDesigner.xaml.cs (3)
1068if (converter.CanConvertFrom(value.GetType())) 1272if (((type != stringTypeReference && (converter == null || !converter.CanConvertFrom(stringTypeReference))) && direction == PropertyKind.Property) 1386if (converter.CanConvertFrom(typeof(string)))
fx\src\data\System\Data\XMLSchema.cs (2)
59if (converter.CanConvertFrom(typeof(string))) { 267if (converter.CanConvertFrom(typeof(string))) {
System.ServiceModel.Web (1)
System\ServiceModel\Dispatcher\QueryStringConverter.cs (1)
314if (converter.CanConvertTo(typeof(string)) && converter.CanConvertFrom(typeof(string)))
System.Web (7)
Compilation\AppSettingsExpressionBuilder.cs (1)
69if (converter.CanConvertFrom(typeof(string))) {
Compilation\RouteValueExpressionBuilder.cs (1)
58if (converter.CanConvertFrom(typeof(string))) {
ModelBinding\ModelMetadata.cs (1)
101return !(TypeDescriptor.GetConverter(ModelType).CanConvertFrom(typeof(string)));
ModelBinding\TypeConverterModelBinderProvider.cs (1)
15if (!TypeDescriptor.GetConverter(bindingContext.ModelType).CanConvertFrom(typeof(string))) {
ModelBinding\ValueProviderResult.cs (1)
57bool canConvertFrom = converter.CanConvertFrom(value.GetType());
UI\PropertyConverter.cs (1)
93if (converter != null && converter.CanConvertFrom(typeof(string))) {
UI\Util.cs (1)
63converter.CanConvertFrom(type) && !(converter is ReferenceConverter));
System.Web.DataVisualization (1)
Common\Utilities\XmlSerializer.cs (1)
2190if (converter != null && converter.CanConvertFrom(typeof(string)))
System.Web.DynamicData (1)
DynamicData\Util\Misc.cs (1)
103if (converter.CanConvertFrom(value.GetType())) {
System.Web.Extensions (2)
Script\Serialization\ObjectConverter.cs (2)
346if (converter.CanConvertFrom(o.GetType())) { 365if (converter.CanConvertFrom(typeof(String))) {
System.Windows.Forms (21)
winforms\Managed\System\Resources\ResXDataNode.cs (4)
383bool fromString = tc.CanConvertFrom(typeof(string)); 402bool fromByteArray = tc.CanConvertFrom(typeof(byte[])); 485if (tc.CanConvertFrom(typeof(byte[]))) { 519if (tc.CanConvertFrom(typeof(string))) {
winforms\Managed\System\WinForms\Control.cs (5)
17245if (converter.CanConvertTo(t) && converter.CanConvertFrom(t)) { 17369if (converter.CanConvertFrom(typeof(string))) { 17372else if (converter.CanConvertFrom(typeof(byte[]))) { 18056if (converter.CanConvertFrom(typeof(string))) { 18060else if (converter.CanConvertFrom(typeof(byte[]))) {
winforms\Managed\System\WinForms\DataGridTextBoxColumn.cs (3)
210if (this.typeConverter != null && !typeConverter.CanConvertFrom(typeof(string))) 246if (this.typeConverter != null && !this.typeConverter.CanConvertFrom(typeof(string))) 437} else if (typeConverter != null && typeConverter.CanConvertFrom(typeof(string))) {
winforms\Managed\System\WinForms\DataGridViewDataConnection.cs (3)
1003else if (typeof(System.Drawing.Image).IsAssignableFrom(type) || imageTypeConverter.CanConvertFrom(type)) 1029if (!imageTypeConverter.CanConvertFrom(this.props[i].PropertyType)) 1583if (boundColumnConverter != null && boundColumnConverter.CanConvertFrom(valueType))
winforms\Managed\System\WinForms\Formatter.cs (5)
141if (targetConverter != null && targetConverter != targetTypeTypeConverter && targetConverter.CanConvertFrom(sourceType)) { 183else if (targetConverter != null && targetConverter.CanConvertFrom(sourceType)) { 277if (targetConverter != null && targetTypeTypeConverter != targetConverter && targetConverter.CanConvertFrom(sourceType)) { 305if (targetConverter != null && targetConverter.CanConvertFrom(booleanType)) { 330if (targetConverter != null && targetConverter.CanConvertFrom(sourceType)) {
winforms\Managed\System\WinForms\PropertyGridInternal\MergePropertyDescriptor.cs (1)
209if (clonedValue == null && converter.CanConvertTo(typeof(string)) && converter.CanConvertFrom(typeof(string))) {
System.Windows.Forms.DataVisualization (1)
Common\Utilities\XmlSerializer.cs (1)
2190if (converter != null && converter.CanConvertFrom(typeof(string)))
System.Workflow.ComponentModel (3)
AuthoringOM\Design\ActivityDesignerLayoutSerializers.cs (2)
394if (converter != null && converter.CanConvertFrom(typeof(string)) && !IsValidCompactAttributeFormat(sizeValue)) 444if (converter != null && converter.CanConvertFrom(typeof(string)) && !IsValidCompactAttributeFormat(pointValue))
AuthoringOM\Serializer\WorkflowMarkupSerializer.cs (1)
1752if (typeConverter != null && typeConverter.CanConvertFrom(typeof(string)))
XamlBuildTask (1)
Microsoft\Build\Tasks\Xaml\AttributeData.cs (1)
314if (typeConverter != null && typeConverter.CanConvertFrom(paramValue.GetType()))