Class App
- Namespace
- McServerLauncher
- Assembly
- McServerLauncher.dll
public class App : Application, INotifyPropertyChanged, IDataContextProvider, IGlobalDataTemplates, IDataTemplateHost, IGlobalStyles, IStyleHost, IThemeVariantHost, IResourceHost, IResourceNode, IApplicationPlatformEvents, IOptionalFeatureProvider
- Inheritance
-
AvaloniaObjectApplicationApp
- Implements
-
IDataContextProviderIGlobalDataTemplatesIDataTemplateHostIGlobalStylesIStyleHostIThemeVariantHostIResourceHostIResourceNodeIApplicationPlatformEventsIOptionalFeatureProvider
- Inherited Members
-
Application.DataContextPropertyApplication.ActualThemeVariantPropertyApplication.RequestedThemeVariantPropertyApplication.NamePropertyApplication.RegisterServices()Application.OnPropertyChanged(AvaloniaPropertyChangedEventArgs)Application.DataContextApplication.RequestedThemeVariantApplication.ActualThemeVariantApplication.CurrentApplication.DataTemplatesApplication.ResourcesApplication.StylesApplication.ApplicationLifetimeApplication.PlatformSettingsApplication.NameApplication.ResourcesChangedApplication.UrlsOpenedApplication.ActualThemeVariantChangedAvaloniaObject.CheckAccess()AvaloniaObject.VerifyAccess()AvaloniaObject.ClearValue(AvaloniaProperty)AvaloniaObject.ClearValue<T>(AvaloniaProperty<T>)AvaloniaObject.ClearValue<T>(StyledProperty<T>)AvaloniaObject.ClearValue<T>(DirectPropertyBase<T>)AvaloniaObject.GetHashCode()AvaloniaObject.GetValue(AvaloniaProperty)AvaloniaObject.GetValue<T>(StyledProperty<T>)AvaloniaObject.GetValue<T>(DirectPropertyBase<T>)AvaloniaObject.GetBaseValue<T>(StyledProperty<T>)AvaloniaObject.IsAnimating(AvaloniaProperty)AvaloniaObject.IsSet(AvaloniaProperty)AvaloniaObject.SetValue<T>(StyledProperty<T>, T, BindingPriority)AvaloniaObject.SetValue<T>(DirectPropertyBase<T>, T)AvaloniaObject.SetCurrentValue<T>(StyledProperty<T>, T)AvaloniaObject.Bind(AvaloniaProperty, IBinding)AvaloniaObject.CoerceValue(AvaloniaProperty)AvaloniaObject.OnPropertyChangedCore(AvaloniaPropertyChangedEventArgs)AvaloniaObject.RaisePropertyChanged<T>(DirectPropertyBase<T>, T, T)AvaloniaObject.SetAndRaise<T>(DirectPropertyBase<T>, ref T, T)AvaloniaObject.InheritanceParentAvaloniaObject.this[AvaloniaProperty]AvaloniaObject.this[IndexerDescriptor]AvaloniaObject.PropertyChanged
Properties
TrayAvailable
True once the tray icon exists. MainWindow only hides itself on minimize when this holds: without a tray there would be no way to bring the window back.
public static bool TrayAvailable { get; }
Property Value
Methods
Initialize()
Initializes the application by loading XAML etc.
public override void Initialize()
OnFrameworkInitializationCompleted()
public override void OnFrameworkInitializationCompleted()
RestoreMainWindow(IClassicDesktopStyleApplicationLifetime?)
Brings the main window back from the tray (or from behind other windows).
public static void RestoreMainWindow(IClassicDesktopStyleApplicationLifetime? desktop = null)
Parameters
desktopIClassicDesktopStyleApplicationLifetime
Remarks
The Topmost flick is not decoration. Windows refuses SetForegroundWindow to a process that isn't already in front, so when the request comes from a second launch of the app (see SingleInstance) a plain Activate() only flashes the taskbar button. Briefly making the window topmost puts it in front for real; it is put back immediately so the window doesn't end up permanently hovering over everything else.