Skip to content

Commit ca5ff04

Browse files
committed
加上纯 .NET 的库项目
1 parent f541534 commit ca5ff04

File tree

7 files changed

+40
-2
lines changed

7 files changed

+40
-2
lines changed

CustomWpf/CustomWpf.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoApp", "Demo\DemoApp\Dem
2626
EndProject
2727
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoLib1", "Demo\DemoLib1\DemoLib1.csproj", "{B892B53C-752A-4700-8845-CD095F3AC08B}"
2828
EndProject
29+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoLib2", "Demo\DemoLib2\DemoLib2.csproj", "{17CCDE40-5335-479A-8B67-E7B0A1332EA9}"
30+
EndProject
2931
Global
3032
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3133
Debug|Any CPU = Debug|Any CPU
@@ -56,6 +58,10 @@ Global
5658
{B892B53C-752A-4700-8845-CD095F3AC08B}.Debug|Any CPU.Build.0 = Debug|Any CPU
5759
{B892B53C-752A-4700-8845-CD095F3AC08B}.Release|Any CPU.ActiveCfg = Release|Any CPU
5860
{B892B53C-752A-4700-8845-CD095F3AC08B}.Release|Any CPU.Build.0 = Release|Any CPU
61+
{17CCDE40-5335-479A-8B67-E7B0A1332EA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
62+
{17CCDE40-5335-479A-8B67-E7B0A1332EA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
63+
{17CCDE40-5335-479A-8B67-E7B0A1332EA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
64+
{17CCDE40-5335-479A-8B67-E7B0A1332EA9}.Release|Any CPU.Build.0 = Release|Any CPU
5965
EndGlobalSection
6066
GlobalSection(SolutionProperties) = preSolution
6167
HideSolutionNode = FALSE
@@ -67,6 +73,7 @@ Global
6773
{39E01A9E-C352-4B7E-96CA-612A07937470} = {FE032A91-A790-4274-A194-02E161D1F14B}
6874
{3C3A4FD6-333B-480B-8354-3BB209FA89DB} = {1FCB5593-B06F-4DC3-B63F-315CF6DCF2BA}
6975
{B892B53C-752A-4700-8845-CD095F3AC08B} = {1FCB5593-B06F-4DC3-B63F-315CF6DCF2BA}
76+
{17CCDE40-5335-479A-8B67-E7B0A1332EA9} = {1FCB5593-B06F-4DC3-B63F-315CF6DCF2BA}
7077
EndGlobalSection
7178
GlobalSection(ExtensibilityGlobals) = postSolution
7279
SolutionGuid = {C25E6016-F278-457B-87D6-39EC0E0A6849}

CustomWpf/Demo/DemoApp/DemoApp.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<TargetFramework>net6.0-windows</TargetFramework>
66
<Nullable>enable</Nullable>
77
<UseWPF>true</UseWPF>
8+
<IsPackable>false</IsPackable>
89
</PropertyGroup>
910

1011
<ItemGroup>

CustomWpf/Demo/DemoApp/MainWindow.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
55
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6-
xmlns:local="clr-namespace:DemoApp"
6+
xmlns:local="clr-namespace:DemoApp" xmlns:demolib1="clr-namespace:DemoLib1;assembly=DemoLib1"
77
mc:Ignorable="d"
88
Title="MainWindow" Height="450" Width="800">
99
<Grid>
10-
10+
<demolib1:UserControl1></demolib1:UserControl1>
1111
</Grid>
1212
</Window>

CustomWpf/Demo/DemoLib1/DemoLib1.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
<TargetFramework>net6.0-windows</TargetFramework>
55
<Nullable>enable</Nullable>
66
<UseWPF>true</UseWPF>
7+
<IsPackable>false</IsPackable>
78
</PropertyGroup>
89

10+
<ItemGroup>
11+
<ProjectReference Include="..\DemoLib2\DemoLib2.csproj" />
12+
</ItemGroup>
13+
914
</Project>

CustomWpf/Demo/DemoLib1/UserControl1.xaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using System.Windows.Media.Imaging;
1313
using System.Windows.Navigation;
1414
using System.Windows.Shapes;
15+
using DemoLib2;
1516

1617
namespace DemoLib1
1718
{
@@ -24,5 +25,7 @@ public UserControl1()
2425
{
2526
InitializeComponent();
2627
}
28+
29+
public Foo Foo { get; } = new Foo();
2730
}
2831
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
<IsPackable>false</IsPackable>
8+
</PropertyGroup>
9+
10+
</Project>

CustomWpf/Demo/DemoLib2/Foo.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace DemoLib2
8+
{
9+
public class Foo
10+
{
11+
}
12+
}

0 commit comments

Comments
 (0)