Skip to content

Commit 53f9df0

Browse files
committed
Adjusted MarqueeSample to work on UWP
1 parent e27c201 commit 53f9df0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

components/Marquee/samples/MarqueeSample.xaml.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@ public MarqueeSample()
5151

5252
private void AddItem_Click(object sender, RoutedEventArgs? e)
5353
{
54+
var rand = new Random();
5455
Data.Items.Add(new MarqueeSampleItem()
5556
{
5657
Name = $"Item {Data.Items.Count + 1}",
57-
Brush = new SolidColorBrush(Color.FromArgb(255, (byte)Random.Shared.Next(256), (byte)Random.Shared.Next(256), (byte)Random.Shared.Next(256))),
58+
Brush = new SolidColorBrush(Color.FromArgb(255, (byte)rand.Next(256), (byte)rand.Next(256), (byte)rand.Next(256))),
5859
});
5960
}
6061
}
@@ -66,7 +67,7 @@ public class MarqueeSampleItems
6667

6768
public record MarqueeSampleItem
6869
{
69-
public required string Name { get; set; }
70+
public string? Name { get; set; }
7071

71-
public required Brush Brush { get; set; }
72+
public Brush? Brush { get; set; }
7273
}

0 commit comments

Comments
 (0)