更新整理
This commit is contained in:
@@ -3,10 +3,11 @@
|
||||
|
||||
/* TODO: Refactor as popup, detach from the window renderer */
|
||||
|
||||
using WPFluent.Input;
|
||||
|
||||
using System.Windows.Controls;
|
||||
|
||||
using WPFluent.Input;
|
||||
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace WPFluent.Controls;
|
||||
@@ -156,7 +157,7 @@ public class Snackbar : ContentControl, IAppearanceControl, IIconControl
|
||||
/// <summary>
|
||||
/// Hides the <see cref="Snackbar"/>
|
||||
/// </summary>
|
||||
protected virtual void Hide() { _ = Presenter.HideCurrent(); }
|
||||
protected virtual void Hide() { Presenter.HideCurrent(); }
|
||||
|
||||
/// <summary>
|
||||
/// This virtual method is called when <see cref="Snackbar"/> is closing and it raises the <see cref="Closed"/> <see
|
||||
@@ -168,7 +169,7 @@ public class Snackbar : ContentControl, IAppearanceControl, IIconControl
|
||||
{
|
||||
bool newValue = (bool)e.NewValue;
|
||||
|
||||
if(newValue)
|
||||
if (newValue)
|
||||
{
|
||||
OnOpened();
|
||||
}
|
||||
@@ -196,9 +197,9 @@ public class Snackbar : ContentControl, IAppearanceControl, IIconControl
|
||||
/// </summary>
|
||||
public virtual void Show(bool immediately)
|
||||
{
|
||||
if(immediately)
|
||||
if (immediately)
|
||||
{
|
||||
_ = Presenter.ImmediatelyDisplay(this);
|
||||
Presenter.ImmediatelyDisplay(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -216,7 +217,7 @@ public class Snackbar : ContentControl, IAppearanceControl, IIconControl
|
||||
/// </summary>
|
||||
public virtual async Task ShowAsync(bool immediately)
|
||||
{
|
||||
if(immediately)
|
||||
if (immediately)
|
||||
{
|
||||
await Presenter.ImmediatelyDisplay(this);
|
||||
}
|
||||
@@ -279,7 +280,7 @@ public class Snackbar : ContentControl, IAppearanceControl, IIconControl
|
||||
/// <summary>
|
||||
/// Gets the command triggered after clicking the button in the template.
|
||||
/// </summary>
|
||||
public IRelayCommand TemplateButtonCommand => (IRelayCommand)GetValue(TemplateButtonCommandProperty);
|
||||
internal IRelayCommand TemplateButtonCommand => (IRelayCommand)GetValue(TemplateButtonCommandProperty);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a time for which the <see cref="Snackbar"/> should be visible.
|
||||
|
||||
Reference in New Issue
Block a user