다음을 통해 공유


Application 클래스

정의

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

public ref class Application : Microsoft::Maui::Controls::Element, Microsoft::Maui::Controls::IApplicationController, Microsoft::Maui::Controls::IElementConfiguration<Microsoft::Maui::Controls::Application ^>, Microsoft::Maui::IApplication, Microsoft::Maui::IVisualTreeElement
public class Application : Microsoft.Maui.Controls.Element, Microsoft.Maui.Controls.IApplicationController, Microsoft.Maui.Controls.IElementConfiguration<Microsoft.Maui.Controls.Application>, Microsoft.Maui.IApplication, Microsoft.Maui.IVisualTreeElement
type Application = class
    inherit Element
    interface IApplicationController
    interface IElementConfiguration<Application>
    interface IVisualTreeElement
    interface IApplication
    interface IElement
Public Class Application
Inherits Element
Implements IApplication, IApplicationController, IElementConfiguration(Of Application), IVisualTreeElement
상속
구현

설명

클래스는 Application Microsoft.Maui.Controls 애플리케이션의 핵심입니다. 애플리케이션의 루트 페이지를 설정하고, 사전에서 애플리케이션 Properties 호출에서 기본 형식 데이터를 유지하며, 모달 뷰의 푸시 및 팝에 응답하는 이벤트를 제공합니다. Visual Studio는 새 Microsoft.Maui.Controls 솔루션의 적절한 프로젝트에서 개발자를 위해 이 클래스를 만듭니다.

Mac용 Visual Studio Visual Studio는 개발자가 새 Microsoft.Maui.Controls 솔루션을 만들 때 애플리케이션에 대한 XAML 및 코드 숨김 파일을 만듭니다. 다음 예제에서는 리소스 사전에 항목이 있는 일반적인 Application 클래스를 보여줍니다.

<Application xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="App1.App">
<Application.Resources>
<Color x:Key="ButtonBackgroundColor">Red</Color>
</Application.Resources>
</Application>
public partial class App : Application
{
    public App()
    {
        InitializeComponent();

        MainPage = new MainPage();
    }

    protected override void OnStart()
    {
        // Handle when your app starts
    }

    protected override void OnSleep()
    {
        // Handle when your app sleeps
    }

    protected override void OnResume()
    {
        // Handle when your app resumes
    }
}

생성자

Application()

Application 인스턴스를 초기화합니다.

필드

ControlsApplicationMapper
사용되지 않음.

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

속성

AccentColor

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

AppLinks

개발자가 애플리케이션 링크를 등록하거나 등록을 취소하는 데 사용할 개체를 가져옵니다.

AutomationId

자동화 프레임워크가 이 요소를 찾고 상호 작용할 수 있는 값을 가져오거나 설정합니다.

(다음에서 상속됨 Element)
BindingContext

BindableObject에 속하는 바인딩된 속성의 대상이 되는 속성을 포함하는 개체를 가져오거나 설정합니다. 이는 바인딩 가능 속성입니다.

(다음에서 상속됨 BindableObject)
ClassId

의미상 유사한 요소의 컬렉션을 식별하는 데 사용되는 값을 가져오거나 설정합니다.

(다음에서 상속됨 Element)
Current

현재 애플리케이션을 가져옵니다.

Dispatcher

이 바인딩 가능한 개체를 만들 때 사용할 수 있었던 디스패처를 가져오고, 그렇지 않으면 사용 가능한 가장 가까운 디스패처(아마도 창/앱)를 찾으려고 시도합니다.

(다음에서 상속됨 BindableObject)
EffectControlProvider

.NET MAUI에서 내부 사용.

(다음에서 상속됨 Element)
Effects

런타임 중에 요소에 적용할 스타일 및 속성을 가져오거나 설정합니다.

(다음에서 상속됨 Element)
Handler

이 요소에 대한 연결된 처리기를 가져오거나 설정합니다.

(다음에서 상속됨 Element)
Id

애플리케이션을 실행하는 동안 요소를 고유하게 식별하는 데 사용할 수 있는 값을 가져옵니다.

(다음에서 상속됨 Element)
LogicalChildren
사용되지 않음.

Microsoft.Maui.Controls 플랫폼의 내부 사용.

(다음에서 상속됨 Element)
MainPage

애플리케이션의 루트 페이지를 가져오거나 설정합니다.

NavigationProxy

Microsoft.Maui.Controls 플랫폼의 내부 사용.

Parent

이 요소의 부모를 Element 가져오거나 설정합니다.

(다음에서 상속됨 Element)
PlatformAppTheme

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

Properties
사용되지 않음.

Application 개체에 대한 영구 속성의 사전을 가져옵니다.

RealParent

.NET MAUI에서 내부 사용.

(다음에서 상속됨 Element)
RequestedTheme

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

Resources

Application 개체에 대한 리소스 사전을 가져오거나 설정합니다.

StyleId

요소를 고유하게 식별하는 사용자 정의 값을 가져오거나 설정합니다.

(다음에서 상속됨 Element)
UserAppTheme

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

Windows

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

메서드

AddLogicalChild(Element)

Element 논리 자식에 를 추가합니다.

(다음에서 상속됨 Element)
ApplyBindings()

모든 현재 바인딩을 에 BindingContext적용합니다.

(다음에서 상속됨 BindableObject)
CleanUp()

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

ClearLogicalChildren()

모든 자식 Element을 제거합니다.

(다음에서 상속됨 Element)
ClearValue(BindableProperty)

이전에 바인딩 가능한 속성에 대해 설정된 값을 지웁니다.

(다음에서 상속됨 BindableObject)
ClearValue(BindablePropertyKey)

키로 식별된 바인딩 가능한 속성에 대해 이전에 설정된 값을 지웁니다.

(다음에서 상속됨 BindableObject)
CloseWindow(Window)

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

CoerceValue(BindableProperty)

지정된 바인딩 가능한 속성의 값을 강제 변환합니다. 이 작업은 지정된 바인딩 가능한 속성을 호출하여 BindableProperty.CoerceValueDelegate 수행됩니다.

(다음에서 상속됨 BindableObject)
CoerceValue(BindablePropertyKey)

지정된 바인딩 가능한 속성의 값을 강제 변환합니다. 이 작업은 지정된 바인딩 가능한 속성을 호출하여 BindableProperty.CoerceValueDelegate 수행됩니다.

(다음에서 상속됨 BindableObject)
CreateWindow(IActivationState)

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

EffectIsAttached(String)

.NET MAUI에서 내부 사용.

(다음에서 상속됨 Element)
FindByName(String)

지정된 이름을 갖는 요소를 반환합니다.

(다음에서 상속됨 Element)
GetValue(BindableProperty)

지정된 바인딩 가능한 속성에 포함된 값을 반환합니다.

(다음에서 상속됨 BindableObject)
InsertLogicalChild(Int32, Element)

지정된 인덱스의 Element 논리 자식에 를 삽입합니다.

(다음에서 상속됨 Element)
IsSet(BindableProperty)

바인딩 가능한 속성이 있고 값 집합이 있는지 여부를 결정합니다.

(다음에서 상속됨 BindableObject)
On<T>()

플랫폼별 메서드를 호출할 수 있는 이 TElement의 플랫폼별 인스턴스를 반환합니다.

OnAppLinkRequestReceived(Uri)

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

OnBindingContextChanged()

요소의 바인딩 컨텍스트가 변경될 때마다 호출됩니다. 이 이벤트에 대한 클래스 처리를 추가하려면 이 메서드를 구현합니다.

(다음에서 상속됨 Element)
OnChildAdded(Element)

ChildAdded 이벤트를 발생시킵니다. 이 이벤트에 대한 클래스 처리를 추가하려면 이 메서드를 구현합니다.

(다음에서 상속됨 Element)
OnChildRemoved(Element, Int32)

ChildRemoved 이벤트를 발생시킵니다. 이 이벤트에 대한 클래스 처리를 추가하려면 이 메서드를 구현합니다.

(다음에서 상속됨 Element)
OnHandlerChanged()

파생 클래스에서 재정의되는 경우 는 이벤트를 발생 HandlerChanged 시켜야 합니다.

(다음에서 상속됨 Element)
OnHandlerChanging(HandlerChangingEventArgs)

파생 클래스에서 재정의되는 경우 는 이벤트를 발생 HandlerChanging 시켜야 합니다.

(다음에서 상속됨 Element)
OnParentChanged()

파생 클래스에서 재정의되는 경우 는 이벤트를 발생 ParentChanged 시켜야 합니다.

(다음에서 상속됨 Element)
OnParentChanging(ParentChangingEventArgs)

파생 클래스에서 재정의되는 경우 는 이벤트를 발생 ParentChanging 시켜야 합니다.

(다음에서 상속됨 Element)
OnParentSet()

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

OnPropertyChanged(String)

바인딩된 속성이 변경될 때 호출되는 메서드입니다.

(다음에서 상속됨 Element)
OnPropertyChanging(String)

PropertyChanging 이벤트를 발생시킵니다.

(다음에서 상속됨 BindableObject)
OnResume()

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

OnSleep()

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

OnStart()

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

OpenWindow(Window)

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

Quit()

애플리케이션을 끝냅니다.

RemoveBinding(BindableProperty)

바인딩 가능한 속성에서 이전에 설정된 바인딩을 제거합니다.

(다음에서 상속됨 BindableObject)
RemoveDynamicResource(BindableProperty)

이전에 설정된 동적 리소스를 제거합니다.

(다음에서 상속됨 Element)
RemoveLogicalChild(Element)

논리적 자식에서 특정 Element 항목의 첫 번째 항목을 제거합니다.

(다음에서 상속됨 Element)
SavePropertiesAsync()
사용되지 않음.

애플리케이션 개체에 대한 Properties 사전을 비동기적으로 지속합니다.

SendOnAppLinkRequestReceived(Uri)

Microsoft.Maui.Controls 플랫폼의 내부 사용.

SetAppIndexingProvider(IAppIndexingProvider)

Microsoft.Maui.Controls 플랫폼의 내부 사용.

SetBinding(BindableProperty, BindingBase)

바인딩 가능한 속성에 바인딩을 할당합니다.

(다음에서 상속됨 BindableObject)
SetCurrentApplication(Application)

Microsoft.Maui.Controls 플랫폼의 내부 사용.

SetDynamicResource(BindableProperty, String)

제공된 키를 사용하여 BindableProperty DynamicResource를 통해 업데이트할 이 요소의 속성을 설정합니다.

(다음에서 상속됨 Element)
SetValue(BindableProperty, Object)

지정된 바인딩 가능한 속성의 값을 설정합니다.

(다음에서 상속됨 BindableObject)
SetValue(BindablePropertyKey, Object)

지정된 바인딩 가능한 속성의 값을 설정합니다.

(다음에서 상속됨 BindableObject)
SetValueCore(BindableProperty, Object, SetValueFlags)

Microsoft.Maui.Controls 플랫폼의 내부 사용.

(다음에서 상속됨 BindableObject)
SetValueFromRenderer(BindableProperty, Object)

.NET MAUI에서 내부 사용.

(다음에서 상속됨 Element)
SetValueFromRenderer(BindablePropertyKey, Object)

.NET MAUI에서 내부 사용.

(다음에서 상속됨 Element)
UnapplyBindings()

현재 컨텍스트에서 모든 현재 바인딩을 제거합니다.

(다음에서 상속됨 BindableObject)

이벤트

BindingContextChanged

BindingContext 속성 값이 변경되면 발생합니다.

(다음에서 상속됨 BindableObject)
ChildAdded

자식 요소가 요소에 추가될 때마다 발생합니다.

(다음에서 상속됨 Element)
ChildRemoved

자식 요소가 요소에서 제거될 때마다 발생합니다.

(다음에서 상속됨 Element)
DescendantAdded

자식 요소가 요소의 하위 트리에 추가될 때마다 발생합니다.

(다음에서 상속됨 Element)
DescendantRemoved

자식 요소가 요소 하위 트리에서 제거될 때마다 발생합니다.

(다음에서 상속됨 Element)
HandlerChanged

요소의 처리기가 변경될 때마다 발생합니다.

(다음에서 상속됨 Element)
HandlerChanging

요소의 처리기가 변경되기 시작할 때마다 발생합니다.

(다음에서 상속됨 Element)
ModalPopped

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

ModalPopping

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

ModalPushed

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

ModalPushing

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

PageAppearing

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

PageDisappearing

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

ParentChanged

요소의 부모가 변경될 때마다 발생합니다.

(다음에서 상속됨 Element)
ParentChanging

요소의 변경이 시작될 때마다 발생합니다.

(다음에서 상속됨 Element)
PropertyChanged

속성 값이 변경될 때 발생합니다.

(다음에서 상속됨 BindableObject)
PropertyChanging

속성 값이 변경될 때 발생합니다.

(다음에서 상속됨 BindableObject)
RequestedThemeChanged

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

명시적 인터페이스 구현

IApplication.CloseWindow(IWindow)

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

IApplication.CreateWindow(IActivationState)

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

IApplication.OpenWindow(IWindow)

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

IApplication.ThemeChanged()

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

IApplication.Windows

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

IContextFlyoutElement.ContextFlyout

보기에 ContextFlyout 대한 를 가져옵니다. 메뉴 플라이아웃, 메뉴 플라이아웃 하위 항목 및 메뉴 플라이아웃 구분 기호를 컨텍스트 플라이아웃에 추가할 수 있습니다.

(다음에서 상속됨 Element)
IDynamicResourceHandler.SetDynamicResource(BindableProperty, String)

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

(다음에서 상속됨 BindableObject)
IEffectControlProvider.RegisterEffect(Effect)

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

(다음에서 상속됨 Element)
IElement.Parent

요소의 부모를 가져옵니다.

(다음에서 상속됨 Element)
IElementController.Descendants()

.NET MAUI에서 내부 사용.

(다음에서 상속됨 Element)
IElementController.LogicalChildren

.NET MAUI에서 내부 사용.

(다음에서 상속됨 Element)
IElementController.SetValueFromRenderer(BindableProperty, Object)

.NET MAUI에서 내부 사용.

(다음에서 상속됨 Element)
INameScope.RegisterName(String, Object)

.NET MAUI에서 내부 사용.

(다음에서 상속됨 Element)
INameScope.UnregisterName(String)

.NET MAUI에서 내부 사용.

(다음에서 상속됨 Element)
IToolTipElement.ToolTip

사용자가 뷰에 포인터를 놓을 때 보기의 용도에 대한 간략한 설명을 표시하는 작은 사각형 팝업 창을 나타냅니다.

(다음에서 상속됨 Element)
IVisualTreeElement.GetVisualChildren()

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

IVisualTreeElement.GetVisualParent()

요소의 시각적 부모를 가져옵니다.

(다음에서 상속됨 Element)

확장 메서드

GetPropertyIfSet<T>(BindableObject, BindableProperty, T)

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

SetAppTheme<T>(BindableObject, BindableProperty, T, T)

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

SetAppThemeColor(BindableObject, BindableProperty, Color, Color)

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

SetBinding(BindableObject, BindableProperty, String, BindingMode, IValueConverter, String)

속성에 바인딩을 만들고 적용합니다.

FindByName<T>(Element, String)

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

ToHandler(IElement, IMauiContext)

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

ToPlatform(IElement, IMauiContext)

플랫폼 간 모바일 애플리케이션을 나타내는 클래스입니다.

GetVisualElementWindow(IVisualTreeElement)

요소가 1 내에 포함된 경우 Visual Tree 요소가 포함된 Window를 가져옵니다.

GetVisualTreeDescendants(IVisualTreeElement)

하위 항목의 전체 계층을 지정된 Visual Tree 요소의 자식 목록으로 가져옵니다.

GetVisualTreeElements(IVisualTreeElement, Point)

지정된 지점을 기반으로 Visual Tree 요소의 자식 목록을 가져옵니다.

GetVisualTreeElements(IVisualTreeElement, Rect)

사각형을 기반으로 하는 시각적 트리 요소 자식 목록을 가져옵니다.

GetVisualTreeElements(IVisualTreeElement, Double, Double)

지정된 x, y 점을 기반으로 하는 시각적 트리 요소 자식 목록을 가져옵니다.

GetVisualTreeElements(IVisualTreeElement, Double, Double, Double, Double)

픽셀이 아닌 플랫폼 단위로 지정된 좌표로 정의된 사각형을 기반으로 하는 Visual Tree Elements 자식 목록을 가져옵니다.

적용 대상