Skip to content

Commit 3940914

Browse files
committed
chore: remove obsolete title states and usings
1 parent 090d371 commit 3940914

File tree

7 files changed

+5
-45
lines changed

7 files changed

+5
-45
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@ public CounterModel(
1616
_stringLocalizer = stringLocalizer;
1717
}
1818

19-
public IState<string> CounterTitle => State<string>.Value(this, () => _stringLocalizer["CounterTitle"]);
20-
2119
public IState<Countable> Countable => State.Value(this, () => new Countable(0, 1));
2220
public ValueTask IncrementCounter()
2321
=> Countable.UpdateAsync(c => c?.Increment());
2422

25-
23+
#region Code Sample Selection
2624
public IListFeed<string> CodeSampleOptions => ListFeed<string>.Async(_sampleService.GetCodeSampleOptionsAsync)
2725
.Selection(SelectedOption);
2826
public IState<string> SelectedOption => State<string>.Value(this, () => string.Empty)
@@ -43,4 +41,5 @@ public async ValueTask SwitchCodeSampleAsync([FeedParameter(nameof(SelectedOptio
4341
_logger.LogTrace("Loaded code sample for option '{SelectedOption}': {CodeSample}", selectedOption, codeSample);
4442
await CurrentCodeSample.SetAsync(codeSample, ct);
4543
}
44+
#endregion
4645
}

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,6 @@ public DashboardModel(
2525
public IListFeed<GalleryImageModel> GalleryImages => ListFeed.Async(_galleryImageService.GetGalleryImagesWithoutReswAsync);
2626
public IListFeed<GalleryImageModel> GalleryImagesWithResw => ListFeed.Async(_galleryImageService.GetGalleryImagesWithReswAsync);
2727

28-
29-
public IState<string> DashboardTitle => State<string>.Value(this, () => _stringLocalizer["DashboardTitle"]);
30-
31-
#region ViewHeaderContent
32-
/// <value>
33-
/// Represents the header content of the view
34-
/// </value>
35-
/// <remarks>
36-
/// uses <see cref="IStringLocalizer"/> to dynamically localize the caption
37-
/// </remarks>
38-
public IState<HeaderContent> ViewHeaderContent => State<HeaderContent>.Value(this,
39-
() => new HeaderContent(ImageLocation: "Assets/Images/styled_logo.png",
40-
Caption: _stringLocalizer["GridViewTitle"]));
41-
#endregion
42-
4328
#region CodeSample import directly in the Model
4429
/// <value>
4530
/// Holds a static Collection of <see langword="string"/> to bind to

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ public ListboardModel(
4848
/// </summary>
4949
public IListFeed<GalleryImageModel> GalleryImages => ListFeed.Async(_galleryImageService.GetGalleryImagesWithoutReswAsync);
5050

51-
/// <summary>
52-
/// Gets the title of the Listboard.
53-
/// </summary>
54-
public IState<string> ListboardTitle => State<string>.Value(this, () => _stringLocalizer["ListboardTitle"]);
5551

5652
#region CodeSample import
5753
/// <summary>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ public partial record SimpleCardsModel
33
{
44
private readonly ICodeSampleService<SimpleCardsSampleOptions> _sampleService;
55
private readonly ILogger _logger;
6+
67
public SimpleCardsModel(
78
ICodeSampleService<SimpleCardsSampleOptions> sampleService,
89
ILogger<SimpleCardsModel> logger

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ IGalleryImageService galleryImageService
2020

2121
public IListFeed<GalleryImageModel> GalleryImagesWithResw => ListFeed.Async(_galleryImageService.GetGalleryImagesWithReswAsync);
2222

23-
24-
public IState<string> SimpleListTitle => State<string>.Value(this, () => _stringLocalizer["SimpleListTitle"]);
25-
2623
}
2724

2825

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<TextBlock TextAlignment="Center"
3535
Margin="12"
3636
Width="{x:Bind spCounterContent.Width,Mode=OneWay}">
37+
<!-- Using `Run` is until now not supported using Hot Design-->
3738
<Run Text="Counter:" /> <Run Text="{Binding Countable.Count}" />
3839
</TextBlock>
3940

src/DevTKSS.Uno.Samples.MvuxGallery/Presentation/Views/SimpleListPage.xaml.cs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.IO;
4-
using System.Linq;
5-
using System.Runtime.InteropServices.WindowsRuntime;
6-
using Microsoft.UI.Xaml;
7-
using Microsoft.UI.Xaml.Controls;
8-
using Microsoft.UI.Xaml.Controls.Primitives;
9-
using Microsoft.UI.Xaml.Data;
10-
using Microsoft.UI.Xaml.Input;
11-
using Microsoft.UI.Xaml.Media;
12-
using Microsoft.UI.Xaml.Navigation;
13-
using Windows.Foundation;
14-
using Windows.Foundation.Collections;
15-
16-
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
17-
181
namespace DevTKSS.Uno.Samples.MvuxGallery.Presentation.Views;
19-
/// <summary>
20-
/// An empty page that can be used on its own or navigated to within a Frame.
21-
/// </summary>
2+
223
public sealed partial class SimpleListPage : Page
234
{
245
public SimpleListPage()

0 commit comments

Comments
 (0)