Nu fungerar splash, men måste se vidare på övrig sidhantering
This commit is contained in:
@ -6,7 +6,19 @@ public class SplashViewModel : ViewModelBase
|
||||
{
|
||||
// public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
private bool _isSplashVisible = true;
|
||||
private Color _splashBackgroundColor = Colors.DarkSlateBlue;
|
||||
public Color SplashBackgroundColor
|
||||
{
|
||||
get => _splashBackgroundColor;
|
||||
set
|
||||
{
|
||||
_splashBackgroundColor = value;
|
||||
RaisePropertyChanged(nameof(SplashBackgroundColor));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private bool _isSplashVisible = false;
|
||||
public bool IsSplashVisible
|
||||
{
|
||||
get => _isSplashVisible;
|
||||
@ -28,6 +40,19 @@ public class SplashViewModel : ViewModelBase
|
||||
}
|
||||
}
|
||||
|
||||
private Color _splashTextColor = Colors.White;
|
||||
|
||||
public Color SplashTextColor
|
||||
{
|
||||
get { return _splashTextColor; }
|
||||
set
|
||||
{
|
||||
_splashTextColor = value;
|
||||
RaisePropertyChanged(nameof(SplashTextColor));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private double _splashTranslationY = 0;
|
||||
public double SplashTranslationY
|
||||
{
|
||||
@ -46,19 +71,32 @@ public class SplashViewModel : ViewModelBase
|
||||
IsSplashVisible = false;
|
||||
}
|
||||
|
||||
public string SplashText { get; set; } = "Välkommen!";
|
||||
public Color SplashBackgroundColor { get; set; } = Colors.DarkSlateBlue;
|
||||
public string SplashImage { get; set; } = "splash_icon.png";
|
||||
private string _splashText = "Välkommen!";
|
||||
public string SplashText
|
||||
{
|
||||
get => _splashText;
|
||||
set
|
||||
{
|
||||
_splashText = value;
|
||||
RaisePropertyChanged(nameof(SplashText));
|
||||
}
|
||||
}
|
||||
|
||||
//public Color SplashBackgroundColor { get; set; } = Colors.DarkSlateBlue;
|
||||
//public string SplashImage { get; set; } = "splash_icon.png";
|
||||
|
||||
//protected void OnPropertyChanged(string name) =>
|
||||
// PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
|
||||
|
||||
|
||||
|
||||
|
||||
private async Task AnimateSplashOut()
|
||||
{
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
SplashOpacity -= 0.1;
|
||||
SplashTranslationY += 5;
|
||||
//SplashTranslationY += 5;
|
||||
await Task.Delay(30);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user