Skip to content

Commit a38861c

Browse files
Vetle444Copilot
andauthored
Enable MAUI XAML SourceGen compilation (#848)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 954d957 commit a38861c

7 files changed

Lines changed: 12 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## [57.0.0]
2+
- Use SourceGen compilation.
3+
14
## [56.2.0]
25
- Resources was updated from DIPS.Mobile.DesignTokens
36

src/app/Components/Components.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<Nullable>enable</Nullable>
2424

2525
<MauiEnableXamlCBindingWithSourceCompilation>true</MauiEnableXamlCBindingWithSourceCompilation>
26+
<MauiXamlInflator>SourceGen</MauiXamlInflator>
2627
</PropertyGroup>
2728

2829
<PropertyGroup Condition="'$(Configuration)' == 'Debug' AND $(TargetFramework.Contains('ios'))">

src/app/MemoryLeakTests/MemoryLeakTests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">30.0</SupportedOSPlatformVersion>
2525

2626
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
27+
<MauiXamlInflator>SourceGen</MauiXamlInflator>
2728
</PropertyGroup>
2829

2930
<ItemGroup>

src/app/Playground/Playground.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<!--<MauiEnableXamlCBindingWithSourceCompilation>true</MauiEnableXamlCBindingWithSourceCompilation>-->
2828
<!--<WarningsAsErrors>XC0022;XC0023;XC0045</WarningsAsErrors>-->
2929
<!--<MauiStrictXamlCompilation>true</MauiStrictXamlCompilation>-->
30+
<MauiXamlInflator>SourceGen</MauiXamlInflator>
3031
</PropertyGroup>
3132

3233
<ItemGroup>

src/library/DIPS.Mobile.UI/Components/Lists/CollectionView/CollectionView.Properties.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public bool HasAdditionalSpaceAtTheEnd
3030
/// <summary>
3131
/// Determines if input fields should be unfocused when the user scrolls the <see cref="CollectionView"/>. (ScrollBar, Editor etc..)
3232
/// </summary>
33-
public bool RemoveFocusOnScroll { get; init; }
33+
public bool RemoveFocusOnScroll { get; set; }
3434

3535
public static readonly BindableProperty ShouldBounceProperty = BindableProperty.Create(
3636
nameof(ShouldBounce),
@@ -59,8 +59,8 @@ public CollapsibleElement? CollapsibleElement
5959
/// <remarks>Default value is HorizontalThickness: size_3<br/> Left and right must be uniform. <br/><b>NB:</b> Top padding not implemented yet</remarks>
6060
public Thickness Padding { get; set; } = new(Sizes.GetSize(SizeName.content_margin_medium), 0);
6161

62-
public CornerRadius FirstItemCornerRadius { get; init; }
63-
public CornerRadius LastItemCornerRadius { get; init; }
62+
public CornerRadius FirstItemCornerRadius { get; set; }
63+
public CornerRadius LastItemCornerRadius { get; set; }
6464

6565
public static readonly BindableProperty HasAdditionalSizeAtTheEndProperty = BindableProperty.Create(
6666
nameof(HasAdditionalSpaceAtTheEnd),

src/library/DIPS.Mobile.UI/Components/Lists/ScrollView/ScrollView.Properties.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ public bool ShouldBounce
1818
}
1919

2020
/// <summary>
21-
/// Determines if input fields should be unfocused when the user scrolls the <see cref="CollectionView"/>. (ScrollBar, Editor etc..)
21+
/// Determines if input fields should be unfocused when the user scrolls the <see cref="ScrollView"/>. (ScrollBar, Editor etc..)
2222
/// </summary>
23-
public bool RemoveFocusOnScroll { get; init; }
23+
public bool RemoveFocusOnScroll { get; set; }
2424

2525
public static readonly BindableProperty HasAdditionalSpaceAtTheEndProperty = BindableProperty.Create(
2626
nameof(HasAdditionalSpaceAtTheEnd),

src/library/DIPS.Mobile.UI/DIPS.Mobile.UI.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<LangVersion>default</LangVersion>
1515

1616
<MauiEnableXamlCBindingWithSourceCompilation>true</MauiEnableXamlCBindingWithSourceCompilation>
17+
<MauiXamlInflator>SourceGen</MauiXamlInflator>
1718
<WarningsAsErrors>XC0022;XC0023;XC0045;XC0103</WarningsAsErrors>
1819
</PropertyGroup>
1920

0 commit comments

Comments
 (0)