Skip to content

Commit 4a5aa30

Browse files
committed
test
1 parent 857d723 commit 4a5aa30

File tree

13 files changed

+397
-3
lines changed

13 files changed

+397
-3
lines changed

src/HandyControl.sln

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HandyControl_Avalonia", "Av
4646
EndProject
4747
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HandyControlDemo_Avalonia", "Avalonia\HandyControlDemo_Avalonia\HandyControlDemo_Avalonia.csproj", "{99CCAF7C-F9A1-4C54-A5F0-B231E7F7AE66}"
4848
EndProject
49+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfApp1", "WpfApp1\WpfApp1.csproj", "{5CD0C03A-EF32-4C75-9B65-2DBD15A669B9}"
50+
EndProject
4951
Global
5052
GlobalSection(SolutionConfigurationPlatforms) = preSolution
5153
Debug-Avalonia|Any CPU = Debug-Avalonia|Any CPU
@@ -114,6 +116,18 @@ Global
114116
{99CCAF7C-F9A1-4C54-A5F0-B231E7F7AE66}.Release-Avalonia|Any CPU.Build.0 = Release|Any CPU
115117
{99CCAF7C-F9A1-4C54-A5F0-B231E7F7AE66}.Release-Net40|Any CPU.ActiveCfg = Release|Any CPU
116118
{99CCAF7C-F9A1-4C54-A5F0-B231E7F7AE66}.Release-Net-GE45|Any CPU.ActiveCfg = Release|Any CPU
119+
{5CD0C03A-EF32-4C75-9B65-2DBD15A669B9}.Debug-Avalonia|Any CPU.ActiveCfg = Debug|Any CPU
120+
{5CD0C03A-EF32-4C75-9B65-2DBD15A669B9}.Debug-Avalonia|Any CPU.Build.0 = Debug|Any CPU
121+
{5CD0C03A-EF32-4C75-9B65-2DBD15A669B9}.Debug-Net40|Any CPU.ActiveCfg = Debug|Any CPU
122+
{5CD0C03A-EF32-4C75-9B65-2DBD15A669B9}.Debug-Net40|Any CPU.Build.0 = Debug|Any CPU
123+
{5CD0C03A-EF32-4C75-9B65-2DBD15A669B9}.Debug-Net-GE45|Any CPU.ActiveCfg = Debug|Any CPU
124+
{5CD0C03A-EF32-4C75-9B65-2DBD15A669B9}.Debug-Net-GE45|Any CPU.Build.0 = Debug|Any CPU
125+
{5CD0C03A-EF32-4C75-9B65-2DBD15A669B9}.Release-Avalonia|Any CPU.ActiveCfg = Debug|Any CPU
126+
{5CD0C03A-EF32-4C75-9B65-2DBD15A669B9}.Release-Avalonia|Any CPU.Build.0 = Debug|Any CPU
127+
{5CD0C03A-EF32-4C75-9B65-2DBD15A669B9}.Release-Net40|Any CPU.ActiveCfg = Debug|Any CPU
128+
{5CD0C03A-EF32-4C75-9B65-2DBD15A669B9}.Release-Net40|Any CPU.Build.0 = Debug|Any CPU
129+
{5CD0C03A-EF32-4C75-9B65-2DBD15A669B9}.Release-Net-GE45|Any CPU.ActiveCfg = Debug|Any CPU
130+
{5CD0C03A-EF32-4C75-9B65-2DBD15A669B9}.Release-Net-GE45|Any CPU.Build.0 = Debug|Any CPU
117131
EndGlobalSection
118132
GlobalSection(SolutionProperties) = preSolution
119133
HideSolutionNode = FALSE

src/Shared/HandyControlDemo_Shared/App.xaml.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ protected override void OnStartup(StartupEventArgs e)
3535
EnsureSingleton();
3636
OpenSplashScreen();
3737

38+
var prepWindow = new System.Windows.Window
39+
{
40+
Width = 0,
41+
Height = 0,
42+
};
43+
prepWindow.Show();
44+
prepWindow.Hide(); // 此时渲染管线已完成初始化
45+
3846
base.OnStartup(e);
3947

4048
//UpdateRegistry();

src/Shared/HandyControlDemo_Shared/Service/Data/DataService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ internal ObservableCollection<TabControlDemoModel> GetTabControlDemoDataList()
5050
internal List<DemoDataModel> GetDemoDataList()
5151
{
5252
var list = new List<DemoDataModel>();
53-
for (var i = 1; i <= 20; i++)
53+
for (var i = 1; i <= 30; i++)
5454
{
5555
var dataList = new List<DemoDataModel>();
5656
for (var j = 0; j < 3; j++)

src/Shared/HandyControl_Shared/Controls/Growl/Growl.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ private static void ShowGlobal(GrowlInfo growlInfo)
356356
InitGrowlPanel(GrowlWindow.GrowlPanel);
357357
}
358358

359-
GrowlWindow.UpdatePosition(Growl.GetTransitionMode(Application.Current.MainWindow));
359+
GrowlWindow.UpdatePosition(GetTransitionMode(Application.Current.MainWindow));
360360
GrowlWindow.Show(true);
361361

362362
var ctl = new Growl
@@ -1057,7 +1057,7 @@ TransitionMode.Top2Bottom or
10571057
TransitionMode.Custom)
10581058
{
10591059
return null;
1060-
}
1060+
}
10611061

10621062
var animation = AnimationHelper.CreateAnimation(isClose ? 0 : 1);
10631063
animation.From = isClose ? 1 : 0;

src/WpfApp1/App.xaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<Application x:Class="WpfApp1.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:local="clr-namespace:WpfApp1"
5+
xmlns:hc="https://handyorg.github.io/handycontrol"
6+
StartupUri="MainWindow.xaml">
7+
<Application.Resources>
8+
<hc:Theme SyncWithSystem="True" />
9+
</Application.Resources>
10+
</Application>

src/WpfApp1/App.xaml.cs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System.Configuration;
2+
using System.Data;
3+
using System.Windows;
4+
using System.Windows.Media;
5+
6+
namespace WpfApp1;
7+
8+
/// <summary>
9+
/// Interaction logic for App.xaml
10+
/// </summary>
11+
public partial class App : Application
12+
{
13+
protected override void OnStartup(StartupEventArgs e)
14+
{
15+
var prepWindow = new Window
16+
{
17+
Width = 0,
18+
Height = 0,
19+
WindowStyle = WindowStyle.None,
20+
ShowInTaskbar = false,
21+
Background = Brushes.Black
22+
};
23+
prepWindow.Show();
24+
prepWindow.Hide(); // 此时渲染管线已完成初始化
25+
26+
base.OnStartup(e);
27+
}
28+
}

src/WpfApp1/AssemblyInfo.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System.Windows;
2+
3+
[assembly: ThemeInfo(
4+
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
5+
//(used if a resource is not found in the page,
6+
// or application resource dictionaries)
7+
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
8+
//(used if a resource is not found in the page,
9+
// app, or any theme specific resource dictionaries)
10+
)]

src/WpfApp1/MainWindow.xaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Window x:Class="WpfApp1.MainWindow"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:hc="https://handyorg.github.io/handycontrol"
7+
mc:Ignorable="d"
8+
Title="MainWindow" Height="450" Width="800">
9+
<StackPanel>
10+
<Button Click="ButtonBase_OnClick" Content="Open sub Window"/>
11+
</StackPanel>
12+
</Window>

src/WpfApp1/MainWindow.xaml.cs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System.Text;
2+
using System.Windows;
3+
using System.Windows.Controls;
4+
using System.Windows.Data;
5+
using System.Windows.Documents;
6+
using System.Windows.Input;
7+
using System.Windows.Media;
8+
using System.Windows.Media.Imaging;
9+
using System.Windows.Navigation;
10+
using System.Windows.Shapes;
11+
12+
namespace WpfApp1;
13+
14+
/// <summary>
15+
/// Interaction logic for MainWindow.xaml
16+
/// </summary>
17+
public partial class MainWindow : Window
18+
{
19+
public MainWindow()
20+
{
21+
InitializeComponent();
22+
}
23+
24+
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
25+
{
26+
new Window1().Show();
27+
}
28+
}

src/WpfApp1/Window1.xaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Window x:Class="WpfApp1.Window1"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6+
xmlns:local="clr-namespace:WpfApp1"
7+
mc:Ignorable="d"
8+
Title="Window1"
9+
Height="450"
10+
Width="800">
11+
<Grid>
12+
<Button Click="ButtonBase_OnClick" Content="Open sub Window1"/>
13+
</Grid>
14+
</Window>
15+

0 commit comments

Comments
 (0)