-
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
120f12c
commit 2a6d561
Showing
19 changed files
with
560 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
SourceCode/SharedResources/Panuon.WPF.UI.Internal/Styles/ToastStyle.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:Panuon.WPF.UI" | ||
xmlns:core="clr-namespace:Panuon.WPF;assembly=Panuon.WPF" | ||
xmlns:i="clr-namespace:Panuon.WPF.UI.Internal" | ||
xmlns:rs="clr-namespace:Panuon.WPF.UI.Resources" | ||
xmlns:irs="clr-namespace:Panuon.WPF.UI.Internal.Resources"> | ||
<ResourceDictionary.MergedDictionaries> | ||
<core:SharedResourceDictionary Source="pack://application:,,,/Panuon.WPF.UI;component/Styles/LabelStyle.xaml" /> | ||
</ResourceDictionary.MergedDictionaries> | ||
|
||
<Style x:Key="{ComponentResourceKey ResourceId=LabelStyleKey, TypeInTargetAssembly={x:Type local:Toast}}" | ||
TargetType="Label" | ||
BasedOn="{StaticResource {x:Static rs:StyleKeys.LabelStyle}}"> | ||
<Setter Property="local:IconHelper.FontFamily" | ||
Value="{Binding IconFontFamily, Source={x:Static local:GlobalSettings.Setting}}" /> | ||
<Setter Property="local:IconHelper.FontSize" | ||
Value="{Binding IconFontSize, Source={x:Static local:GlobalSettings.Setting}}" /> | ||
<Setter Property="local:ShadowHelper.BlurRadius" | ||
Value="25" /> | ||
<Setter Property="FontFamily" | ||
Value="{Binding FontFamily, Source={x:Static local:GlobalSettings.Setting}}" /> | ||
<Setter Property="FontSize" | ||
Value="{Binding FontSize, Source={x:Static local:GlobalSettings.Setting}}" /> | ||
<Setter Property="MaxWidth" | ||
Value="350" /> | ||
<Setter Property="VerticalContentAlignment" | ||
Value="Stretch" /> | ||
<Setter Property="HorizontalContentAlignment" | ||
Value="Stretch" /> | ||
<Setter Property="Padding" | ||
Value="15,7" /> | ||
<Setter Property="Background" | ||
Value="Black" /> | ||
<Setter Property="Foreground" | ||
Value="White" /> | ||
<Setter Property="local:LabelHelper.CornerRadius" | ||
Value="2" /> | ||
<Setter Property="local:LabelHelper.ShadowColor" | ||
Value="Gray" /> | ||
</Style> | ||
|
||
</ResourceDictionary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
SourceCode/SharedResources/Panuon.WPF.UI/Configurations/ToastSetting.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
using System; | ||
using System.Windows; | ||
|
||
namespace Panuon.WPF.UI.Configurations | ||
{ | ||
public class ToastSetting | ||
: DependencyObject | ||
{ | ||
#region Ctor | ||
public ToastSetting() | ||
{ | ||
LabelStyle = (Style)Application.Current.FindResource(Toast.LabelStyleKey); | ||
} | ||
#endregion | ||
|
||
#region Properties | ||
|
||
#region LabelStyle | ||
public Style LabelStyle | ||
{ | ||
get { return (Style)GetValue(LabelStyleProperty); } | ||
set { SetValue(LabelStyleProperty, value); } | ||
} | ||
|
||
public static readonly DependencyProperty LabelStyleProperty = | ||
DependencyProperty.Register("LabelStyle", typeof(Style), typeof(ToastSetting)); | ||
#endregion | ||
|
||
#region DefaultPosition | ||
public ToastPosition DefaultPosition | ||
{ | ||
get { return (ToastPosition)GetValue(DefaultPositionProperty); } | ||
set { SetValue(DefaultPositionProperty, value); } | ||
} | ||
|
||
public static readonly DependencyProperty DefaultPositionProperty = | ||
DependencyProperty.Register("DefaultPosition", typeof(ToastPosition), typeof(ToastSetting), new PropertyMetadata(ToastPosition.Bottom)); | ||
#endregion | ||
|
||
#region Spacing | ||
public double Spacing | ||
{ | ||
get { return (double)GetValue(SpacingProperty); } | ||
set { SetValue(SpacingProperty, value); } | ||
} | ||
|
||
public static readonly DependencyProperty SpacingProperty = | ||
DependencyProperty.Register("Spacing", typeof(double), typeof(ToastSetting), new PropertyMetadata(20d)); | ||
#endregion | ||
|
||
#region AnimationDuration | ||
public TimeSpan AnimationDuration | ||
{ | ||
get { return (TimeSpan)GetValue(AnimationDurationProperty); } | ||
set { SetValue(AnimationDurationProperty, value); } | ||
} | ||
|
||
public static readonly DependencyProperty AnimationDurationProperty = | ||
DependencyProperty.Register("AnimationDuration", typeof(TimeSpan), typeof(ToastSetting), new PropertyMetadata(TimeSpan.FromSeconds(0.5))); | ||
#endregion | ||
|
||
#region AnimationEasing | ||
public AnimationEasing AnimationEasing | ||
{ | ||
get { return (AnimationEasing)GetValue(AnimationEasingProperty); } | ||
set { SetValue(AnimationEasingProperty, value); } | ||
} | ||
|
||
public static readonly DependencyProperty AnimationEasingProperty = | ||
DependencyProperty.Register("AnimationEasing", typeof(AnimationEasing), typeof(ToastSetting), new PropertyMetadata(AnimationEasing.CircleOut)); | ||
#endregion | ||
|
||
#endregion | ||
|
||
} | ||
} |
Oops, something went wrong.