Skip to content

Commit 712806f

Browse files
authored
Merge branch 'master' into Add-IRouteNotifyer-Tutorial
2 parents 5423eae + 3ec8ee3 commit 712806f

22 files changed

+124
-81
lines changed

doc/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_site/*

doc/api/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.yml
2+
manifest*

doc/api/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Welcome to the API Reference for the SampleApps
2+
3+
Use the Side TOC to navigate through the API documentation.

src/DevTKSS.Extensions.Uno.Storage/DevTKSS.Extensions.Uno.Storage.csproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
<Description>Extensions that are extending Uno Platform functionallities</Description>
1111
</PropertyGroup>
1212
<ItemGroup>
13-
<PackageReference Include="Uno.Core" />
14-
<PackageReference Include="Uno.Core.Extensions" />
15-
<PackageReference Include="Uno.Core.Extensions.Collections" />
13+
<PackageReference Include="Uno.Core.Extensions" />
1614
<PackageReference Include="Uno.Extensions.Storage" />
1715
</ItemGroup>
1816
</Project>
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
global using DevTKSS.Extensions.Uno.Storage.Enumerable;
2-
global using DevTKSS.Extensions.Uno.Storage;
1+
global using DevTKSS.Extensions.Uno.Storage.Enumerable;

src/DevTKSS.Uno.Samples.MvuxGallery/App.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</ResourceDictionary>
2020
</utum:MaterialToolkitTheme.FontOverrideDictionary> -->
2121
</utum:MaterialToolkitTheme>
22-
<ResourceDictionary Source="ms-appx:///Styles/Generic.xaml"/>
22+
<ResourceDictionary Source="ms-appx:///Styles/GalleryTemplates.xaml"/>
2323
</ResourceDictionary.MergedDictionaries>
2424

2525
<!-- Add resources here -->

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

Lines changed: 3 additions & 11 deletions
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>
@@ -49,22 +49,14 @@
4949
</PropertyGroup>
5050
<ItemGroup>
5151
<PackageReference Include="CommunityToolkit.WinUI.Converters" />
52-
<ProjectReference Include="..\DevTKSS.Extensions.Uno\DevTKSS.Extensions.Uno.csproj" />
5352
</ItemGroup>
5453
<ItemGroup>
5554
<UnoImage Include="Assets\Images\*" />
56-
<Resource Include="Assets\Samples\*" CopyToOutputDirectory="PreserveNewest" />
55+
<Resource Include="Assets\Samples\*.txt" CopyToOutputDirectory="PreserveNewest" />
5756
<UnoSplashScreen Include="Assets\SplashScreens\*" />
5857
</ItemGroup>
5958
<ItemGroup>
60-
<Compile Update="Presentation\Views\SimpleListPage.xaml.cs">
61-
<DependentUpon>SimpleListPage.xaml</DependentUpon>
62-
</Compile>
63-
</ItemGroup>
64-
<ItemGroup>
65-
<Page Update="Presentation\Views\SimpleListPage.xaml">
66-
<Generator>MSBuild:Compile</Generator>
67-
</Page>
59+
<ProjectReference Include="..\DevTKSS.Extensions.Uno.Storage\DevTKSS.Extensions.Uno.Storage.csproj" />
6860
</ItemGroup>
6961

7062
</Project>

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: 11 additions & 15 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

@@ -125,7 +121,7 @@ public async ValueTask SwitchCodeSampleAsync([FeedParameter(nameof(SelectedOptio
125121
{
126122
await Task.Delay(1, ct);
127123
return new HeaderContent(ImageLocation: "Assets/Images/styled_logo.png",
128-
Caption: _stringLocalizer["ListViewTitle"]);
124+
Caption: _stringLocalizer["GridViewTitle"]);
129125
});
130126
#endregion
131127

src/DevTKSS.Uno.Samples.MvuxGallery/Presentation/Views/CounterPage.xaml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
Margin="12"
4747
Width="{x:Bind spCounterContent.Width, Mode=OneWay}"/>
4848
</StackPanel>
49-
<Expander Grid.Row="1"
49+
<Expander x:Name="CodeSampleExpander"
50+
Grid.Row="1"
5051
MaxHeight="400"
5152
ExpandDirection="Down"
5253
VerticalAlignment="Bottom"
@@ -55,21 +56,19 @@
5556
ContentTemplate="{StaticResource CodeSampleWrappedTextblock}"
5657
Content="{Binding CurrentCodeSample}">
5758

58-
<Expander.HeaderTemplate>
59-
<DataTemplate>
60-
<utu:TabBar VerticalAlignment="Bottom"
61-
HorizontalAlignment="Stretch"
62-
Orientation="Horizontal"
63-
HorizontalContentAlignment="Stretch"
64-
SelectionIndicatorTransitionMode="Slide"
65-
ItemsSource="{Binding CodeSampleOptions, Mode=TwoWay}"
66-
ItemTemplate="{StaticResource BottomTabBarItemTemplate}"
67-
utu:CommandExtensions.Command="{Binding SwitchCodeSampleAsync}"
68-
utu:CommandExtensions.CommandParameter="{Binding RelativeSource={RelativeSource Mode=Self},Path=SelectedItem, UpdateSourceTrigger=PropertyChanged}">
69-
</utu:TabBar>
70-
</DataTemplate>
71-
</Expander.HeaderTemplate>
72-
59+
<Expander.Header>
60+
<utu:TabBar x:Name="CodeSampleTabBar"
61+
VerticalAlignment="Bottom"
62+
HorizontalAlignment="Stretch"
63+
Orientation="Horizontal"
64+
HorizontalContentAlignment="Stretch"
65+
SelectionIndicatorTransitionMode="Slide"
66+
ItemsSource="{Binding CodeSampleOptions, Mode=TwoWay}"
67+
ItemTemplate="{StaticResource BottomTabBarItemTemplate}"
68+
utu:CommandExtensions.Command="{Binding SwitchCodeSampleAsync}"
69+
utu:CommandExtensions.CommandParameter="{Binding RelativeSource={RelativeSource Mode=Self},Path=SelectedItem, UpdateSourceTrigger=PropertyChanged}">
70+
</utu:TabBar>
71+
</Expander.Header>
7372
</Expander>
7473
</Grid>
7574
</Page>

0 commit comments

Comments
 (0)