155 references to Type
PresentationFramework (16)
System\Windows\FrameworkTemplate.cs (1)
1013Names.CurrentFrame.Type = Names.PreviousFrame.Property.Type;
System\Windows\Markup\Baml2006\Baml2006Reader.cs (6)
1062if (_context.CurrentFrame.Member.Type != null && 1063!_context.CurrentFrame.Member.Type.UnderlyingType.IsAssignableFrom(typeof(String))) 1590Type propertyType = property.Type.UnderlyingType; 2413XamlType parentPropertyType = parentProperty.Type; 2478EmitGoItemsPreamble(_context.CurrentFrame.Member.Type); 2588Debug.Assert(property.Type.UnderlyingType == typeof(DependencyProperty));
System\Windows\Markup\SetterTriggerConditionValueConverter.cs (4)
117if (xamlProperty.Type.UnderlyingType.IsEnum && schemaContext is Baml2006.Baml2006SchemaContext) 119typeConverter = XamlReader.BamlSharedSchemaContext.GetTypeConverter(xamlProperty.Type.UnderlyingType); 127typeConverter = xamlProperty.Type.TypeConverter; 145if (xamlProperty != null && xamlProperty.Type.UnderlyingType == typeof(Boolean))
System\Windows\Markup\WpfXamlLoader.cs (1)
232stack.CurrentFrame.Type = stack.PreviousFrame.Property.Type;
System\Windows\TemplateContent.cs (4)
471XamlType type = stack.CurrentFrame.Property.Type; 865else if (xamlProperty.Type.TypeConverter != null) 867converter = xamlProperty.Type.TypeConverter.ConverterInstance; 953XamlType type = frames.CurrentFrame.Property.Type;
System.Xaml (63)
System\Xaml\Context\ObjectWriterContext.cs (1)
306return frame.Member.Type;
System\Xaml\Context\XamlParserContext.cs (2)
135if (member.IsReadOnly || (member.Type is not null && member.Type.IsUsableAsReadOnly))
System\Xaml\InfosetObjects\XamlObjectWriter.cs (13)
302_context.CurrentType = parentProperty.Type; 306if (parentProperty.Type.IsCollection || parentProperty.Type.IsDictionary) 677XamlType propertyXamlType = property.Type; 680_context.CurrentCollection = Runtime.CreateInstance(property.Type, null); 778if (!property.Type.IsMarkupExtension || !valueXamlType.CanAssignTo(property.Type)) 790if (valueXamlType == XamlLanguage.String || !valueXamlType.CanAssignTo(property.Type)) 872XamlType parentXamlType = parentProperty.Type; 1336XamlType propertyType = property.Type; 1610if (prop.Type.IsXData) 1755ctx.CurrentType = ctx.ParentProperty.Type; 2009XamlType ppXamlType = parentProperty.Type;
System\Xaml\Parser\XamlPullParser.cs (9)
880XamlType memberXamlType = member.Type; 1027XamlType propertyType = currentProperty.Type; 1056propertyType = currentProperty.Type; 1140XamlType collectionType = _context.CurrentMember == XamlLanguage.Items ? _context.CurrentType : _context.CurrentMember.Type; 1160if (prop is not null && prop.Type is not null && prop.Type.IsWhitespaceSignificantCollection) 1192if (prop.Type == XamlLanguage.String) 1197if (prop.Type.IsWhitespaceSignificantCollection) 1232XamlType propertyType = property.Type;
System\Xaml\Runtime\ClrObjectRuntime.cs (1)
253value = CreateInstance(property.Type, null);
System\Xaml\Schema\TypeReflector.cs (1)
1020if (member.IsReadOnly && !member.Type.IsUsableAsReadOnly)
System\Xaml\Schema\XamlDirective.cs (1)
188return base.Type;
System\Xaml\XamlMarkupExtensionWriter.cs (2)
403(property.IsDirective && (property.Type.IsCollection || property.Type.IsDictionary)))
System\Xaml\XamlMember.cs (6)
557if (Type is not null) 559return Type.DeferringLoader; 710if (result is null && Type is not null) 712result = Type.TypeConverter; 730if (result is null && Type is not null) 732result = Type.ValueSerializer;
System\Xaml\XamlObjectReader.cs (12)
376if (attachedProperty.Type.IsDictionary) 381if (attachedProperty.Type.IsCollection) 511if (property.Type.IsXData) 518if (property.Type.IsDictionary) 523if (property.Type.IsCollection) 534var itemsInfo = ForSequenceItems(source, isAttachable ? null : property, property.Type, context, allowReadOnly: false); 562var itemsInfo = ForDictionaryItems(source, isAttachable ? null : property, property.Type, context); 669var memberType = memberInfo.XamlNode.Member.Type; 1604return XamlLanguage.String.CanAssignTo(property.Type); 1658if ((potentialProperty.Type.UnderlyingType == paraminfo.ParameterType) && 2118property.Type.UnderlyingType == parameter.ParameterType) 2325(context.IsPropertyWriteVisible(property) || property.Type.IsUsableAsReadOnly);
System\Xaml\XamlType.cs (5)
737XamlType contentType = contentWrapper.ContentProperty.Type; 1077if (!member.IsReadOnly || member.Type.IsUsableAsReadOnly) 1116if (!skipReadOnlyCheck && result.IsReadOnly && !result.Type.IsUsableAsReadOnly) 1145if (result.IsReadOnly && !result.Type.IsUsableAsReadOnly) 1669if (excludedMember.IsReadOnly && !excludedMember.Type.IsUsableAsReadOnly)
System\Xaml\XamlXmlWriter.cs (10)
154type = frame.Member.Type; 355containingXamlType = (enumerator.Current.Member is null) || enumerator.Current.Member.IsUnknown ? null : enumerator.Current.Member.Type; 913type = frame.Member.Type; 1206else if (property.IsDirective && (property.Type is not null && (property.Type.IsCollection || property.Type.IsDictionary))) 1405XamlType memberType = frame.Member.Type; 1719if (XamlLanguage.String.CanAssignTo(property.Type)) 1767if (XamlLanguage.String.CanAssignTo(property.Type) && !string.IsNullOrEmpty(value)) 1952if ((potentialProperty.Type.UnderlyingType == paraminfo.ParameterType) &&
System.Xaml.Tests (76)
System\Xaml\XamlDirectiveTests.cs (2)
33Assert.Equal(type, directive.Type); 68Assert.Equal(XamlLanguage.Object, directive.Type);
System\Xaml\XamlLanguageTests.cs (72)
273Assert.Equal("List", directive.Type.Name); 274Assert.Equal(typeof(List<object>), directive.Type.UnderlyingType); 275Assert.Equal(new Type[] { typeof(object) }, directive.Type.TypeArguments.Select(t => t.UnderlyingType)); 286Assert.Equal("String", directive.Type.Name); 287Assert.Equal(typeof(string), directive.Type.UnderlyingType); 288Assert.Null(directive.Type.TypeArguments); 299Assert.Equal("String", directive.Type.Name); 300Assert.Equal(typeof(string), directive.Type.UnderlyingType); 301Assert.Null(directive.Type.TypeArguments); 312Assert.Equal("String", directive.Type.Name); 313Assert.Equal(typeof(string), directive.Type.UnderlyingType); 314Assert.Null(directive.Type.TypeArguments); 325Assert.Equal("String", directive.Type.Name); 326Assert.Equal(typeof(string), directive.Type.UnderlyingType); 327Assert.Null(directive.Type.TypeArguments); 338Assert.Equal("String", directive.Type.Name); 339Assert.Equal(typeof(string), directive.Type.UnderlyingType); 340Assert.Null(directive.Type.TypeArguments); 351Assert.Equal("String", directive.Type.Name); 352Assert.Equal(typeof(string), directive.Type.UnderlyingType); 353Assert.Null(directive.Type.TypeArguments); 364Assert.Equal("String", directive.Type.Name); 365Assert.Equal(typeof(string), directive.Type.UnderlyingType); 366Assert.Null(directive.Type.TypeArguments); 377Assert.Equal("List", directive.Type.Name); 378Assert.Equal(typeof(List<object>), directive.Type.UnderlyingType); 379Assert.Equal(new Type[] { typeof(object) }, directive.Type.TypeArguments.Select(t => t.UnderlyingType)); 390Assert.Equal("Object", directive.Type.Name); 391Assert.Equal(typeof(object), directive.Type.UnderlyingType); 392Assert.Null(directive.Type.TypeArguments); 403Assert.Equal("Object", directive.Type.Name); 404Assert.Equal(typeof(object), directive.Type.UnderlyingType); 405Assert.Null(directive.Type.TypeArguments); 416Assert.Equal("List", directive.Type.Name); 417Assert.Equal(typeof(List<MemberDefinition>), directive.Type.UnderlyingType); 418Assert.Equal(new Type[] { typeof(MemberDefinition) }, directive.Type.TypeArguments.Select(t => t.UnderlyingType)); 429Assert.Equal("List", directive.Type.Name); 430Assert.Equal(typeof(List<Attribute>), directive.Type.UnderlyingType); 431Assert.Equal(new Type[] { typeof(Attribute) }, directive.Type.TypeArguments.Select(t => t.UnderlyingType)); 442Assert.Equal("String", directive.Type.Name); 443Assert.Equal(typeof(string), directive.Type.UnderlyingType); 444Assert.Null(directive.Type.TypeArguments); 455Assert.Equal("List", directive.Type.Name); 456Assert.Equal(typeof(List<object>), directive.Type.UnderlyingType); 457Assert.Equal(new Type[] { typeof(object) }, directive.Type.TypeArguments.Select(t => t.UnderlyingType)); 468Assert.Equal("String", directive.Type.Name); 469Assert.Equal(typeof(string), directive.Type.UnderlyingType); 470Assert.Null(directive.Type.TypeArguments); 481Assert.Equal("String", directive.Type.Name); 482Assert.Equal(typeof(string), directive.Type.UnderlyingType); 483Assert.Null(directive.Type.TypeArguments); 494Assert.Equal("String", directive.Type.Name); 495Assert.Equal(typeof(string), directive.Type.UnderlyingType); 496Assert.Null(directive.Type.TypeArguments); 507Assert.Equal("String", directive.Type.Name); 508Assert.Equal(typeof(string), directive.Type.UnderlyingType); 509Assert.Null(directive.Type.TypeArguments); 520Assert.Equal("String", directive.Type.Name); 521Assert.Equal(typeof(string), directive.Type.UnderlyingType); 522Assert.Null(directive.Type.TypeArguments); 533Assert.Equal("Object", directive.Type.Name); 534Assert.Equal(typeof(object), directive.Type.UnderlyingType); 535Assert.Null(directive.Type.TypeArguments); 546Assert.Equal("String", directive.Type.Name); 547Assert.Equal(typeof(string), directive.Type.UnderlyingType); 548Assert.Null(directive.Type.TypeArguments); 559Assert.Equal("String", directive.Type.Name); 560Assert.Equal(typeof(string), directive.Type.UnderlyingType); 561Assert.Null(directive.Type.TypeArguments); 572Assert.Equal("String", directive.Type.Name); 573Assert.Equal(typeof(string), directive.Type.UnderlyingType); 574Assert.Null(directive.Type.TypeArguments);
System\Xaml\XamlMemberTests.cs (2)
1675Assert.Equal(expected ?? XamlLanguage.Object, member.Type); 1682Assert.Equal(XamlLanguage.Object, directive.Type);