Skip to content

Commit 50bed33

Browse files
committed
Style | MVVM风格代码
1 parent 0ca47d6 commit 50bed33

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

ShadowViewer/App.xaml

+13-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
77
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
88
xmlns:cw="using:CustomExtensions.WinUI"
9-
xmlns:converters="using:CommunityToolkit.WinUI.Converters">
9+
xmlns:converters="using:CommunityToolkit.WinUI.Converters"
10+
xmlns:converters1="using:ShadowViewer.Core.Converters">
1011
<Application.Resources>
1112
<ResourceDictionary>
1213
<ResourceDictionary.MergedDictionaries>
@@ -20,7 +21,17 @@
2021
<converters:StringFormatConverter x:Key="StringFormatConverter" />
2122
<converters:StringVisibilityConverter x:Key="StringVisibilityConverter" />
2223
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
23-
24+
<converters:FileSizeToFriendlyStringConverter x:Key="SizeConverter" />
25+
<!-- ¼¯ºÏcount==0 ÏÔʾ -->
26+
<converters1:CollectionCountToObjectConverter
27+
x:Key="CollectionToVisibilityConverter"
28+
EmptyValue="Visible"
29+
NotEmptyValue="Collapsed" />
30+
<!-- ¼¯ºÏcount!=0 ÏÔʾ -->
31+
<converters1:CollectionCountToObjectConverter
32+
x:Key="CollectionToNVisibilityConverter"
33+
EmptyValue="Collapsed"
34+
NotEmptyValue="Visible" />
2435
<Color x:Key="ButtonHoverBackgroundColor">Gray</Color>
2536
<!-- Other app resources here -->
2637
<Thickness x:Key="NavigationViewContentGridBorderThickness">0</Thickness>

0 commit comments

Comments
 (0)