Table of Contents

Class App

Namespace
McServerLauncher
Assembly
McServerLauncher.dll
public class App : Application, INotifyPropertyChanged, IDataContextProvider, IGlobalDataTemplates, IDataTemplateHost, IGlobalStyles, IStyleHost, IThemeVariantHost, IResourceHost, IResourceNode, IApplicationPlatformEvents, IOptionalFeatureProvider
Inheritance
AvaloniaObject
Application
App
Implements
IDataContextProvider
IGlobalDataTemplates
IDataTemplateHost
IGlobalStyles
IStyleHost
IThemeVariantHost
IResourceHost
IResourceNode
IApplicationPlatformEvents
IOptionalFeatureProvider
Inherited Members
Application.DataContextProperty
Application.ActualThemeVariantProperty
Application.RequestedThemeVariantProperty
Application.NameProperty
Application.RegisterServices()
Application.OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Application.DataContext
Application.RequestedThemeVariant
Application.ActualThemeVariant
Application.Current
Application.DataTemplates
Application.Resources
Application.Styles
Application.ApplicationLifetime
Application.PlatformSettings
Application.Name
Application.ResourcesChanged
Application.UrlsOpened
Application.ActualThemeVariantChanged
AvaloniaObject.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.InheritanceParent
AvaloniaObject.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

bool

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

desktop IClassicDesktopStyleApplicationLifetime

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.