File tree Expand file tree Collapse file tree 2 files changed +13
-14
lines changed
src/CodeWF.Tools.AvaloniaDemo Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change 1
1
using System . Text . Json . Serialization ;
2
2
3
- namespace CodeWF . Tools . AvaloniaDemo . Models
3
+ namespace CodeWF . Tools . AvaloniaDemo . Models ;
4
+
5
+ public class ClassWithEnum
4
6
{
5
- public class ClassWithEnum
6
- {
7
- public int Id { get ; set ; }
8
- public string ? Name { get ; set ; }
7
+ public int Id { get ; set ; }
8
+ public string ? Name { get ; set ; }
9
9
10
- public TestEnum Type { get ; set ; }
11
- }
10
+ public TestEnum Type { get ; set ; }
11
+ }
12
12
13
- [ JsonConverter ( typeof ( JsonStringEnumConverter < TestEnum > ) ) ]
14
- public enum TestEnum
15
- {
16
- Light ,
17
- Dark
18
- }
13
+ [ JsonConverter ( typeof ( JsonStringEnumConverter < TestEnum > ) ) ]
14
+ public enum TestEnum
15
+ {
16
+ Light ,
17
+ Dark
19
18
}
Original file line number Diff line number Diff line change 34
34
<StackPanel >
35
35
<Button Content =" 一般类" Click =" SerialNormalClass_OnClick" />
36
36
<Button Content =" 枚举类" Click =" SerialClassWithEnum_OnClick" />
37
- <SelectableTextBlock Name =" TxtJsonStr" ></ SelectableTextBlock >
37
+ <SelectableTextBlock Name =" TxtJsonStr" TextWrapping = " Wrap " / >
38
38
</StackPanel >
39
39
</TabItem >
40
40
</TabControl >
You can’t perform that action at this time.
0 commit comments