Skip to content

Commit 991eee5

Browse files
author
panwenbo
committed
修复bug;
1 parent 6004ceb commit 991eee5

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

One.Toolbox/App.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private static IServiceProvider ConfigureServices()
7575
services.AddSingleton<ViewModels.NotePad.NotePadPageVM>();
7676
services.AddSingleton<ViewModels.Setting.CloudSettingsVM>();
7777

78-
services.AddSingleton<ViewModels.BingImage.BingImageVM>();
78+
services.AddSingleton<ViewModels.BingImage.BingImagePageVM>();
7979
services.AddSingleton<ViewModels.LotteryDraw.LotteryDrawPageVM>();
8080

8181
//Services

One.Toolbox/ViewModels/BingImage/BingImageVM.cs renamed to One.Toolbox/ViewModels/BingImage/BingImagePageVM.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
namespace One.Toolbox.ViewModels.BingImage;
1212

13-
public partial class BingImageVM : BaseVM
13+
public partial class BingImagePageVM : BaseVM
1414
{
15-
public BingImageVM()
15+
public BingImagePageVM()
1616
{
1717
}
1818

One.Toolbox/Views/BingImage/BingImagePage.xaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
55
xmlns:hc="https://handyorg.github.io/handycontrol"
66
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
7-
xmlns:uc="clr-namespace:One.Toolbox.MyUserControl"
8-
xmlns:viewmodels="clr-namespace:One.Toolbox.ViewModels.BingImage"
9-
d:DataContext="{d:DesignInstance viewmodels:BingImageViewModel,
7+
8+
xmlns:vms="clr-namespace:One.Toolbox.ViewModels.BingImage"
9+
d:DataContext="{d:DesignInstance vms:BingImagePageVM,
1010
IsDesignTimeCreatable=False}"
1111
d:Height="548"
1212
d:Width="733"
@@ -19,7 +19,7 @@
1919
ItemsSource="{Binding ObImageListInfo}"
2020
Style="{StaticResource WrapPanelHorizontalListBox}">
2121
<ListBox.ItemTemplate>
22-
<DataTemplate DataType="viewmodels:UsefullImageInfo">
22+
<DataTemplate DataType="vms:UsefullImageInfoVM">
2323

2424

2525
<hc:Card MaxWidth="220" Margin="8" BorderThickness="0"

One.Toolbox/Views/BingImage/BingImagePage.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ namespace One.Toolbox.Views.BingImage;
66

77
public partial class BingImagePage
88
{
9-
public BingImageVM ViewModel { get; }
9+
public BingImagePageVM ViewModel { get; }
1010

1111
public BingImagePage()
1212
{
13-
DataContext = ViewModel = App.Current.Services.GetService<BingImageVM>();
13+
DataContext = ViewModel = App.Current.Services.GetService<BingImagePageVM>();
1414

1515
InitializeComponent();
1616
}

0 commit comments

Comments
 (0)