Skip to content

Commit

Permalink
Merge pull request #2 from dotnet-campus/t/lindexi/CustomWpfDemo
Browse files Browse the repository at this point in the history
加上 Demo 项目
  • Loading branch information
kkwpsv authored May 10, 2022
2 parents 419ec41 + c8edccc commit 8d3b1f3
Show file tree
Hide file tree
Showing 13 changed files with 215 additions and 2 deletions.
27 changes: 25 additions & 2 deletions CustomWpf/CustomWpf.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{FE032A91-A79
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Packaging", "Packaging", "{27886E90-E328-4AE9-86DA-1F596554D26B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dotnetCampus.WPF.NuGet", "Packaging\dotnetCampus.WPF.NuGet\dotnetCampus.WPF.NuGet.csproj", "{FDC9151F-3544-4C68-9D05-D8E4935F1A9F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.WPF.NuGet", "Packaging\dotnetCampus.WPF.NuGet\dotnetCampus.WPF.NuGet.csproj", "{FDC9151F-3544-4C68-9D05-D8E4935F1A9F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.WPF.Resource", "Lib\dotnetCampus.CustomWpf.Resource\dotnetCampus.WPF.Resource.csproj", "{D73CB485-6290-4E37-B441-8068E60CBF7E}"
EndProject
Expand All @@ -18,7 +18,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
build\Version.props = build\Version.props
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dotnetCampus.WPF.Dependencies", "Lib\dotnetCampus.CustomWpf.Dependencies\dotnetCampus.WPF.Dependencies.csproj", "{39E01A9E-C352-4B7E-96CA-612A07937470}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.WPF.Dependencies", "Lib\dotnetCampus.CustomWpf.Dependencies\dotnetCampus.WPF.Dependencies.csproj", "{39E01A9E-C352-4B7E-96CA-612A07937470}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Demo", "Demo", "{1FCB5593-B06F-4DC3-B63F-315CF6DCF2BA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoApp", "Demo\DemoApp\DemoApp.csproj", "{3C3A4FD6-333B-480B-8354-3BB209FA89DB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoLib1", "Demo\DemoLib1\DemoLib1.csproj", "{B892B53C-752A-4700-8845-CD095F3AC08B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoLib2", "Demo\DemoLib2\DemoLib2.csproj", "{17CCDE40-5335-479A-8B67-E7B0A1332EA9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -42,6 +50,18 @@ Global
{39E01A9E-C352-4B7E-96CA-612A07937470}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39E01A9E-C352-4B7E-96CA-612A07937470}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39E01A9E-C352-4B7E-96CA-612A07937470}.Release|Any CPU.Build.0 = Release|Any CPU
{3C3A4FD6-333B-480B-8354-3BB209FA89DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3C3A4FD6-333B-480B-8354-3BB209FA89DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3C3A4FD6-333B-480B-8354-3BB209FA89DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3C3A4FD6-333B-480B-8354-3BB209FA89DB}.Release|Any CPU.Build.0 = Release|Any CPU
{B892B53C-752A-4700-8845-CD095F3AC08B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B892B53C-752A-4700-8845-CD095F3AC08B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B892B53C-752A-4700-8845-CD095F3AC08B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B892B53C-752A-4700-8845-CD095F3AC08B}.Release|Any CPU.Build.0 = Release|Any CPU
{17CCDE40-5335-479A-8B67-E7B0A1332EA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17CCDE40-5335-479A-8B67-E7B0A1332EA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17CCDE40-5335-479A-8B67-E7B0A1332EA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17CCDE40-5335-479A-8B67-E7B0A1332EA9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -51,6 +71,9 @@ Global
{FDC9151F-3544-4C68-9D05-D8E4935F1A9F} = {27886E90-E328-4AE9-86DA-1F596554D26B}
{D73CB485-6290-4E37-B441-8068E60CBF7E} = {FE032A91-A790-4274-A194-02E161D1F14B}
{39E01A9E-C352-4B7E-96CA-612A07937470} = {FE032A91-A790-4274-A194-02E161D1F14B}
{3C3A4FD6-333B-480B-8354-3BB209FA89DB} = {1FCB5593-B06F-4DC3-B63F-315CF6DCF2BA}
{B892B53C-752A-4700-8845-CD095F3AC08B} = {1FCB5593-B06F-4DC3-B63F-315CF6DCF2BA}
{17CCDE40-5335-479A-8B67-E7B0A1332EA9} = {1FCB5593-B06F-4DC3-B63F-315CF6DCF2BA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C25E6016-F278-457B-87D6-39EC0E0A6849}
Expand Down
9 changes: 9 additions & 0 deletions CustomWpf/Demo/DemoApp/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Application x:Class="DemoApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:DemoApp"
StartupUri="MainWindow.xaml">
<Application.Resources>

</Application.Resources>
</Application>
17 changes: 17 additions & 0 deletions CustomWpf/Demo/DemoApp/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace DemoApp
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}
10 changes: 10 additions & 0 deletions CustomWpf/Demo/DemoApp/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
21 changes: 21 additions & 0 deletions CustomWpf/Demo/DemoApp/DemoApp.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="dotnetCampus.WPF" Version="6.0.4-alpha02" />
<PackageReference Include="dotnetCampus.WPF.Dependencies" Version="6.0.4-alpha02" />
<PackageReference Include="dotnetCampus.WPF.Resource" Version="6.0.4-alpha02" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\DemoLib1\DemoLib1.csproj" />
</ItemGroup>

</Project>
12 changes: 12 additions & 0 deletions CustomWpf/Demo/DemoApp/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Window x:Class="DemoApp.MainWindow"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:DemoApp" xmlns:demolib1="clr-namespace:DemoLib1;assembly=DemoLib1"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<demolib1:UserControl1></demolib1:UserControl1>
</Grid>
</Window>
28 changes: 28 additions & 0 deletions CustomWpf/Demo/DemoApp/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace DemoApp
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}
10 changes: 10 additions & 0 deletions CustomWpf/Demo/DemoLib1/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
18 changes: 18 additions & 0 deletions CustomWpf/Demo/DemoLib1/DemoLib1.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="dotnetCampus.WPF" Version="6.0.4-alpha02" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\DemoLib2\DemoLib2.csproj" />
</ItemGroup>

</Project>
12 changes: 12 additions & 0 deletions CustomWpf/Demo/DemoLib1/UserControl1.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<UserControl x:Class="DemoLib1.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DemoLib1"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>

</Grid>
</UserControl>
31 changes: 31 additions & 0 deletions CustomWpf/Demo/DemoLib1/UserControl1.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using DemoLib2;

namespace DemoLib1
{
/// <summary>
/// Interaction logic for UserControl1.xaml
/// </summary>
public partial class UserControl1 : UserControl
{
public UserControl1()
{
InitializeComponent();
}

public Foo Foo { get; } = new Foo();
}
}
10 changes: 10 additions & 0 deletions CustomWpf/Demo/DemoLib2/DemoLib2.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>

</Project>
12 changes: 12 additions & 0 deletions CustomWpf/Demo/DemoLib2/Foo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DemoLib2
{
public class Foo
{
}
}

0 comments on commit 8d3b1f3

Please sign in to comment.