186 references to UnderlyingType
PresentationFramework (84)
System\Windows\Controls\ItemsPresenter.cs (1)
321type = xType.UnderlyingType;
System\Windows\FrameworkTemplate.cs (1)
579if (typeof(ResourceDictionary).IsAssignableFrom(type.UnderlyingType))
System\Windows\Markup\Baml2006\Baml2006Reader.cs (18)
879optimizedStaticResource.KeyValue = xamlType.UnderlyingType; 1058!_context.CurrentFrame.Member.Type.UnderlyingType.IsAssignableFrom(typeof(String))) 1086_xamlNodesWriter.WriteValue(BamlSchemaContext.GetXamlType(typeId).UnderlyingType); 1366if (_context.CurrentFrame.XamlType.UnderlyingType == typeof(EventSetter)) 1371Type currentType = eventProperty.DeclaringType.UnderlyingType; 1381eventProperty.DeclaringType.UnderlyingType); 1525converter = new EnumConverter(_context.CurrentFrame.XamlType.UnderlyingType); 1543Type type = BamlSchemaContext.GetXamlType(_binaryReader.ReadInt16()).UnderlyingType; 1583Type propertyType = property.Type.UnderlyingType; 1676param = BamlSchemaContext.GetXamlType(valueId).UnderlyingType; 1692param = BamlSchemaContext.GetXamlType(valueId).UnderlyingType; 1785typeExtensionType = BamlSchemaContext.GetXamlType(valueId).UnderlyingType; 1821value = BamlSchemaContext.GetXamlType(valueId).UnderlyingType; 1856_xamlNodesWriter.WriteValue(type.UnderlyingType); 1935_xamlNodesWriter.WriteValue(xamlType.UnderlyingType); 2516return Enum.ToObject(type.UnderlyingType, bytes).ToString(); 2590Debug.Assert(property.Type.UnderlyingType == typeof(DependencyProperty)); 2669memberType = BamlSchemaContext.GetPropertyDeclaringType(valueId).UnderlyingType;
System\Windows\Markup\Baml2006\Baml2006ReaderInternal.cs (1)
49property.DeclaringType.UnderlyingType == typeof(System.Windows.ResourceDictionary) &&
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (1)
152return xamlType.UnderlyingType;
System\Windows\Markup\Baml2006\WpfKnownType.cs (3)
360return UnderlyingType.GetCustomAttributes(inherit); 378return UnderlyingType.GetCustomAttributes(attributeType, inherit); 418return UnderlyingType.IsDefined(attributeType, inherit);
System\Windows\Markup\Baml2006\WpfSharedBamlSchemaContext.cs (4)
137_masterTypeTable.Add(bamlType.UnderlyingType, bamlType); 222if (xamlType != null && xamlType.UnderlyingType == type) 228if (xamlType != null && xamlType.UnderlyingType == type) 312return xamlType.UnderlyingType;
System\Windows\Markup\Baml2006\WpfSharedXamlSchemaContext.cs (1)
31if (xType == null || xType.UnderlyingType != type)
System\Windows\Markup\Baml2006\WpfXamlType.cs (12)
95if (UnderlyingType == typeof(ResourceDictionary)) 99else if (typeof(ResourceDictionary).IsAssignableFrom(UnderlyingType)) 101InterfaceMapping map = UnderlyingType.GetInterfaceMap(typeof(System.Windows.Markup.INameScope)); 226name, UnderlyingType); 297if ((property = DependencyProperty.FromName(name, this.UnderlyingType)) != null) 483if (UnderlyingType.IsArray) 487if (typeof(IDictionary).IsAssignableFrom(UnderlyingType)) 491if (typeof(IList).IsAssignableFrom(UnderlyingType)) 496if (typeof(System.Windows.Documents.DocumentReferenceCollection).IsAssignableFrom(UnderlyingType) || 497typeof(System.Windows.Documents.PageContentCollection).IsAssignableFrom(UnderlyingType)) 503if (typeof(ICollection<System.Windows.Data.XmlNamespaceMapping>).IsAssignableFrom(UnderlyingType) 522return typeof(System.Windows.Data.XmlNamespaceMappingCollection).IsAssignableFrom(UnderlyingType);
System\Windows\Markup\DependencyPropertyConverter.cs (2)
127type = schemaContext.GetXamlType(reader.ReadInt16()).UnderlyingType; 255return templateHolder.GetTypeForName(target).UnderlyingType;
System\Windows\Markup\RestrictiveXamlXmlReader.cs (1)
105if ((NodeType == System.Xaml.XamlNodeType.StartObject && !IsAllowedType(Type.UnderlyingType)) ||
System\Windows\Markup\SetterTriggerConditionValueConverter.cs (3)
117if (xamlProperty.Type.UnderlyingType.IsEnum && schemaContext is Baml2006.Baml2006SchemaContext) 119typeConverter = XamlReader.BamlSharedSchemaContext.GetTypeConverter(xamlProperty.Type.UnderlyingType); 145if (xamlProperty != null && xamlProperty.Type.UnderlyingType == typeof(Boolean))
System\Windows\Markup\WpfXamlLoader.cs (3)
278FrameworkPropertyMetadata metadata = prop.GetMetadata(stack.CurrentFrame.Type.UnderlyingType) as FrameworkPropertyMetadata; 388if (typeof(DependencyObject).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 401typeof(Style).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType))
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (1)
379return result == null || result.IsPublic ? result : GetInternalType(result.UnderlyingType, result);
System\Windows\TemplateContent.cs (32)
123(typeof(FrameworkTemplate).IsAssignableFrom(CurrentFrame.Type.UnderlyingType) || 124typeof(Style).IsAssignableFrom(CurrentFrame.Type.UnderlyingType))); 148(typeof(FrameworkTemplate).IsAssignableFrom(CurrentFrame.Type.UnderlyingType) || 149typeof(Style).IsAssignableFrom(CurrentFrame.Type.UnderlyingType))); 316OwnerTemplate.ChildTypeFromChildIndex.Add(childIndex, type.UnderlyingType); 413if (xamlReader.Type.UnderlyingType == typeof(StaticResourceExtension)) 433if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType) || 434typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 461if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType) || 462typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 486if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType) || 487typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 503if (typeof(ContentPresenter).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 524if (typeof(GridViewRowPresenter).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 553if (typeof(GridViewRowPresenter).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 560else if (typeof(ContentPresenter).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 616IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType) || 618IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 664if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType) || 665typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 675if (typeof(ContentPresenter).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType) 730if (typeof(FrameworkElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType) || 731typeof(FrameworkContentElement).IsAssignableFrom(stack.CurrentFrame.Type.UnderlyingType)) 753Debug.Assert(xamlReader.Type.UnderlyingType == typeof(StaticResourceExtension)); 821if (!typeof(FrameworkElement).IsAssignableFrom(parentType.UnderlyingType) && 822!typeof(FrameworkContentElement).IsAssignableFrom(parentType.UnderlyingType)) 895Type typeofValue = xamlReader.Type.UnderlyingType; 901if (!IsTypeShareable(xamlReader.Type.UnderlyingType)) 917if (typeof(FrameworkTemplate).IsAssignableFrom(xamlReader.Type.UnderlyingType)) 922else if (typeof(Style).IsAssignableFrom(xamlReader.Type.UnderlyingType)) 945if (typeof(StaticResourceExtension).IsAssignableFrom(xamlReader.Type.UnderlyingType)) 1448return _schemaContext.GetXamlType(XamlTypeName.Parse(qualifiedTypeName, this)).UnderlyingType;
System.Xaml (102)
System\Xaml\Context\ObjectWriterContext.cs (3)
155if (xamlType is null || xamlType.UnderlyingType is null) 161return xamlType.UnderlyingType; 889if (xamlType.UnderlyingType is not null)
System\Xaml\Context\ServiceProviderContext.cs (1)
388return _xamlContext.GetDestinationType().UnderlyingType;
System\Xaml\Context\XamlParserContext.cs (2)
120allowProtectedForType = rootObjectType.UnderlyingType; 295allowProtectedForType = CurrentType.UnderlyingType;
System\Xaml\InfosetObjects\XamlObjectWriter.cs (4)
1403typeof(IDictionary).IsAssignableFrom(dictionaryType.UnderlyingType) && 1404!IsBuiltInGenericDictionary(dictionaryType.UnderlyingType)) 1816if (itemType.UnderlyingType.IsAssignableFrom(type)) 2176Type rootInstanceType = (curInstance is not null) ? curInstance.GetType() : ctx.CurrentType.UnderlyingType;
System\Xaml\Parser\MeScanner.cs (2)
298(xamlType.UnderlyingType is not null && 299KS.Eq(xamlType.UnderlyingType.Name, typeName.Name + KnownStrings.Extension)))
System\Xaml\Runtime\ClrObjectRuntime.cs (5)
55throw CreateException(SR.Format(SR.NoConstructor, xamlType.UnderlyingType), ex); 63throw CreateException(SR.Format(SR.ConstructorInvocation, xamlType.UnderlyingType), UnwrapTargetInvocationException(ex)); 74Type type = xamlType.UnderlyingType; 372Type keyType = dictionaryType.KeyType.UnderlyingType; 373Type itemType = dictionaryType.ItemType.UnderlyingType;
System\Xaml\Runtime\DynamicMethodRuntime.cs (1)
188return CreateInstanceWithCtor(xamlType.UnderlyingType, args);
System\Xaml\Schema\TypeReflector.cs (2)
395if (xamlType.UnderlyingType is null) 401object obj = GetCustomAttribute(typeof(XAML3.NameScopePropertyAttribute), xamlType.UnderlyingType);
System\Xaml\Schema\XamlMemberInvoker.cs (1)
119args = new Type[] { _member.TargetType.UnderlyingType ?? typeof(object) };
System\Xaml\Schema\XamlNamespace.cs (3)
107Type openType = openXamlType?.UnderlyingType; 159Debug.Assert(typeArgs[n].UnderlyingType is not null); 161clrTypeArgs[n] = typeArgs[n].UnderlyingType;
System\Xaml\Schema\XamlTypeInvoker.cs (8)
124if (!_xamlType.UnderlyingType.IsValueType && (arguments is null || arguments.Length == 0)) 132return Activator.CreateInstance(_xamlType.UnderlyingType, arguments); 165_xamlType.UnderlyingType, type.UnderlyingType); 227Type type = _xamlType.UnderlyingType.UnderlyingSystemType; 236get { return _xamlType is null || _xamlType.UnderlyingType is null; } 266object inst = FormatterServices.GetUninitializedObject(type._xamlType.UnderlyingType); 297Type underlyingType = type._xamlType.UnderlyingType.UnderlyingSystemType;
System\Xaml\Schema\XamlValueConverter.cs (3)
74TargetType.UnderlyingType is not null && TargetType.UnderlyingType.IsEnum) 76return (TConverterBase)(object)new EnumConverter(TargetType.UnderlyingType);
System\Xaml\XamlObjectReader.cs (7)
1649if ((potentialProperty.Type.UnderlyingType == paraminfo.ParameterType) && 1689if (member is null && !valueXamlType.UnderlyingType.IsValueType) 1706if (((MemberMarkupInfo)property).IsFactoryMethod && !xamlType.UnderlyingType.IsNested) 1715if (xamlType.UnderlyingType.IsNested) 2105property.Type.UnderlyingType == parameter.ParameterType) 3220if (member.DeclaringType.UnderlyingType == baseDeclaringType) 3241if (baseType.UnderlyingType == baseDeclaringType)
System\Xaml\XamlSchemaContext.cs (3)
306if (typeArg.UnderlyingType is null) 323result = GetXamlType(result.UnderlyingType); 890Type clrType = type.UnderlyingType;
System\Xaml\XamlType.cs (54)
415Type baseUnderlyingType = xamlType.UnderlyingType; 419Type curUnderlyingType = curType.UnderlyingType; 490if (ItemType is null || UnderlyingType is null) 498if (UnderlyingType is not null && ItemType.UnderlyingType is not null) 501GetIsReadOnlyMethod(UnderlyingType, ItemType.UnderlyingType); 541if (UnderlyingType is null) 549_reflector.AddMethod = CollectionReflector.LookupAddMethod(UnderlyingType, collectionKind); 559if (GetCollectionKind() == XamlCollectionKind.None || UnderlyingType is null) 566_reflector.GetEnumeratorMethod = CollectionReflector.GetEnumeratorMethod(UnderlyingType); 591Type underlyingType = UnderlyingType; 610if (UnderlyingType is null) 616return UnderlyingType.GetConstructors(); 624if (UnderlyingType is null) 705Type underlyingType = UnderlyingType; 719if (UnderlyingType is null) 725XamlCollectionKind result = CollectionReflector.LookupCollectionKind(UnderlyingType, out addMethod); 735Type underlyingType = UnderlyingType; 825Type underlyingType = UnderlyingType; 859return (UnderlyingType is not null) ? new XamlTypeInvoker(this) : null; 874if (UnderlyingType is not null) 876return !UnderlyingType.IsValueType || IsNullableGeneric(); 887return UnderlyingType is null; 923else if (UnderlyingType is null && BaseType is not null) 946else if (UnderlyingType is not null) 948if (UnderlyingType.IsArray) 950result = UnderlyingType.GetElementType(); 981if (UnderlyingType is null) 991if (UnderlyingType is null) 1026if (UnderlyingType is null) 1059if (UnderlyingType is null) 1085if (UnderlyingType is null) 1111Type underlyingType = UnderlyingType; 1167Type underlyingType = UnderlyingType; 1211Type underlyingType = UnderlyingType; 1269if (UnderlyingType is not null) 1279typeof(EventHandler<XamlSetMarkupExtensionEventArgs>), UnderlyingType, methodName); 1291if (UnderlyingType is not null) 1301typeof(EventHandler<XamlSetTypeConverterEventArgs>), UnderlyingType, methodName); 1392reflector = new TypeReflector(UnderlyingType); 1445foreach (ConstructorInfo ctor in UnderlyingType.GetConstructors(ConstructorBindingFlags)) 1525return UnderlyingType is not null 1526&& (KS.Eq(UnderlyingType.Name, KnownStrings.NullableOfT) 1527&& UnderlyingType.Assembly == typeof(Nullable<>).Assembly 1528&& UnderlyingType.Namespace == typeof(Nullable<>).Namespace); 1533if (UnderlyingType is null) 1568if (UnderlyingType == XamlLanguage.Type.UnderlyingType) 1593throw new XamlSchemaException(SR.Format(SR.MarkupExtensionWithDuplicateArity, UnderlyingType, typeVector.Length)); 1735else if (UnderlyingType is not null) 1738return UnderlyingType.GetHashCode() ^ 8; 1791return xamlType1.UnderlyingType == xamlType2.UnderlyingType;
System\Xaml\XamlXmlWriter.cs (3)
1888Type objectClrType = objectXamlType.UnderlyingType; 1913if ((potentialProperty.Type.UnderlyingType == paraminfo.ParameterType) && 1952Type underlyingType = xamlType.UnderlyingType;