Skip to content

Commit 3ec8ee3

Browse files
committed
chore: Add Background again of ViewHeaderTemplate, still bugged on themechange #13
1 parent 4f9f3a7 commit 3ec8ee3

File tree

4 files changed

+27
-32
lines changed

4 files changed

+27
-32
lines changed

src/DevTKSS.Uno.Samples.MvuxGallery/DevTKSS.Uno.Samples.MvuxGallery.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Uno.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net9.0-desktop</TargetFrameworks> <!--;net9.0-windows10.0.26100-->
3+
<TargetFrameworks>net9.0-desktop;net9.0-windows10.0.26100</TargetFrameworks>
44
<!-- <TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>-->
55
<OutputType>Exe</OutputType>
66
<UnoSingleProject>true</UnoSingleProject>

src/DevTKSS.Uno.Samples.MvuxGallery/Models/GalleryImages/GalleryImageService.cs

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,8 @@ public async ValueTask<IImmutableList<GalleryImageModel>> GetGalleryImagesWithRe
1818
{
1919
return await GetGalleryImagesAsync(ct);
2020
}
21-
public async ValueTask<IImmutableList<GalleryImageModel>> GetGalleryImagesWithoutReswAsync(CancellationToken ct)
22-
{
23-
string cultureString = _localizationService.CurrentCulture.TwoLetterISOLanguageName;
24-
_logger.LogTrace("Trying to get GalleryImages for Culture: {culture}", cultureString);
25-
var galleryImages = cultureString switch
26-
{
27-
"de" => await GetDEGalleryImagesAsync(ct),
28-
"en" => await GetENGalleryImagesAsync(ct),
29-
_ => await GetENGalleryImagesAsync(ct),
30-
};
31-
return galleryImages;
32-
}
33-
21+
3422
#region Get culture specific gallery imageDescription
35-
3623
#region With resw
3724
private async ValueTask<IImmutableList<GalleryImageModel>> GetGalleryImagesAsync(CancellationToken ct)
3825
{
@@ -71,7 +58,19 @@ private async ValueTask<IImmutableList<GalleryImageModel>> GetGalleryImagesAsync
7158

7259
#endregion
7360

74-
#region Without resw
61+
#region Without resw
62+
public async ValueTask<IImmutableList<GalleryImageModel>> GetGalleryImagesWithoutReswAsync(CancellationToken ct)
63+
{
64+
string cultureString = _localizationService.CurrentCulture.TwoLetterISOLanguageName;
65+
_logger.LogTrace("Trying to get GalleryImages for Culture: {culture}", cultureString);
66+
var galleryImages = cultureString switch
67+
{
68+
"de" => await GetDEGalleryImagesAsync(ct),
69+
"en" => await GetENGalleryImagesAsync(ct),
70+
_ => await GetENGalleryImagesAsync(ct),
71+
};
72+
return galleryImages;
73+
}
7574
#region German gallery descriptions
7675
private async ValueTask<IImmutableList<GalleryImageModel>> GetDEGalleryImagesAsync(CancellationToken ct)
7776
{

src/DevTKSS.Uno.Samples.MvuxGallery/Presentation/ViewModels/DashboardModel.cs

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using System.Reflection.Metadata;
2+
using Newtonsoft.Json;
13
using Uno.Extensions.Reactive.Commands;
24

35
namespace DevTKSS.Uno.Samples.MvuxGallery.Presentation.ViewModels;
@@ -49,28 +51,22 @@ public DashboardModel(
4951
/// </value>
5052
public IState<string> CurrentCodeSample => State<string>.Value(this, () => string.Empty);
5153

54+
5255
/// <summary>
5356
/// Get a static Collection of Values for <see cref="CodeSampleOptions"/>
5457
/// </summary>
5558
/// <param name="ct">
56-
/// A CancellationToken to make it compileable
57-
/// <remarks>
58-
/// since `ListFeed.Async` requires a CancellationToken even if Uno Documentation remarks this parameter to be optional.<br/>
59-
/// <see href="https://learn.microsoft.com/en-us/dotnet/csharp/misc/cs0411?f1url=%3FappId%3Droslyn%26k%3Dk(CS0411)">CS0411</see><br/>
60-
/// <br/>
61-
/// adding then the type string or IImmutableList<string> to the ListFeed like `ListFeed<string>.Async(...)`,
62-
/// or to the Async Extension itself like `ListFeed.Async<IImutableList<string>` results in a type mismatch.<br/>
63-
/// <see href="https://learn.microsoft.com/en-us/dotnet/csharp/misc/cs1503?f1url=%3FappId%3Droslyn%26k%3Dk(CS1503)">CS1503</see>
64-
/// </remarks>
59+
/// A <see cref="CancellationToken"/> as the FeedList.Async requires a CancellationToken
6560
/// </param>
6661
/// <returns>The available Values to select from.</returns>
67-
/// <remarks>
68-
/// This uses the explicit `ImmutableList.Create` function (non generic!)<br/>
69-
/// overload:<br/>
70-
/// `params ReadOnlySpan<string> items` this takes in an (e.g.) array of generic typed values
71-
/// </remarks>
7262
public static async ValueTask<IImmutableList<string>> GetCodeSampleOptionsAsync(CancellationToken ct = default)
7363
{
64+
// since `ListFeed.Async` requires a CancellationToken even if Uno Documentation remarks this parameter to be optional.< br />
65+
// <see href="https://learn.microsoft.com/en-us/dotnet/csharp/misc/cs0411?f1url=%3FappId%3Droslyn%26k%3Dk(CS0411)">CS0411</see><br/>
66+
//
67+
// adding then the type string or IImmutableList<string> to the ListFeed like `ListFeed<string>.Async(...)`,
68+
// or to the Async Extension itself like `ListFeed.Async<IImutableList<string>` results in a type mismatch.<br/>
69+
// <see href="https://learn.microsoft.com/en-us/dotnet/csharp/misc/cs1503?f1url=%3FappId%3Droslyn%26k%3Dk(CS1503)">CS1503</see>
7470

7571
await Task.Delay(1, ct);
7672

src/DevTKSS.Uno.Samples.MvuxGallery/Styles/GalleryTemplates.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
<!--#region ListView and GridView Header Template binding to a FeedView to Refresh-->
5858
<DataTemplate x:Key="ViewHeaderTemplate" x:DataType="models:HeaderContent">
59-
<Grid
59+
<Grid Background="{ThemeResource SurfaceInverseBrush}"
6060
CornerRadius="10,10,0,0"
6161
Padding="10">
6262
<Grid.ColumnDefinitions>
@@ -148,4 +148,4 @@
148148
</utu:TabBarItem>
149149
</DataTemplate>
150150
<!--#endregion-->
151-
</ResourceDictionary>
151+
</ResourceDictionary>

0 commit comments

Comments
 (0)