Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Controls/src/Xaml/XamlNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public override void Accept(IXamlNodeVisitor visitor, INode parentNode)
{
foreach (var node in Properties.Values.ToList())
node.Accept(visitor, this);
foreach (var node in CollectionItems)
foreach (var node in CollectionItems.ToList())
node.Accept(visitor, this);
}

Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/Xaml.UnitTests/Issues/Maui17222.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class Test
#if DEBUG
[SetUp] public void Setup() => AppInfo.SetCurrent(new MockAppInfo());
[TearDown] public void TearDown() => AppInfo.SetCurrent(null);

[Test]
public void GetsourceInfo([Values(false)] bool useCompiledXaml)
{
Expand Down
17 changes: 17 additions & 0 deletions src/Controls/tests/Xaml.UnitTests/Issues/Maui17333.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Microsoft.Maui.Controls.Xaml.UnitTests.Maui17333">

<OnPlatform x:TypeArguments="x:String"
x:Key="RegularFont"
Default="OpenSansRegular"
/>

<OnPlatform x:TypeArguments="x:String"
x:Key="BoldFont"
Default="OpenSansSemiBold"
/>

</ResourceDictionary>
39 changes: 39 additions & 0 deletions src/Controls/tests/Xaml.UnitTests/Issues/Maui17333.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System;
using Microsoft.Maui.ApplicationModel;
using Microsoft.Maui.Controls.Core.UnitTests;
using Microsoft.Maui.Controls.Shapes;
using Microsoft.Maui.Devices;
using Microsoft.Maui.Graphics;
using NUnit.Framework;

namespace Microsoft.Maui.Controls.Xaml.UnitTests;

public partial class Maui17333 : ResourceDictionary
{

public Maui17333() => InitializeComponent();

public Maui17333(bool useCompiledXaml)
{
//this stub will be replaced at compile time
}

[TestFixture]
class Test
{
[SetUp] public void Setup() => AppInfo.SetCurrent(new MockAppInfo());
[TearDown] public void TearDown() => AppInfo.SetCurrent(null);

[Test]
public void CompilerDoesntThrowOnOnPlatform([Values(true)] bool useCompiledXaml)
{
if (useCompiledXaml)
{
MockCompiler.Compile(typeof(Maui17333),targetFramework: "net-ios");
}
}
}
}