23 references to CanAssignTo
PresentationFramework (5)
System\Windows\Controls\ItemsPanelTemplate.cs (1)
116
if (templateHolder.RootType == null || !templateHolder.RootType.
CanAssignTo
(panelType))
System\Windows\Markup\Baml2006\Baml2006Reader.cs (1)
2426
else if (!elementType.
CanAssignTo
(parentPropertyType))
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (1)
205
if (parentType.
CanAssignTo
(declaringType))
System\Windows\Markup\WpfXamlLoader.cs (2)
291
if (count == 1 && (xamlType.
CanAssignTo
(bindingBaseType) || xamlType.
CanAssignTo
(dynamicResourceType)))
System.Xaml (17)
System\Xaml\Context\ObjectWriterContext.cs (3)
344
if (frame.XamlType is not null && frame.XamlType.
CanAssignTo
(type))
362
if (frame.XamlType is not null && frame.XamlType.
CanAssignTo
(prop.DeclaringType))
449
if (frame.XamlType is not null && frame.XamlType.
CanAssignTo
(type))
System\Xaml\Context\XamlContext.cs (1)
113
bool canAssignTagTypeToOwnerType = tagType.
CanAssignTo
(ownerType);
System\Xaml\InfosetObjects\XamlObjectWriter.cs (4)
374
if (!rootType.
CanAssignTo
(_context.CurrentType))
778
if (!property.Type.IsMarkupExtension || !valueXamlType.
CanAssignTo
(property.Type))
790
if (valueXamlType == XamlLanguage.String || !valueXamlType.
CanAssignTo
(property.Type))
1200
if (!instType.
CanAssignTo
(currentType))
System\Xaml\Parser\XamlPullParser.cs (1)
1082
else if (valueElementType is null || !valueElementType.
CanAssignTo
(propertyType))
System\Xaml\Schema\XamlTypeInvoker.cs (2)
151
(_xamlType.AllowedContentTypes.Count == 1 && contentType.
CanAssignTo
(_xamlType.ItemType)))
192
if (contentType.
CanAssignTo
(pair.Key))
System\Xaml\XamlObjectReader.cs (1)
1604
return XamlLanguage.String.
CanAssignTo
(property.Type);
System\Xaml\XamlType.cs (3)
924
return
CanAssignTo
(XamlLanguage.MarkupExtension);
929
return
CanAssignTo
(XamlLanguage.INameScope);
1202
return
CanAssignTo
(XamlLanguage.IXmlSerializable);
System\Xaml\XamlXmlWriter.cs (2)
1719
if (XamlLanguage.String.
CanAssignTo
(property.Type))
1767
if (XamlLanguage.String.
CanAssignTo
(property.Type) && !string.IsNullOrEmpty(value))
System.Xaml.Tests (1)
System\Xaml\XamlTypeTests.cs (1)
5077
Assert.Equal(expected, type.
CanAssignTo
(other));