Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
更新设置控件 (#1634)
Browse files Browse the repository at this point in the history
  • Loading branch information
Richasy authored Feb 14, 2023
1 parent e8fd79f commit fa1a21f
Show file tree
Hide file tree
Showing 41 changed files with 554 additions and 1,629 deletions.
1 change: 1 addition & 0 deletions nuget.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="labs.windows" value="https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-Labs/nuget/v3/index.json" />
</packageSources>
<disabledPackageSources>
<clear />
Expand Down
8 changes: 4 additions & 4 deletions src/App/App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -1302,6 +1302,9 @@
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Labs.Uwp.SettingsControls">
<Version>0.0.13</Version>
</PackageReference>
<PackageReference Include="Humanizer.Core.zh-CN">
<Version>2.14.1</Version>
</PackageReference>
Expand All @@ -1327,10 +1330,7 @@
<Version>2.8.2-prerelease.220830001</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.1</Version>
</PackageReference>
<PackageReference Include="Richasy.ExpanderEx.UWP">
<Version>1.0.4</Version>
<Version>13.0.2</Version>
</PackageReference>
<PackageReference Include="Richasy.FluentIcon.Regular.UWP">
<Version>1.1.150</Version>
Expand Down
2 changes: 1 addition & 1 deletion src/App/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private void OnSuspending(object sender, SuspendingEventArgs e)
private void OnUnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
{
e.Handled = true;
Locator.Instance.GetService<ILogger>().Error(e.Exception);
Locator.Instance.GetLogger().Error(e.Exception);
}

private void NavigateToRootPage(object args = null)
Expand Down
28 changes: 9 additions & 19 deletions src/App/Controls/App/QuestionPanel.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:exp="using:Richasy.ExpanderEx.Uwp"
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
xmlns:local="using:Bili.App.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
Expand Down Expand Up @@ -54,30 +54,20 @@
ItemsSource="{x:Bind ViewModel.CurrentQuestionModule.Questions, Mode=OneWay}">
<muxc:ItemsRepeater.ItemTemplate>
<DataTemplate x:DataType="other:QuestionItem">
<exp:ExpanderEx ForceUseExpander="True">
<exp:ExpanderEx.Header>
<exp:ExpanderExWrapper Style="{StaticResource WrapperInExpanderHeaderStyle}">
<exp:ExpanderExWrapper.MainContent>
<exp:ExpanderExDescriptor
Title="{x:Bind Title}"
DescriptionVisibility="Collapsed"
IconVisibility="Collapsed" />
</exp:ExpanderExWrapper.MainContent>
</exp:ExpanderExWrapper>
</exp:ExpanderEx.Header>
<exp:ExpanderEx.Content>
<exp:ExpanderExWrapper Style="{StaticResource WrapperInExpanderContentStyle}">
<exp:ExpanderExWrapper.MainContent>
<labs:SettingsExpander Header="{x:Bind Title}">
<labs:SettingsExpander.Items>
<labs:SettingsCard>
<labs:SettingsCard.Header>
<TextBlock
HorizontalAlignment="Left"
IsTextSelectionEnabled="True"
LineHeight="24"
Text="{x:Bind Answer}"
TextWrapping="Wrap" />
</exp:ExpanderExWrapper.MainContent>
</exp:ExpanderExWrapper>
</exp:ExpanderEx.Content>
</exp:ExpanderEx>
</labs:SettingsCard.Header>
</labs:SettingsCard>
</labs:SettingsExpander.Items>
</labs:SettingsExpander>
</DataTemplate>
</muxc:ItemsRepeater.ItemTemplate>
<muxc:ItemsRepeater.Layout>
Expand Down
Loading

0 comments on commit fa1a21f

Please sign in to comment.