Skip to content
Open
Show file tree
Hide file tree
Changes from 5 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
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
<_FastDeploymentDiagnosticLogging>True</_FastDeploymentDiagnosticLogging>
<WindowsPackageType>None</WindowsPackageType>
<!-- TODO: remove these obsolete nowarns and fix it in code -->
<NoWarn>$(NoWarn);CS0618;CS0672;XC0618;XC0022;XC0023;IL2026;IL2091;IL2067;IL2072;IL2087;IL3050</NoWarn>
<NoWarn>$(NoWarn);CS0618;CS0672;XC0618;XC0023;IL2026;IL2091;IL2067;IL2072;IL2087;IL3050</NoWarn>
</PropertyGroup>

<PropertyGroup Condition=" '$(_UseNativeAot)' == 'true' ">
<PublishAot>true</PublishAot>
<_IsPublishing>true</_IsPublishing>
<IlcTreatWarningsAsErrors>false</IlcTreatWarningsAsErrors>
<WarningsNotAsErrors>IL3050;XC0022</WarningsNotAsErrors>
<WarningsNotAsErrors>IL3050</WarningsNotAsErrors>
<DefineConstants>$(DefineConstants);NATIVE_AOT</DefineConstants>
</PropertyGroup>

Expand Down
3 changes: 2 additions & 1 deletion src/Controls/tests/TestCases.HostApp/Issues/Issue19127.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Maui.Controls.Sample.Issues.Issue19127"
xmlns:ns="clr-namespace:Maui.Controls.Sample.Issues">
xmlns:ns="clr-namespace:Maui.Controls.Sample.Issues"
x:DataType="ns:Issue19127Settings">
<VerticalStackLayout
VerticalOptions="Center">
<Button Text="{Binding IsCameraEnabled, StringFormat='Toggle Camera View ({0})'}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<StackLayout>
<ListView>
<ListView.ItemTemplate>
<DataTemplate>
<DataTemplate x:DataType="x:String">
<ViewCell>
<ViewCell.ContextActions>
<MenuItem Text="View"/>
Expand Down
3 changes: 2 additions & 1 deletion src/Controls/tests/TestCases.HostApp/Issues/Issue22104.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Maui.Controls.Sample.Issues"
x:Class="Maui.Controls.Sample.Issues.Issue22104">
x:Class="Maui.Controls.Sample.Issues.Issue22104"
x:DataType="local:Issue22104ViewModel">

<ContentPage.BindingContext>
<local:Issue22104ViewModel/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
SelectionMode="Single">

<CollectionView.ItemTemplate>
<DataTemplate>
<DataTemplate x:DataType="x:String">
<VerticalStackLayout>

<VisualStateManager.VisualStateGroups>
Expand Down
6 changes: 4 additions & 2 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue22674.xaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Maui.Controls.Sample.Issues.Issue22674">
x:Class="Maui.Controls.Sample.Issues.Issue22674"
xmlns:local="clr-namespace:Maui.Controls.Sample.Issues"
x:DataType="local:Issue22674">
<CollectionView
AutomationId="TestCollectionView"
SelectionMode="Single"
ItemsSource="{Binding ItemList}"
SelectionChanged="OnCollectionViewSelectionChanged">
<CollectionView.ItemTemplate>
<DataTemplate>
<DataTemplate x:DataType="x:String">
<Label
Text="{Binding .}"
HorizontalTextAlignment="Center" />
Expand Down
11 changes: 7 additions & 4 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue23868.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
x:Class="Maui.Controls.Sample.Issues.Issue23868"
xmlns:local="clr-namespace:Maui.Controls.Sample.Issues"
x:Name="ThisMainPage"
Title="Main Page">
Title="Main Page"
x:DataType="local:Issue23868">
<StackLayout>
<Label Text="Pull to refresh twice to replicate the issue"
HorizontalOptions="Center"
Expand All @@ -17,19 +18,21 @@
<CollectionView.Header>
<Grid ColumnDefinitions="2*,*"
HorizontalOptions="CenterAndExpand"
IsVisible="{Binding Source={x:Reference collectionView}, Path=ItemsSource.Count, FallbackValue=False}">
x:DataType="{x:Null}"
IsVisible="{Binding ItemsSource.Count, Source={x:Reference collectionView}, FallbackValue=False}">
<Label Grid.Column="0"
Text="Items Count:"
VerticalTextAlignment="Center"
HorizontalOptions="EndAndExpand"/>
<Label Grid.Column="1"
Text="{Binding Items.Count}"
VerticalTextAlignment="Center"
HorizontalOptions="StartAndExpand"/>
HorizontalOptions="StartAndExpand"
x:DataType="local:Issue23868"/>
</Grid>
</CollectionView.Header>
<CollectionView.ItemTemplate>
<DataTemplate>
<DataTemplate x:DataType="x:String">
<Label Text="{Binding}" HorizontalOptions="Center" VerticalOptions="Center"/>
</DataTemplate>
</CollectionView.ItemTemplate>
Expand Down
4 changes: 2 additions & 2 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue25201.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
HeightRequest="100"
Padding="20"
Source="dotnet_bot"
IsVisible="{Binding Source={x:Reference Switch1}, Path=IsToggled}"
IsVisible="{Binding IsToggled, Source={x:Reference Switch1}, x:DataType=Switch}"
/>

<!-- https://github.com/dotnet/maui/issues/16713 -->
Expand All @@ -35,7 +35,7 @@
AbsoluteLayout.LayoutFlags="SizeProportional"
AbsoluteLayout.LayoutBounds="0,0,1.0,1.0"
BackgroundColor="#80FFFFFF"
IsVisible="{Binding Source={x:Reference Switch2}, Path=IsToggled}"
IsVisible="{Binding IsToggled, Source={x:Reference Switch2}, x:DataType=Switch}"
/>
</AbsoluteLayout>
</VerticalStackLayout>
Expand Down
9 changes: 5 additions & 4 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue25224.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
x:Class="Maui.Controls.Sample.Issues.Issue25224"
xmlns:local="clr-namespace:Maui.Controls.Sample.Issues"
x:Name="ThisMainPage"
Title="Main Page">
Title="Main Page"
x:DataType="local:Issue25224+Issue25224ViewModel">

<ContentPage.Resources>
<DataTemplate x:Key="AdvancedTemplate">
Expand Down Expand Up @@ -42,15 +43,15 @@
x:Name="searchBar"
AutomationId="SearchBar"
SearchCommand="{Binding FilterCommand}"
SearchCommandParameter="{Binding Source={x:Reference searchBar}, Path=Text}"
SearchCommandParameter="{Binding Text, Source={x:Reference searchBar}, x:DataType=SearchBar}"
Placeholder="Filter" />
<CollectionView Grid.Row="2"
x:Name="collectionView"
AutomationId="Success"
ItemsSource="{Binding Monkeys}"
EmptyView="{Binding Source={x:Reference searchBar}, Path=Text}">
EmptyView="{Binding Text, Source={x:Reference searchBar}, x:DataType=SearchBar}">
<CollectionView.ItemTemplate>
<DataTemplate>
<DataTemplate x:DataType="local:Monkey">
<Grid Padding="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
Expand Down
10 changes: 6 additions & 4 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue25362.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Maui.Controls.Sample.Issues.Issue25362"
xmlns:local="clr-namespace:Maui.Controls.Sample.Issues"
x:Name="Self"
Title="Issue25362">
Title="Issue25362"
x:DataType="local:Issue25362">
<Grid RowDefinitions="Auto,*">
<HorizontalStackLayout Grid.Row="0">
<Button
Expand All @@ -19,9 +21,9 @@

<CollectionView.Header>
<VerticalStackLayout>
<VerticalStackLayout BindableLayout.ItemsSource="{Binding BindingContext.ItemListHeader, Source={x:Reference Self}}">
<VerticalStackLayout BindableLayout.ItemsSource="{Binding ItemListHeader}">
<BindableLayout.ItemTemplate>
<DataTemplate>
<DataTemplate x:DataType="x:String">
<Label Padding="10" Text="{Binding .}" />
</DataTemplate>
</BindableLayout.ItemTemplate>
Expand All @@ -34,7 +36,7 @@
</CollectionView.Header>

<CollectionView.ItemTemplate>
<DataTemplate>
<DataTemplate x:DataType="x:String">
<Label Padding="10" Text="{Binding .}" />
</DataTemplate>
</CollectionView.ItemTemplate>
Expand Down
5 changes: 3 additions & 2 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue25724.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
x:Class="Maui.Controls.Sample.Issues.Issue25724"
xmlns:local="clr-namespace:Maui.Controls.Sample.Issues"
x:Name="ThisMainPage"
Title="Main Page">
Title="Main Page"
x:DataType="local:Issue25724+Issue25724ViewModel">

<Grid RowDefinitions="Auto,*">

Expand All @@ -28,7 +29,7 @@
</CollectionView.Header>

<CollectionView.ItemTemplate>
<DataTemplate>
<DataTemplate x:DataType="x:String">
<Label Padding="20,5,5,5" Text="{Binding .}" />
</DataTemplate>
</CollectionView.ItemTemplate>
Expand Down
5 changes: 3 additions & 2 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue7045.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<Shell xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Maui.Controls.Sample.Issues.Issue7045">
x:Class="Maui.Controls.Sample.Issues.Issue7045"
xmlns:local="clr-namespace:Maui.Controls.Sample.Issues">
<ShellContent
Title="Main"
Route="MainPage">
Expand All @@ -16,7 +17,7 @@
<ShellContent
Title="Detail"
Route="DetialPage">
<ContentPage x:Name="DetailPage">
<ContentPage x:Name="DetailPage" x:DataType="local:Issue7045">
<Shell.BackButtonBehavior>
<BackButtonBehavior
TextOverride="Back"
Expand Down
7 changes: 4 additions & 3 deletions src/Controls/tests/TestCases.HostApp/Issues/Issues8845.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
Title="Issue 8845"
x:Class="Maui.Controls.Sample.Issues.Issue8845">
x:Class="Maui.Controls.Sample.Issues.Issue8845"
xmlns:local="clr-namespace:Maui.Controls.Sample.Issues">

<VerticalStackLayout>
<Picker AutomationId="MauiPicker1" x:Name="picker1" ItemDisplayBinding="{Binding DisplayName}"/>
<Picker AutomationId="MauiPicker2" x:Name="picker2" ItemDisplayBinding="{Binding DisplayName}"/>
<Picker AutomationId="MauiPicker1" x:Name="picker1" ItemDisplayBinding="{Binding DisplayName}" x:DataType="local:Issue8845Item"/>
<Picker AutomationId="MauiPicker2" x:Name="picker2" ItemDisplayBinding="{Binding DisplayName}" x:DataType="local:Issue8845Item"/>
<Button AutomationId="UpdateButton" Text="Update" Clicked="Button_Clicked"/>
</VerticalStackLayout>

Expand Down
11 changes: 8 additions & 3 deletions src/Controls/tests/TestCases.HostApp/Issues/Issues8845.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ public partial class Issue8845 : ContentPage
public Issue8845()
{
InitializeComponent();
var items = new List<object>
var items = new List<Issue8845Item>
{
new { DisplayName = (string)null!},
new { DisplayName = "Not null"},
new Issue8845Item { DisplayName = (string)null!},
new Issue8845Item { DisplayName = "Not null"},
};
picker1.ItemsSource = items;
picker2.ItemsSource = items;
Expand All @@ -26,4 +26,9 @@ private void Button_Clicked(object sender, EventArgs e)
}

}

public class Issue8845Item
{
public string DisplayName { get; set; } = string.Empty;
}
}
Loading
Loading