优化更新代码,添加界面功能并整合
This commit is contained in:
12
WPFluent/Controls/LoadingScreen/LoadingScreen.cs
Normal file
12
WPFluent/Controls/LoadingScreen/LoadingScreen.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace WPFluent.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// Prestyled loading screen with <see cref="ProgressRing"/>.
|
||||
/// </summary>
|
||||
public class LoadingScreen : System.Windows.Controls.ContentControl
|
||||
{
|
||||
}
|
||||
43
WPFluent/Controls/LoadingScreen/LoadingScreen.xaml
Normal file
43
WPFluent/Controls/LoadingScreen/LoadingScreen.xaml
Normal file
@@ -0,0 +1,43 @@
|
||||
<!--
|
||||
This Source Code Form is subject to the terms of the MIT License.
|
||||
If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
|
||||
Copyright (C) Leszek Pomianowski and WPF UI Contributors.
|
||||
All Rights Reserved.
|
||||
-->
|
||||
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:WPFluent.Controls">
|
||||
|
||||
<Style TargetType="{x:Type controls:LoadingScreen}">
|
||||
<Setter Property="Background" Value="{DynamicResource LoadingScreenForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource LoadingScreenBackground}" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type controls:LoadingScreen}">
|
||||
<Grid
|
||||
Width="{TemplateBinding Width}"
|
||||
Height="{TemplateBinding Height}"
|
||||
Background="{TemplateBinding Background}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Grid.Column="0" VerticalAlignment="Center">
|
||||
<controls:ProgressRing IsIndeterminate="True" />
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" VerticalAlignment="Center">
|
||||
<ContentPresenter />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user