<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WPF Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<atom:link href="https://lycos7560.com/category/c/wfp/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>생각의 흐름을 타고 다니며 만드는 블로그</description>
	<lastBuildDate>Sat, 26 Oct 2024 18:54:18 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://lycos7560.com/wp-content/uploads/2022/11/cropped-cropped-cropped-log-1-150x150-1-80x80.png</url>
	<title>WPF Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Visual studio WPF Basic Folder Structure</title>
		<link>https://lycos7560.com/c/visual-studio-wpf-basic-folder-structure/38413/</link>
					<comments>https://lycos7560.com/c/visual-studio-wpf-basic-folder-structure/38413/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Sat, 26 Oct 2024 18:54:16 +0000</pubDate>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[appsettings.json]]></category>
		<category><![CDATA[Controllers]]></category>
		<category><![CDATA[launchSettings.json]]></category>
		<category><![CDATA[MVVM]]></category>
		<category><![CDATA[Program.cs]]></category>
		<category><![CDATA[Visual studio]]></category>
		<category><![CDATA[wpf]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=38413</guid>

					<description><![CDATA[<p>Understand Files &#38; Folder Structure Visual studio의 Solution Visual Studio에서 솔루션(Solution)은 프로젝트들을 관리하고 구성하는 상위 개념이자 아키텍처(architecture) Visual studio의 Porject File launchSettings.json launchSettings.json 파일은 .NET 프로젝트에서 디버깅 설정을 관리하는 데 사용 이 파일은 프로젝트의 Properties 폴더 안에 위치해 있으며, 애플리케이션이 디버깅 모드로 실행될 때의 설정을 정의합니다. 주요 섹션 아래와 같이 값을 수정하여 디버깅 프로필에 적용할 수 있으며 웹브라우저 변경도 가능 (설치된 브라우저) Controllers Folder Controllers Folder는 ASP.NET Core MVC (모델-뷰-컨트롤러) 애플리케이션에서 매우 중요한 역할을 합니다.  이 폴더에는 주로 컨트롤러 클래스들이 위치합니다. 컨트롤러는 사용자의 요청을 처리하고, 필요한 데이터를 모델에서 가져와 뷰에 전달하는 역할을 합니다. appsettings.json appsettings.json 파일은 .NET Core 및 ASP.NET Core 애플리케이션에서 설정(configuration) 정보를 저장하는 데 사용되는 파일 이 파일은 JSON 형식으로 작성되며, 애플리케이션이 실행될 때 필요한 각종 설정 값을 포함 주요 역할 Program.cs Program.cs 파일은 .NET Core 및 ASP.NET Core 애플리케이션에서 진입점을 정의 이 파일은 애플리케이션이 시작될 때 처음 실행되는 코드를 포함하고 있으며, 주로 애플리케이션의 설정과 기본적인 실행을 담당합니다. 주요 역할</p>
<p>The post <a href="https://lycos7560.com/c/visual-studio-wpf-basic-folder-structure/38413/">Visual studio WPF Basic Folder Structure</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Understand Files &amp; Folder Structure</p>


				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-9f504600      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차 테이블						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#visual-studio의-solution" class="uagb-toc-link__trigger">Visual studio의 Solution</a><li class="uagb-toc__list"><a href="#visual-studio의-porject-file" class="uagb-toc-link__trigger">Visual studio의 Porject File</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#launchsettingsjson" class="uagb-toc-link__trigger">launchSettings.json</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#controllers-folder" class="uagb-toc-link__trigger">Controllers Folder</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#appsettingsjson" class="uagb-toc-link__trigger">appsettings.json</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#programcs" class="uagb-toc-link__trigger">Program.cs</a></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Visual studio의 Solution</h2>



<p>Visual Studio에서 솔루션(Solution)은 <strong>프로젝트들을 관리하고 구성</strong>하는 상위 개념이자 아키텍처(architecture)</p>



<ul class="wp-block-list">
<li>파일 확장자:<strong> <code>.sln</code></strong> 확장자</li>



<li>구성 요소: <strong>하나 이상의 프로젝트를 포함</strong>할 수 있으며, 각 프로젝트는 고유의 설정, 파일 및 리소스를 가짐</li>



<li>역할: <strong>프로젝트 간의 종속성을 관리</strong>하고, <strong>빌드 및 디버깅 과정을 통합</strong>하며, <strong>여러 프로젝트를 단일 단위로 관리</strong></li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="438" height="268" src="https://lycos7560.com/wp-content/uploads/2024/10/image-26.png" alt="" class="wp-image-38414" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-26.png 438w, https://lycos7560.com/wp-content/uploads/2024/10/image-26-300x184.png 300w" sizes="(max-width: 438px) 100vw, 438px" /></figure>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">Visual studio의 <strong>Porject File</strong></h2>



<ul class="wp-block-list">
<li>파일 확장자: 주로<strong> <code>.csproj</code> </strong>(C# 프로젝트) 또는<strong> <code>.vcxproj</code> </strong>(C++ 프로젝트) 확장자를 가짐.</li>



<li>구성 요소: 소스 코드 파일, 리소스 파일, 참조, 빌드 설정 등을 포함.</li>



<li>역할: 각 <strong>프로젝트의 파일과 설정을 관리</strong>하고, 빌드 및 디버깅을 위한 정보를 제공함.</li>
</ul>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="974" height="166" src="https://lycos7560.com/wp-content/uploads/2024/10/image-31.png" alt="" class="wp-image-38419" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-31.png 974w, https://lycos7560.com/wp-content/uploads/2024/10/image-31-300x51.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-31-768x131.png 768w" sizes="(max-width: 974px) 100vw, 974px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1305" height="404" src="https://lycos7560.com/wp-content/uploads/2024/10/image-27.png" alt="" class="wp-image-38415" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-27.png 1305w, https://lycos7560.com/wp-content/uploads/2024/10/image-27-300x93.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-27-768x238.png 768w" sizes="(max-width: 1305px) 100vw, 1305px" /></figure>
</div>
</div>



<pre class="EnlighterJSRAW" data-enlighter-language="xml" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;Project Sdk="Microsoft.NET.Sdk.Web"> 
  &lt;!-- 프로젝트 파일의 최상위 요소로, Microsoft.NET.Sdk.Web SDK를 사용하여 웹 애플리케이션 프로젝트를 생성 -->
  &lt;PropertyGroup>
    &lt;TargetFramework>net8.0&lt;/TargetFramework> 
    &lt;!-- 해당 프로젝트의 타겟 .NET 프레임워크 버전을 지정 -->
    &lt;Nullable>enable&lt;/Nullable> 
    &lt;!-- Nullable 참조 유형을 사용하도록 설정 -->
    &lt;ImplicitUsings>enable&lt;/ImplicitUsings>
    &lt;!-- 암시적 using 지시문을 활성화하여, 흔히 사용되는 네임스페이스를 자동으로 포함 -->
  &lt;/PropertyGroup>
  &lt;ItemGroup>
    &lt;PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" /> 
    &lt;!-- Swashbuckle.AspNetCore 패키지를 참조하여 OpenAPI(Swagger) 지원 추가 -->
	&lt;!-- Swashbuckle.AspNetCore 패키지는 ASP.NET Core 애플리케이션에 Swagger/OpenAPI 문서 생성을 위한 기능을 제공합니다. -->
	&lt;!-- Swagger는 RESTful API를 위한 인터페이스 명세서이며, 이를 통해 API를 시각화하고 테스트할 수 있는 웹 UI를 제공할 수 있습니다.-->
  &lt;/ItemGroup>
&lt;/Project>
</pre>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">launchSettings.json</h3>



<p><code>launchSettings.json</code> 파일은 <strong>.NET 프로젝트에서 디버깅 설정을 관리</strong>하는 데 사용</p>



<p>이 파일은 프로젝트의 <strong><code>Properties</code> 폴더 안에 위치</strong>해 있으며, 애플리케이션이 디버깅 모드로 실행될 때의 설정을 정의합니다.</p>



<p><strong>주요 섹션</strong></p>



<ul start="1" class="wp-block-list">
<li><strong>profiles</strong>: <br>각기 다른 디버깅 프로파일을 정의<br>예를 들어, <code>IIS Express</code>와 같은 웹 서버나, 프로젝트 자체의 실행 구성을 정의할 수 있습니다.</li>



<li><strong>environmentVariables</strong>: <br>환경 변수를 설정합니다. <br>애플리케이션이 실행될 때 사용할 특정 환경 변수 값을 정의할 수 있습니다.</li>



<li><strong>commandName</strong>: <br>애플리케이션이 실행될 때 사용할 명령을 지정합니다. <br>예를 들어, <code>Project</code>는 기본 프로젝트 실행을 의미하고, <code>IISExpress</code>는 IIS Express에서 실행을 의미합니다.</li>



<li><strong>applicationUrl</strong>: <br>애플리케이션이 실행될 때 사용할 URL을 지정합니다.</li>
</ul>



<p>아래와 같이 값을 수정하여 디버깅 프로필에 적용할 수 있으며 웹브라우저 변경도 가능 (설치된 브라우저)</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="1319" height="744" src="https://lycos7560.com/wp-content/uploads/2024/10/image-29.png" alt="" class="wp-image-38417" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-29.png 1319w, https://lycos7560.com/wp-content/uploads/2024/10/image-29-300x169.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-29-768x433.png 768w" sizes="(max-width: 1319px) 100vw, 1319px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:50%">
<figure class="wp-block-image size-full"><img decoding="async" width="941" height="409" src="https://lycos7560.com/wp-content/uploads/2024/10/image-30.png" alt="" class="wp-image-38418" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-30.png 941w, https://lycos7560.com/wp-content/uploads/2024/10/image-30-300x130.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-30-768x334.png 768w" sizes="(max-width: 941px) 100vw, 941px" /></figure>
</div>
</div>



<pre class="EnlighterJSRAW" data-enlighter-language="json" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">{
  "$schema": "http://json.schemastore.org/launchsettings.json",
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:8465",
      "sslPort": 44390
    }
  },
  "profiles": {
    "http": {
      "commandName": "Project",
      "dotnetRunMessages": true,
      "launchBrowser": true,
      "launchUrl": "swagger",
      "applicationUrl": "http://localhost:5118",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "https": {
      "commandName": "Project",
      "dotnetRunMessages": true,
      "launchBrowser": true,
      "launchUrl": "swagger",
      "applicationUrl": "https://localhost:7256;http://localhost:5118",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "launchSettings_Test": {
      "commandName": "Project",
      "dotnetRunMessages": true,
      "launchBrowser": true,
      "launchUrl": "swagger",
      "applicationUrl": "https://localhost:7256;http://localhost:5118",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "launchUrl": "swagger",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  }
}
</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Controllers Folder</h3>



<p>Controllers Folder는 ASP.NET Core <strong>MVC (모델-뷰-컨트롤러) 애플리케이션에서 매우 중요한 역할</strong>을 합니다. </p>



<p>이 폴더에는 주로 컨트롤러 클래스들이 위치합니다. 컨트롤러는 <strong>사용자의 요청을 처리하고, 필요한 데이터를 모델에서 가져와 뷰에 전달하는 역할</strong>을 합니다.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1481" height="768" src="https://lycos7560.com/wp-content/uploads/2024/10/image-33.png" alt="" class="wp-image-38421" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-33.png 1481w, https://lycos7560.com/wp-content/uploads/2024/10/image-33-300x156.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-33-768x398.png 768w" sizes="(max-width: 1481px) 100vw, 1481px" /></figure>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">appsettings.json</h3>



<p>appsettings.json 파일은 .NET Core 및 ASP.NET Core 애플리케이션에서 <strong>설정(configuration) 정보를 저장하는 데 사용</strong>되는 파일</p>



<p>이 파일은 JSON 형식으로 작성되며, 애플리케이션이 <strong>실행될 때 필요한 각종 설정 값을 포함</strong></p>



<p><strong>주요 역할</strong></p>



<ul class="wp-block-list">
<li><strong>구성 설정</strong>: 데이터베이스 연결 문자열, API 키, 애플리케이션 설정 등을 포함한 각종 설정 정보 등&#8230; 을 저장</li>



<li><strong>환경별 설정</strong>: <code>appsettings.Development.json</code>, <code>appsettings.Production.json</code> 등과 같은 환경별 설정 파일을 통해 개발, 테스트, 프로덕션 등 각 환경에 맞는 설정 값을 관리</li>



<li><strong>구성 공급자(Configuration Provider)</strong>: <code>appsettings.json</code> 파일을 통해 설정 값을 로드하고, 필요에 따라 다른 구성 공급자와 결합하여 사용</li>
</ul>



<figure class="wp-block-image size-full"><img decoding="async" width="992" height="372" src="https://lycos7560.com/wp-content/uploads/2024/10/image-34.png" alt="" class="wp-image-38422" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-34.png 992w, https://lycos7560.com/wp-content/uploads/2024/10/image-34-300x113.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-34-768x288.png 768w" sizes="(max-width: 992px) 100vw, 992px" /></figure>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Program.cs</h3>



<p><code>Program.cs</code> 파일은 .NET Core 및 ASP.NET Core 애플리케이션에서 진입점을 정의</p>



<p>이 파일은 애플리케이션이 시작될 때 처음 실행되는 코드를 포함하고 있으며, <strong>주로 애플리케이션의 설정과 기본적인 실행을 담당</strong>합니다.</p>



<p><strong>주요 역할</strong></p>



<ul class="wp-block-list">
<li><strong>메인 진입점</strong>: <br>애플리케이션 실행의 시작점을 정의합니다.</li>



<li><strong>호스트 빌드</strong>: <br>웹 애플리케이션의 웹 호스트를 구성하고 빌드합니다.</li>



<li><strong>서비스 구성</strong>: <br>종속성 주입(DI), 미들웨어, 설정 등을 포함하여 애플리케이션의 기본 설정을 구성합니다.</li>
</ul>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// 웹 애플리케이션을 생성하기 위한 빌더 객체를 생성
var builder = WebApplication.CreateBuilder(args);

// 서비스 컨테이너에 서비스 추가
// 컨트롤러 서비스를 추가하여 MVC 패턴을 지원
builder.Services.AddControllers();

// Swagger/OpenAPI 설정을 위한 서비스 추가
builder.Services.AddEndpointsApiExplorer(); // API 엔드포인트 탐색기 추가
builder.Services.AddSwaggerGen(); // Swagger 생성을 위한 서비스 추가

// 애플리케이션 빌드
var app = builder.Build();

// HTTP 요청 파이프라인 구성
if (app.Environment.IsDevelopment())
{
    // 개발 환경에서만 Swagger를 사용하도록 설정
    app.UseSwagger();
    app.UseSwaggerUI();
}

// HTTP 요청을 HTTPS로 리디렉션
app.UseHttpsRedirection();

// 권한 부여 미들웨어 사용
app.UseAuthorization();

// 컨트롤러에 대한 요청을 매핑
app.MapControllers();

// 애플리케이션 실행
app.Run();
</pre>



<figure class="wp-block-image size-full"><img decoding="async" width="1484" height="771" src="https://lycos7560.com/wp-content/uploads/2024/10/image-35.png" alt="" class="wp-image-38423" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-35.png 1484w, https://lycos7560.com/wp-content/uploads/2024/10/image-35-300x156.png 300w, https://lycos7560.com/wp-content/uploads/2024/10/image-35-768x399.png 768w" sizes="(max-width: 1484px) 100vw, 1484px" /></figure>
<p>The post <a href="https://lycos7560.com/c/visual-studio-wpf-basic-folder-structure/38413/">Visual studio WPF Basic Folder Structure</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/c/visual-studio-wpf-basic-folder-structure/38413/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Windows Presentation Foundation 개요 &#8211; 번역</title>
		<link>https://lycos7560.com/c/windows-presentation-foundation-%ea%b0%9c%ec%9a%94-%eb%b2%88%ec%97%ad/38348/</link>
					<comments>https://lycos7560.com/c/windows-presentation-foundation-%ea%b0%9c%ec%9a%94-%eb%b2%88%ec%97%ad/38348/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Sat, 05 Oct 2024 12:19:10 +0000</pubDate>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Windows Presentation Foundation]]></category>
		<category><![CDATA[Windows Presentation Foundation 개요 - 번역]]></category>
		<category><![CDATA[wpf]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=38348</guid>

					<description><![CDATA[<p>Overview 개요 https://learn.microsoft.com/en-us/dotnet/desktop/wpf/overview/?view=netdesktop-8.0 Desktop Guide (WPF .NET)(데스크톱 가이드) Welcome to the Desktop Guide for Windows Presentation Foundation (WPF), a UI framework that is resolution-independent and uses a vector-based rendering engine, built to take advantage of modern graphics hardware.(Windows Presentation Foundation (WPF) 데스크톱 가이드에 오신 것을 환영합니다. WPF는 해상도에 독립적인 UI 프레임워크로, 벡터 기반의 렌더링 엔진을 [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/c/windows-presentation-foundation-%ea%b0%9c%ec%9a%94-%eb%b2%88%ec%97%ad/38348/">Windows Presentation Foundation 개요 &#8211; 번역</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Overview 개요</h2>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p><a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/overview/?view=netdesktop-8.0" target="_blank" rel="noreferrer noopener">https://learn.microsoft.com/en-us/dotnet/desktop/wpf/overview/?view=netdesktop-8.0</a></p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Desktop Guide (WPF .NET)<br>(데스크톱 가이드)</h3>



<p>Welcome to the Desktop Guide for Windows Presentation Foundation (WPF), a UI framework that is resolution-independent and uses a vector-based rendering engine, built to take advantage of modern graphics hardware.<br>(Windows Presentation Foundation (WPF) 데스크톱 가이드에 오신 것을 환영합니다. WPF는 해상도에 독립적인 UI 프레임워크로, 벡터 기반의 렌더링 엔진을 사용하여 현대적인 그래픽 하드웨어의 성능을 활용할 수 있도록 설계되었습니다.)</p>



<p>WPF provides a comprehensive set of application-development features that include Extensible Application Markup Language (XAML), controls, data binding, layout, 2D and 3D graphics, animation, styles, templates, documents, media, text, and typography.<br>(WPF는 Extensible Application Markup Language (XAML), 컨트롤, 데이터 바인딩, 레이아웃, 2D 및 3D 그래픽, 애니메이션, 스타일, 템플릿, 문서, 미디어, 텍스트 및 타이포그래피를 포함한 광범위한 애플리케이션 개발 기능을 제공합니다.)</p>



<p>WPF is part of .NET, so you can build applications that incorporate other elements of the .NET API.<br>(WPF는 .NET의 일부이므로, .NET API의 다른 요소들을 통합한 애플리케이션을 개발할 수 있습니다.)</p>



<p>There are two implementations of WPF:<br>(WPF에는 두 가지 구현 방식이 있습니다.)</p>



<ul class="wp-block-list">
<li>NET version (this guide):<br>(.NET 버전(이 가이드):)</li>
</ul>



<p>An open-source implementation of WPF hosted on GitHub, which runs on .NET. <br>(GitHub에서 호스팅되는 WPF의 오픈 소스 구현 버전이며, .NET에서 실행됩니다. </p>



<p>The XAML designer requires, at a minimum, Visual Studio 2019 version 16.8. But depending on your version of .NET, you may be required to use a newer version of Visual Studio.<br>XAML 디자이너는 최소한 Visual Studio 2019 버전 16.8이 필요합니다. 그러나 사용 중인 .NET 버전에 따라 더 최신 버전의 Visual Studio가 필요할 수 있습니다.)</p>



<p>Even though .NET is a cross-platform technology, WPF only runs on Windows.<br>(.NET은 크로스 플랫폼 기술이지만, WPF는 Windows에서만 실행됩니다.)</p>



<ul class="wp-block-list">
<li>.NET Framework 4 version:<br>(.NET Framework 4 버전:)</li>
</ul>



<p>The .NET Framework implementation of WPF that&#8217;s supported by Visual Studio 2019 and Visual Studio 2017.<br>(Visual Studio 2019 및 Visual Studio 2017에서 지원되는 .NET Framework 구현 버전의 WPF입니다.)</p>



<p>.NET Framework 4 is a Windows-only version of .NET and is considered a Windows Operating System component. <br>(.NET Framework 4는 Windows에서만 사용 가능한 .NET 버전이며, Windows 운영 체제의 구성 요소로 간주됩니다. )</p>



<p>This version of WPF is distributed with .NET Framework. For more information about the .NET Framework version of WPF, see Introduction to WPF for .NET Framework.<br>이 WPF 버전은 .NET Framework와 함께 배포됩니다. .NET Framework 버전의 WPF에 대한 자세한 내용은 &#8220;Introduction to WPF for .NET Framework&#8221;를 참조하십시오.)</p>



<p>This overview is intended for newcomers and covers the key capabilities and concepts of WPF. To learn how to create a WPF app, see Tutorial: Create a new WPF app.<br>(이 개요는 WPF에 처음 입문하는 사람들을 위한 것이며, WPF의 주요 기능과 개념을 다룹니다.)</p>



<p> To learn how to create a WPF app, see <a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/get-started/create-app-visual-studio?view=netdesktop-8.0" target="_blank" rel="noreferrer noopener">Tutorial: Create a new WPF app.</a><br>(WPF 앱을 만드는 방법을 배우려면 &#8220;<a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/get-started/create-app-visual-studio?view=netdesktop-8.0" target="_blank" rel="noreferrer noopener">Tutorial: Create a new WPF app</a>&#8220;를 참조하십시오.)</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">Why upgrade from .NET Framework<br>(.NET Framework에서 업그레이드해야 하는 이유)</h4>



<p>When you are upgrading your application from .NET Framework to .NET, you will benefit from:<br>(.NET Framework에서 .NET으로 애플리케이션을 업그레이드하면 다음과 같은 혜택을 얻을 수 있습니다:)</p>



<ul class="wp-block-list">
<li>Better performance<br>(더 나은 성능)</li>



<li>New .NET APIs<br>(새로운 .NET API)</li>



<li>The latest language improvements<br>(최신 언어 개선 사항)</li>



<li>Improved accessibility and reliability<br>(향상된 접근성 및 안정성)</li>



<li>Updated tooling and more<br>(업데이트된 도구 및 기타)</li>
</ul>



<p>To learn how to upgrade your application, see How to upgrade a WPF desktop app to .NET 7.<br>(애플리케이션 업그레이드 방법을 알아보려면, &#8220;How to upgrade a WPF desktop app to .NET 7&#8243;을 참조하십시오.)</p>



<h4 class="wp-block-heading">Program with WPF<br>(WPF로 프로그래밍하기)</h4>



<p>WPF exists as a subset of .NET types that are, mostly located in the System.Windows namespace.<br>(WPF는 주로 System.Windows 네임스페이스에 위치한 .NET 타입의 subset으로 존재합니다.)</p>



<p>If you have previously built applications with .NET with frameworks like ASP.NET and Windows Forms, the fundamental WPF programming experience should be familiar, you:<br>(이전에 ASP.NET 또는 Windows Forms 같은 프레임워크로 .NET 애플리케이션을 만들어 본 경험이 있다면, 기본적인 WPF 프로그래밍 경험은 익숙할 것입니다. 예를 들어,)</p>



<ul class="wp-block-list">
<li>Instantiate classes<br>(클래스를 인스턴스화하고)</li>



<li>Set properties<br>(속성을 설정하며)</li>



<li>Call methods<br>(메서드를 호출하고)</li>



<li>Handle events<br>(이벤트를 처리하는 방식입니다.)</li>
</ul>



<p>WPF includes more programming constructs that enhance properties and events: dependency properties and routed events.<br>(WPF는 속성과 이벤트를 확장하는 추가적인 프로그래밍 구조를 포함합니다: 의존성 속성과 라우팅된 이벤트.)</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading"><strong>Markup and code-behind</strong><br>(마크업과 코드 비하인드)</h4>



<p>WPF lets you develop an application using both markup and code-behind, an experience with which ASP.NET developers should be familiar.<br>(WPF는 마크업과 코드 비하인드를 사용하여 애플리케이션을 개발할 수 있게 해줍니다. 이는 ASP.NET 개발자들에게 친숙한 방식입니다.)</p>



<p>You generally use XAML markup to implement the appearance of an application while using managed programming languages (code-behind) to implement its behavior.<br>(일반적으로 XAML 마크업을 사용하여 애플리케이션의 외관을 구현하고, 관리되는 프로그래밍 언어(코드 비하인드)를 사용하여 애플리케이션의 동작을 구현합니다.)</p>



<p>This separation of appearance and behavior has the following benefits:<br>(이러한 외관과 동작의 분리는 다음과 같은 이점이 있습니다:)</p>



<ul class="wp-block-list">
<li>Development and maintenance costs are reduced because appearance-specific markup isn&#8217;t tightly coupled with behavior-specific code.<br>(외관에 특화된 마크업이 동작에 특화된 코드와 강하게 결합되지 않기 때문에 개발 및 유지 관리 비용이 절감됩니다.)</li>



<li>Development is more efficient because designers can implement an application&#8217;s appearance simultaneously with developers who are implementing the application&#8217;s behavior.<br>(디자이너가 애플리케이션의 외관을 구현하는 동안 개발자가 동작을 구현할 수 있어 개발 효율성이 높아집니다.)</li>



<li>Globalization and localization for WPF applications is simplified.<br>(WPF 애플리케이션의 글로벌화 및 현지화가 간소화됩니다.)</li>
</ul>



<h5 class="wp-block-heading"><strong>Markup</strong> (마크업)</h5>



<p>XAML is an XML-based markup language that implements an application&#8217;s appearance declaratively.<br>(XAML은 XML 기반의 마크업 언어로, 애플리케이션의 외관을 선언적으로 구현합니다.)<strong> [XAML (Extensible Application Markup Language</strong>]</p>



<p>You typically use it to define windows, dialog boxes, pages, and user controls, and to fill them with controls, shapes, and graphics.<br>(일반적으로 창, 대화 상자, 페이지, 사용자 컨트롤을 정의하고, 이를 컨트롤, 도형, 그래픽으로 채우는 데 사용됩니다.)</p>



<p>The following example uses XAML to implement the appearance of a window that contains a single button:<br>(다음 예제는 XAML을 사용하여 단일 버튼이 포함된 창의 외관을 구현한 것입니다:)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="xml" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    &lt;!-- XAML 문서의 기본 네임스페이스를 정의, "xmlns"는 "XML Namespace"의 약자-->
    Title="Window with button"
    Width="250" Height="100">

  &lt;!-- Add button to window -->
  &lt;Button Name="button">Click Me!&lt;/Button>

&lt;/Window></pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>Specifically, this XAML defines a window and a button by using the Window and Button elements.<br>(구체적으로, 이 XAML은 Window 및 Button 요소를 사용하여 창과 버튼을 정의합니다.)</p>



<p>Each element is configured with attributes, such as the Window element&#8217;s Title attribute to specify the window&#8217;s title-bar text.<br>(각 요소는 속성으로 구성되어 있으며, 예를 들어 Window 요소의 Title 속성을 사용하여 창의 제목 표시줄 텍스트를 지정합니다.)</p>



<p>At run time, WPF converts the elements and attributes that are defined in markup to instances of WPF classes.<br>(실행 시간에 WPF는 마크업에서 정의된 요소와 속성을 WPF 클래스의 인스턴스로 변환합니다.)</p>



<p>For example, the Window element is converted to an instance of the Window class whose Title property is the value of the Title attribute.<br>(예를 들어, Window 요소는 Title 속성이 Title 속성의 값인 Window 클래스의 인스턴스로 변환됩니다.)</p>



<p>The following figure shows the user interface (UI) that is defined by the XAML in the previous example:<br>(다음 그림은 이전 예제에서 정의된 XAML에 의해 생성된 사용자 인터페이스(UI)를 보여줍니다:)</p>



<figure class="wp-block-image size-full"><img decoding="async" width="352" height="129" src="https://lycos7560.com/wp-content/uploads/2024/10/image.png" alt="" class="wp-image-38349" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image.png 352w, https://lycos7560.com/wp-content/uploads/2024/10/image-300x110.png 300w" sizes="(max-width: 352px) 100vw, 352px" /></figure>



<p>Since XAML is XML-based, the UI that you compose with it is assembled in a hierarchy of nested elements that is known as an element tree.<br>(XAML이 XML 기반이기 때문에, 이를 사용하여 구성한 UI는 요소 트리라고 알려진 중첩 요소의 계층 구조로 조립됩니다.)</p>



<p>The element tree provides a logical and intuitive way to create and manage UIs.<br>(요소 트리는 UI를 생성하고 관리하는 논리적이고 직관적인 방법을 제공합니다.)</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">Code-behind<br>(코드 비하인드)</h4>



<p>The main behavior of an application is to implement the functionality that responds to user interactions.<br>(애플리케이션의 주요 동작은 사용자 상호작용에 응답하는 기능을 구현하는 것입니다.)</p>



<p>For example clicking a menu or button, and calling business logic and data access logic in response.<br>(예를 들어, 메뉴나 버튼을 클릭하고 이에 응답하여 비즈니스 로직 및 데이터 접근 로직을 호출하는 것입니다.)</p>



<p>In WPF, this behavior is implemented in code that is associated with markup.<br>(WPF에서는 이러한 동작이 마크업과 연관된 코드로 구현됩니다.)</p>



<p>This type of code is known as code-behind.<br>(이러한 유형의 코드를 코드 비하인드라고 합니다.)</p>



<p>The following example shows the updated markup from the previous example and the code-behind:<br>(다음 예제는 이전 예제의 업데이트된 마크업과 코드 비하인드를 보여줍니다:)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="xml" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  &lt;!-- 기본 네임스페이스 선언 -->
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  &lt;!-- XAML의 기본 XAML 네임스페이스 선언 -->
    x:Class="SDKSample.AWindow"  &lt;!-- 코드 비하인드와 연결된 클래스 지정 -->
    Title="Window with button"  &lt;!-- 창의 제목 설정 -->
    Width="250" Height="100">  &lt;!-- 창의 너비와 높이 설정 -->

  &lt;!-- Add button to window -->
  &lt;Button Name="button" Click="button_Click">Click Me!&lt;/Button>  &lt;!-- 클릭 이벤트가 있는 버튼 추가 -->

&lt;/Window>
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>The updated markup defines the xmlnsnamespace and maps it to the schema that adds support for the code-behind types.<br>(업데이트된 마크업은 xmlns네임스페이스를 정의하고 이를 코드 비하인드 유형에 대한 지원을 추가하는 스키마에 매핑합니다.)</p>



<p>The xattribute is used to associate a code-behind class to this specific XAML markup.<br>(x속성은 이 특정 XAML 마크업과 코드 비하인드 클래스를 연관시키는 데 사용됩니다.)</p>



<p>Considering this attribute is declared on the &lt;Window&gt; element, the code-behind class must inherit from the Window class.<br>(이 속성이 &lt;Window&gt; 요소에 선언되었기 때문에, 코드 비하인드 클래스는 Window 클래스에서 상속해야 합니다.)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">using System.Windows;  // WPF의 기본 네임스페이스를 사용합니다.

namespace SDKSample  // SDKSample 네임스페이스를 정의합니다.
{
    public partial class AWindow : Window  // AWindow 클래스는 Window 클래스를 상속합니다.
    {
        public AWindow()  // AWindow 생성자
        {
            // InitializeComponent 호출은 마크업에서 정의된 UI와 이 클래스와 병합하는 데 필요합니다. 
            // 여기에는 속성 설정과 이벤트 핸들러 등록이 포함됩니다.
            InitializeComponent();
        }

        // 버튼 클릭 이벤트 핸들러
        void button_Click(object sender, RoutedEventArgs e)  
        {
            // 버튼이 클릭되면 메시지 박스를 표시합니다.
            MessageBox.Show("Hello, Windows Presentation Foundation!");  
        }
    }
}
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>InitializeComponent is called from the code-behind class&#8217;s constructor to merge the UI that is defined in markup with the code-behind class.<br>(InitializeComponent는 코드 비하인드 클래스의 생성자에서 호출되어 마크업에서 정의된 UI와 코드 비하인드 클래스를 병합합니다.)</p>



<p>(InitializeComponent is generated for you when your application is built, which is why you don&#8217;t need to implement it manually.)<br>(InitializeComponent는 애플리케이션이 빌드될 때 자동으로 생성되므로 수동으로 구현할 필요가 없습니다.)</p>



<p>The combination of xand InitializeComponent ensure that your implementation is correctly initialized whenever it&#8217;s created.<br>(x와 InitializeComponent의 조합은 클래스가 생성될 때마다 구현이 올바르게 초기화되도록 보장합니다.)</p>



<p>Notice that in the markup the &lt;Button&gt; element defined a value of button_Click for the Click attribute.<br>(마크업에서 &lt;Button&gt; 요소가 Click 속성에 button_Click 값을 정의한 것을 주목하십시오.)</p>



<p>With the markup and code-behind initialized and working together, the Click event for the button is automatically mapped to the button_Click method.<br>(마크업과 코드 비하인드가 초기화되고 함께 작동하면 버튼의 Click 이벤트가 자동으로 button_Click 메서드에 매핑됩니다.)</p>



<p>When the button is clicked, the event handler is invoked and a message box is displayed by calling the System.Windows.MessageBox.Show method.<br>(버튼이 클릭되면 이벤트 핸들러가 호출되고 System.Windows.MessageBox.Show 메서드를 호출하여 메시지 박스가 표시됩니다.)</p>



<p>The following figure shows the result when the button is clicked:<br>(다음 그림은 버튼이 클릭되었을 때의 결과를 보여줍니다:)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="433" height="267" src="https://lycos7560.com/wp-content/uploads/2024/10/image-1.png" alt="" class="wp-image-38351" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-1.png 433w, https://lycos7560.com/wp-content/uploads/2024/10/image-1-300x185.png 300w" sizes="(max-width: 433px) 100vw, 433px" /></figure>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Input and commands (입력 및 명령)</h3>



<p>Controls most often detect and respond to user input.<br>(컨트롤은 주로 사용자 입력을 감지하고 이에 응답합니다.)</p>



<p>The WPF input system uses both direct and routed events to support text input, focus management, and mouse positioning.<br>(WPF 입력 시스템은 텍스트 입력, 포커스 관리 및 마우스 위치 지정을 지원하기 위해 직접 이벤트와 라우팅 이벤트를 모두 사용합니다.)</p>



<p>Applications often have complex input requirements.<br>(애플리케이션은 종종 복잡한 입력 요구 사항을 가지고 있습니다.)</p>



<p>WPF provides a command system that separates user-input actions from the code that responds to those actions.<br>(WPF는 사용자 입력 작업과 이러한 작업에 응답하는 코드를 분리하는 명령 시스템을 제공합니다.)</p>



<p>The command system allows for multiple sources to invoke the same command logic.<br>(명령 시스템은 여러 소스가 동일한 명령 논리를 호출할 수 있도록 허용합니다.)</p>



<p>For example, take the common editing operations used by different applications: Copy, Cut, and Paste.<br>(예를 들어, 다양한 애플리케이션에서 사용되는 일반적인 편집 작업인 복사(Copy), 잘라내기(Cut) 및 붙여넣기(Paste)를 고려해 보십시오.)</p>



<p>These operations can be invoked by using different user actions if they&#8217;re implemented by using commands.<br>(이 작업은 명령을 사용하여 구현된다면 서로 다른 사용자 작업을 통해 호출될 수 있습니다.)</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Controls (컨트롤)</h3>



<p>The user experiences that are delivered by the application model are constructed controls.<br>(애플리케이션 모델을 통해 제공되는 사용자 경험은 구성된 컨트롤입니다.)</p>



<p>In WPF, control is an umbrella term that applies to a category of WPF classes that have the following characteristics:<br>(WPF에서 &#8216;컨트롤&#8217;은 다음과 같은 특성을 가진 WPF 클래스의 범주에 적용되는 포괄적인 용어입니다.)</p>



<ul class="wp-block-list">
<li>Hosted in either a window or a page.<br>(창 또는 페이지에 호스팅됩니다.)</li>



<li>Have a user interface.<br>(사용자 인터페이스를 가지고 있습니다.)</li>



<li>Implement some behavior.<br>(일부 동작을 구현합니다.)</li>
</ul>



<p>For more information, see Controls.<br>(자세한 내용은 Controls를 참조하십시오.)</p>



<h4 class="wp-block-heading"><strong>WPF controls by function</strong> (WPF 컨트롤 기능별)</h4>



<p>The built-in WPF controls are listed here:<br>(내장 WPF 컨트롤은 다음과 같습니다:)</p>



<ul class="wp-block-list">
<li>Buttons: <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.button" target="_blank" rel="noreferrer noopener">Button</a>&nbsp;and&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.primitives.repeatbutton" target="_blank" rel="noreferrer noopener">RepeatButton</a>.<br>(버튼: Button 및 RepeatButton.)</li>



<li>Data Display: <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.datagrid" target="_blank" rel="noreferrer noopener">DataGrid</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.listview" target="_blank" rel="noreferrer noopener">ListView</a>, and&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.treeview" target="_blank" rel="noreferrer noopener">TreeView</a>.<br>(데이터 표시: DataGrid, ListView 및 TreeView.)</li>



<li>Date Display and Selection: <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.calendar" target="_blank" rel="noreferrer noopener">Calendar</a>&nbsp;and&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.datepicker" target="_blank" rel="noreferrer noopener">DatePicker</a>.<br>(날짜 표시 및 선택: Calendar 및 DatePicker.)</li>



<li>Dialog Boxes: <a href="https://learn.microsoft.com/en-us/dotnet/api/microsoft.win32.openfiledialog" target="_blank" rel="noreferrer noopener">OpenFileDialog</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.printdialog" target="_blank" rel="noreferrer noopener">PrintDialog</a>, and&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/microsoft.win32.savefiledialog" target="_blank" rel="noreferrer noopener">SaveFileDialog</a>.<br>(대화 상자: OpenFileDialog, PrintDialog 및 SaveFileDialog.)</li>



<li>Digital Ink: <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.inkcanvas" target="_blank" rel="noreferrer noopener">InkCanvas</a>&nbsp;and&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.inkpresenter" target="_blank" rel="noreferrer noopener">InkPresenter</a>.<br>(디지털 잉크: InkCanvas 및 InkPresenter.)</li>



<li>Documents: <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.documentviewer" target="_blank" rel="noreferrer noopener">DocumentViewer</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.flowdocumentpageviewer" target="_blank" rel="noreferrer noopener">FlowDocumentPageViewer</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.flowdocumentreader" target="_blank" rel="noreferrer noopener">FlowDocumentReader</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.flowdocumentscrollviewer" target="_blank" rel="noreferrer noopener">FlowDocumentScrollViewer</a>, and&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.stickynotecontrol" target="_blank" rel="noreferrer noopener">StickyNoteControl</a>.<br>(문서: DocumentViewer, FlowDocumentPageViewer, FlowDocumentReader, FlowDocumentScrollViewer 및 StickyNoteControl.)</li>



<li>Input: <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.textbox" target="_blank" rel="noreferrer noopener">TextBox</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.richtextbox">RichTextBox</a>, and&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.passwordbox">PasswordBox</a>.<br>(입력: TextBox, RichTextBox 및 PasswordBox.)</li>



<li>Layout: <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.border">Border</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.primitives.bulletdecorator">BulletDecorator</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.canvas">Canvas</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.dockpanel">DockPanel</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.expander">Expander</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.grid">Grid</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.gridview">GridView</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.gridsplitter">GridSplitter</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.groupbox">GroupBox</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.panel">Panel</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.primitives.resizegrip">ResizeGrip</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.separator">Separator</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.primitives.scrollbar">ScrollBar</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.scrollviewer">ScrollViewer</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.stackpanel">StackPanel</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.primitives.thumb">Thumb</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.viewbox">Viewbox</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.virtualizingstackpanel">VirtualizingStackPanel</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.window">Window</a>, and&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.wrappanel">WrapPanel</a>.<br>(레이아웃: Border, BulletDecorator, Canvas, DockPanel, Expander, Grid, GridView, GridSplitter, GroupBox, Panel, ResizeGrip, Separator, ScrollBar, ScrollViewer, StackPanel, Thumb, Viewbox, VirtualizingStackPanel, Window 및 WrapPanel.)</li>



<li>Media: &nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.image">Image</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.mediaelement" target="_blank" rel="noreferrer noopener">MediaElement</a>, and&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.soundplayeraction" target="_blank" rel="noreferrer noopener">SoundPlayerAction</a>.<br>(미디어: Image, MediaElement 및 SoundPlayerAction.)</li>



<li>Menus: <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.contextmenu" target="_blank" rel="noreferrer noopener">ContextMenu</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.menu" target="_blank" rel="noreferrer noopener">Menu</a>, and&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.toolbar" target="_blank" rel="noreferrer noopener">ToolBar</a>.<br>(메뉴: ContextMenu, Menu 및 ToolBar.)</li>



<li>Navigation: <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.frame" target="_blank" rel="noreferrer noopener">Frame</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.documents.hyperlink" target="_blank" rel="noreferrer noopener">Hyperlink</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.page" target="_blank" rel="noreferrer noopener">Page</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.navigation.navigationwindow" target="_blank" rel="noreferrer noopener">NavigationWindow</a>, and&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.tabcontrol" target="_blank" rel="noreferrer noopener">TabControl</a>.<br>(탐색: Frame, Hyperlink, Page, NavigationWindow 및 TabControl.)</li>



<li>Selection: <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.checkbox" target="_blank" rel="noreferrer noopener">CheckBox</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.combobox" target="_blank" rel="noreferrer noopener">ComboBox</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.listbox" target="_blank" rel="noreferrer noopener">ListBox</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.radiobutton" target="_blank" rel="noreferrer noopener">RadioButton</a>, and&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.slider">Slider</a>.<br>(선택: CheckBox, ComboBox, ListBox, RadioButton 및 Slider.)</li>



<li>User Information: <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.accesstext" target="_blank" rel="noreferrer noopener">AccessText</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.label" target="_blank" rel="noreferrer noopener">Label</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.primitives.popup" target="_blank" rel="noreferrer noopener">Popup</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.progressbar" target="_blank" rel="noreferrer noopener">ProgressBar</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.primitives.statusbar" target="_blank" rel="noreferrer noopener">StatusBar</a>,&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.textblock" target="_blank" rel="noreferrer noopener">TextBlock</a>, and&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.tooltip" target="_blank" rel="noreferrer noopener">ToolTip</a>.<br>(사용자 정보: AccessText, Label, Popup, ProgressBar, StatusBar, TextBlock 및 ToolTip.)</li>
</ul>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Layout (레이아웃)</h3>



<p>When you create a user interface, you arrange your controls by location and size to form a layout.<br>(사용자 인터페이스를 만들 때, 컨트롤을 위치와 크기에 따라 배치하여 레이아웃을 형성합니다.)</p>



<p>A key requirement of any layout is to adapt to changes in window size and display settings.<br>(모든 레이아웃의 주요 요구 사항은 창 크기 및 표시 설정의 변경에 적응하는 것입니다.)</p>



<p>Rather than forcing you to write the code to adapt a layout in these circumstances, WPF provides a first-class, extensible layout system for you.<br>(이러한 상황에서 레이아웃을 조정하기 위한 코드를 작성하도록 강요하는 대신, WPF는 우수하고 확장 가능한 레이아웃 시스템을 제공합니다.)</p>



<p>The cornerstone of the layout system is relative positioning, which increases the ability to adapt to changing window and display conditions.<br>(레이아웃 시스템의 초석은 상대 위치 지정으로, 이는 변화하는 창 및 표시 조건에 적응할 수 있는 능력을 증가시킵니다.)</p>



<p>The layout system also manages the negotiation between controls to determine the layout.<br>(레이아웃 시스템은 또한 레이아웃을 결정하기 위해 컨트롤 간의 협상을 관리합니다.)</p>



<p>The negotiation is a two-step process: first, a control tells its parent what location and size it requires.<br>(협상은 두 단계의 과정입니다: 먼저, 컨트롤이 부모에게 필요한 위치와 크기를 알려줍니다.)</p>



<p>Second, the parent tells the control what space it can have.<br>(두 번째로, 부모가 컨트롤이 가질 수 있는 공간을 알려줍니다.)</p>



<p>The layout system is exposed to child controls through base WPF classes.<br>(레이아웃 시스템은 기본 WPF 클래스를 통해 자식 컨트롤에 노출됩니다.)</p>



<p>For common layouts such as grids, stacking, and docking, WPF includes several layout controls:<br>(그리드, 스택 및 도킹과 같은 일반적인 레이아웃을 위해 WPF는 여러 레이아웃 컨트롤을 포함합니다:)</p>



<ul class="wp-block-list">
<li>Canvas: Child controls provide their own layout.<br>(Canvas: 자식 컨트롤이 자체 레이아웃을 제공합니다.)</li>



<li>DockPanel: Child controls are aligned to the edges of the panel.<br>(DockPanel: 자식 컨트롤이 패널의 가장자리에 정렬됩니다.)</li>



<li>Grid: Child controls are positioned by rows and columns.<br>(Grid: 자식 컨트롤이 행과 열에 따라 위치 지정됩니다.)</li>



<li>StackPanel: Child controls are stacked either vertically or horizontally.<br>(StackPanel: 자식 컨트롤이 수직 또는 수평으로 쌓입니다.)</li>



<li>VirtualizingStackPanel: Child controls are virtualized and arranged on a single line that is either horizontally or vertically oriented.<br>(VirtualizingStackPanel: 자식 컨트롤이 가상화되어 수평 또는 수직 방향의 단일 줄에 배치됩니다.)</li>



<li>WrapPanel: Child controls are positioned in left-to-right order and wrapped to the next line when there isn&#8217;t enough space on the current line.<br>(WrapPanel: 자식 컨트롤이 왼쪽에서 오른쪽으로 배치되고, 현재 줄에 충분한 공간이 없으면 다음 줄로 감싸집니다.)</li>
</ul>



<p>The following example uses a DockPanel to lay out several TextBox controls:<br>(다음 예제에서는 DockPanel을 사용하여 여러 TextBox 컨트롤을 배치합니다:)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="xml" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="SDKSample.LayoutWindow"
    Title="Layout with the DockPanel" Height="143" Width="319">

  &lt;!-- DockPanel을 사용하여 4개의 텍스트 박스를 배치 -->
  &lt;DockPanel>
    &lt;!-- 이 TextBox는 DockPanel의 상단에 배치됨 -->
    &lt;TextBox DockPanel.Dock="Top">Dock = "Top"&lt;/TextBox>

    &lt;!-- 이 TextBox는 DockPanel의 하단에 배치됨 -->
    &lt;TextBox DockPanel.Dock="Bottom">Dock = "Bottom"&lt;/TextBox>

    &lt;!-- 이 TextBox는 DockPanel의 왼쪽에 배치됨 -->
    &lt;TextBox DockPanel.Dock="Left">Dock = "Left"&lt;/TextBox>

    &lt;!-- 이 TextBox는 DockPanel에서 남은 공간을 채움 -->
    &lt;TextBox Background="White">이 TextBox는 남은 공간을 채웁니다.&lt;/TextBox>
  &lt;/DockPanel>

&lt;/Window></pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>The DockPanel allows the child TextBox controls to tell it how to arrange them.<br>(DockPanel은 자식 TextBox 컨트롤들이 자신을 어떻게 배치할지 지정할 수 있도록 합니다.)</p>



<p>To do this, the DockPanel implements a Dock attached property that is exposed to the child controls to allow each of them to specify a dock style.<br>(이를 위해 DockPanel은 Dock 연결 속성을 구현하여 자식 컨트롤들이 각각 자신만의 Dock 스타일을 지정할 수 있게 합니다.)</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Note</p>



<p>A property that&#8217;s implemented by a parent control for use by child controls is a WPF construct called an attached property.<br>(부모 컨트롤에 의해 구현되어 자식 컨트롤에서 사용되는 속성은 WPF 구조에서 &#8220;attached property&#8221;이라고 불립니다.)</p>
</blockquote>



<p>The following figure shows the result of the XAML markup in the preceding example:<br>(다음 그림은 이전 예제의 XAML 마크업 결과를 보여줍니다.)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="347" height="141" src="https://lycos7560.com/wp-content/uploads/2024/10/image-2.png" alt="" class="wp-image-38352" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-2.png 347w, https://lycos7560.com/wp-content/uploads/2024/10/image-2-300x122.png 300w" sizes="(max-width: 347px) 100vw, 347px" /></figure>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><strong>Data binding</strong> (데이터 바인딩)</h3>



<p>Most applications are created to provide users with the means to view and edit data.<br>(대부분의 애플리케이션은 사용자에게 데이터를 보고 수정할 수 있는 수단을 제공하기 위해 만들어집니다.)</p>



<p>For WPF applications, the work of storing and accessing data is already provided for by many different .NET data access libraries such as SQL and Entity Framework Core.<br>(WPF 애플리케이션의 경우, SQL이나 Entity Framework Core와 같은 다양한 .NET 데이터 액세스 라이브러리를 통해 데이터 저장 및 액세스 작업이 이미 제공됩니다.)</p>



<p>After the data is accessed and loaded into an application&#8217;s managed objects, the hard work for WPF applications begins.<br>(데이터가 애플리케이션의 관리 객체에 액세스되고 로드된 후, WPF 애플리케이션의 주요 작업이 시작됩니다.)</p>



<p>Essentially, this involves two things:<br>(본질적으로 두 가지 작업이 필요합니다:)</p>



<p>Copying the data from the managed objects into controls, where the data can be displayed and edited.<br>(관리 객체에서 데이터를 컨트롤로 복사하여 데이터를 표시하고 수정할 수 있도록 합니다.)</p>



<p>Ensuring that changes made to data by using controls are copied back to the managed objects.<br>(컨트롤을 사용하여 데이터에 가해진 변경 사항이 다시 관리 객체로 복사되도록 합니다.)</p>



<p>To simplify application development, WPF provides a powerful data binding engine to automatically handle these steps.<br>(애플리케이션 개발을 단순화하기 위해 WPF는 이러한 단계를 자동으로 처리하는 강력한 데이터 바인딩 엔진을 제공합니다.)</p>



<p>The core unit of the data binding engine is the Binding class, whose job is to bind a control (the binding target) to a data object (the binding source).<br>(데이터 바인딩 엔진의 핵심 단위는 <code>Binding</code> 클래스이며, 이 클래스는 컨트롤(바인딩 대상)과 데이터 객체(바인딩 소스)를 바인딩하는 역할을 합니다.)</p>



<p>This relationship is illustrated by the following figure:<br>(이 관계는 아래 그림에서 설명됩니다.)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="450" height="138" src="https://lycos7560.com/wp-content/uploads/2024/10/image-3.png" alt="" class="wp-image-38353" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-3.png 450w, https://lycos7560.com/wp-content/uploads/2024/10/image-3-300x92.png 300w" sizes="(max-width: 450px) 100vw, 450px" /></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>WPF supports declaring bindings in the XAML markup directly.<br>(WPF는 XAML 마크업에서 직접 바인딩을 선언하는 것을 지원합니다.)</p>



<p>For example, the following XAML code binds the Text property of the TextBox to the Name property of an object using the &#8220;{Binding &#8230; }&#8221; XAML syntax.<br>(예를 들어, 아래 XAML 코드는 <code>{Binding ... }</code> XAML 구문을 사용하여 <code>TextBox</code>의 <code>Text</code> 속성을 객체의 <code>Name</code> 속성에 바인딩합니다.)</p>



<p>This assumes there&#8217;s a data object set to the DataContext property of the Window with a Name property.<br>(이는 <code>Name</code> 속성을 가진 데이터 객체가 <code>Window</code>의 <code>DataContext</code> 속성에 설정되어 있다고 가정합니다.)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="xml" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;Window
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     x:Class="SDKSample.DataBindingWindow">

   &lt;!-- 이 Window 요소는 XAML에서 WPF 응용 프로그램의 창을 정의합니다.
        xmlns는 해당 네임스페이스를 지정하여 WPF가 해당 요소를 식별하고 구문을 처리할 수 있도록 해줍니다.
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"는 WPF 프레젠테이션의 기본 네임스페이스를 나타냅니다.
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"는 XAML의 확장 기능을 포함하는 네임스페이스입니다.
        x:Class="SDKSample.DataBindingWindow"는 이 XAML 파일이 연결될 코드 비하인드 클래스의 이름을 지정합니다. -->

   &lt;!-- TextBox 요소를 정의하며, 여기서 Text 속성은 데이터 바인딩을 통해 외부 데이터 소스에 연결됩니다.
        Name 속성을 "personNameTextBox"로 지정하여 코드 비하인드에서 이 TextBox를 참조할 수 있게 합니다.
        Text="{Binding Path=Name}"는 데이터 바인딩 구문으로, 데이터 소스 객체의 Name 속성과 TextBox의 Text 속성을 연결합니다.
        이 데이터 소스는 Window의 DataContext에 설정된 객체여야 하며, 그 객체는 Name이라는 속성을 가지고 있어야 합니다. -->
   
   &lt;TextBox Name="personNameTextBox" Text="{Binding Path=Name}" />

&lt;/Window>
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>The WPF data binding engine provides more than just binding, it provides validation, sorting, filtering, and grouping.<br>(WPF 데이터 바인딩 엔진은 단순한 바인딩만 제공하는 것이 아니라, 유효성 검사, 정렬, 필터링, 그룹화도 제공합니다.)</p>



<p>Furthermore, data binding supports the use of data templates to create custom user interface for bound data.<br>(더 나아가, 데이터 바인딩은 데이터 템플릿을 사용하여 바인딩된 데이터에 맞는 사용자 정의 인터페이스를 만들 수 있도록 지원합니다.)</p>



<p>For more information, see<a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/data/?view=netdesktop-8.0" target="_blank" rel="noreferrer noopener"> Data binding overview.</a><br>(자세한 내용은 <a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/data/?view=netdesktop-8.0" target="_blank" rel="noreferrer noopener">데이터 바인딩 개요</a>를 참조하세요.)</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Graphics &amp; animation</h3>



<p>WPF provides an extensive and flexible set of graphics features that have the following benefits:<br>(WPF는 다음과 같은 이점을 가진 광범위하고 유연한 그래픽 기능 세트를 제공합니다:)</p>



<ul class="wp-block-list">
<li>Resolution-independent and device-independent graphics (해상도 독립적이고 장치 독립적인 그래픽)<br>The basic unit of measurement in the WPF graphics system is the device-independent pixel, which is 1/96th of an inch, and provides the foundation for resolution-independent and device-independent rendering.<br>( WPF 그래픽 시스템의 기본 측정 단위는 장치 독립적인 픽셀로, 이는 1/96 인치이며 해상도 독립적이고 장치 독립적인 렌더링의 기초를 제공합니다.)<br>Each device-independent pixel automatically scales to match the dots-per-inch (dpi) setting of the system it renders on.<br>(각 장치 독립적인 픽셀은 자동으로 렌더링하는 시스템의 도트 퍼 인치(dpi) 설정에 맞춰 크기가 조정됩니다.)</li>



<li>Improved precision (정밀도 향상)<br>The WPF coordinate system is measured with double-precision floating-point numbers rather than single-precision.<br>(WPF 좌표 시스템은 단일 정밀도 대신 이중 정밀도 부동 소수점 숫자로 측정됩니다.)<br>Transformations and opacity values are also expressed as double-precision.<br>(변환 및 불투명도 값도 이중 정밀도로 표현됩니다. )<br>WPF also supports a wide color gamut (scRGB) and provides integrated support for managing inputs from different color spaces.<br>(WPF는 또한 넓은 색 영역(scRGB)을 지원하며 다양한 색 공간에서 입력을 관리하기 위한 통합 지원을 제공합니다.)</li>



<li>Advanced graphics and animation support (고급 그래픽 및 애니메이션 지원) <br>WPF simplifies graphics programming by managing animation scenes for you; there&#8217;s no need to worry about scene processing, rendering loops, and bilinear interpolation.<br>(WPF는 애니메이션 장면을 관리하여 그래픽 프로그래밍을 간소화합니다. 장면 처리, 렌더링 루프 및 양선형 보간에 대해 걱정할 필요가 없습니다.)<br>Additionally, WPF provides hit-testing support and full alpha-compositing support.<br>(또한 WPF는 히트 테스트 지원 및 전체 알파 합성 지원을 제공합니다.)</li>



<li>Hardware acceleration (하드웨어 가속)<br>The WPF graphics system takes advantage of graphics hardware to minimize CPU usage.<br>(WPF 그래픽 시스템은 그래픽 하드웨어를 활용하여 CPU 사용을 최소화합니다.)</li>
</ul>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">2D graphics</h4>



<p>WPF provides a library of common vector-drawn 2D shapes, such as the rectangles and ellipses.<br>(WPF는 사각형 및 타원과 같은 일반적인 벡터로 그려진 2D 도형의 라이브러리를 제공합니다.)</p>



<p>The shapes aren&#8217;t just for display; shapes implement many of the features that you expect from controls, including keyboard and mouse input.<br>(이 도형들은 단순히 표시용이 아니며, 키보드 및 마우스 입력을 포함하여 컨트롤에서 기대할 수 있는 많은 기능을 구현합니다.)</p>



<p>The 2D shapes provided by WPF cover the standard set of basic shapes.<br>(WPF에서 제공하는 2D 도형은 기본 도형의 표준 세트를 포함합니다.)</p>



<p>However, you may need to create custom shapes to help the design of a customized user interface.<br>(하지만 맞춤형 사용자 인터페이스 설계를 위해 사용자 정의 도형을 생성해야 할 수도 있습니다.)</p>



<p>WPF provides geometries to create a custom shape that can be drawn directly, used as a brush, or used to clip other shapes and controls.<br>(WPF는 직접 그릴 수 있거나 브러시로 사용되거나 다른 도형 및 컨트롤을 자르는 데 사용할 수 있는 사용자 정의 도형을 만들기 위한 기하학을 제공합니다.)</p>



<p>For more information, see <a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/graphics-multimedia/geometry-overview?view=netframeworkdesktop-4.8&amp;viewFallbackFrom=netdesktop-8.0" target="_blank" rel="noreferrer noopener">Geometry overview.</a><br>(자세한 내용은 <a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/graphics-multimedia/geometry-overview?view=netframeworkdesktop-4.8&amp;viewFallbackFrom=netdesktop-8.0" target="_blank" rel="noreferrer noopener">기하학 개요를 참조</a>하세요.)</p>



<p>A subset of WPF 2D capabilities includes visual effects, such as gradients, bitmaps, drawings, painting with videos, rotation, scaling, and skewing.<br>(WPF 2D 기능의 하위 집합에는 그라디언트, 비트맵, 드로잉, 비디오로 그리기, 회전, 스케일링 및 왜곡과 같은 시각 효과가 포함됩니다.)</p>



<p>These effects are all achieved with brushes.<br>(이러한 효과는 모두 브러시를 사용하여 얻을 수 있습니다.)</p>



<p>The following figure shows some examples:<br>(다음 그림은 몇 가지 예를 보여줍니다:)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="596" height="345" src="https://lycos7560.com/wp-content/uploads/2024/10/image-4.png" alt="" class="wp-image-38354" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-4.png 596w, https://lycos7560.com/wp-content/uploads/2024/10/image-4-300x174.png 300w" sizes="(max-width: 596px) 100vw, 596px" /></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>For more information, see <a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/graphics-multimedia/wpf-brushes-overview?view=netframeworkdesktop-4.8&amp;viewFallbackFrom=netdesktop-8.0" target="_blank" rel="noreferrer noopener">WPF brushes overview</a>.<br>(자세한 내용은 <a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/graphics-multimedia/wpf-brushes-overview?view=netframeworkdesktop-4.8&amp;viewFallbackFrom=netdesktop-8.0" target="_blank" rel="noreferrer noopener">WPF 브러시 개요를 참조</a>하세요.)</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">3D rendering</h4>



<p>WPF also includes 3D rendering capabilities that integrate with 2D graphics to allow the creation of more exciting and interesting user interfaces.<br>(WPF는 2D 그래픽과 통합된 3D 렌더링 기능을 포함하여 보다 흥미롭고 매력적인 사용자 인터페이스를 생성할 수 있게 합니다.)</p>



<p>For example, the following figure shows 2D images rendered onto 3D shapes:<br>(예를 들어, 다음 그림은 3D 도형에 렌더링된 2D 이미지를 보여줍니다.)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="652" height="369" src="https://lycos7560.com/wp-content/uploads/2024/10/image-5.png" alt="" class="wp-image-38355" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-5.png 652w, https://lycos7560.com/wp-content/uploads/2024/10/image-5-300x170.png 300w" sizes="(max-width: 652px) 100vw, 652px" /></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>For more information, see <a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/graphics-multimedia/3-d-graphics-overview?view=netframeworkdesktop-4.8&amp;viewFallbackFrom=netdesktop-8.0" target="_blank" rel="noreferrer noopener">3D graphics overview.</a><br>(자세한 내용은 <a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/graphics-multimedia/3-d-graphics-overview?view=netframeworkdesktop-4.8&amp;viewFallbackFrom=netdesktop-8.0" target="_blank" rel="noreferrer noopener">3D 그래픽 개요를 참조</a>하세요.)</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading" id="animation">Animation</h3>



<p>WPF animation support lets you make controls grow, shake, spin, and fade, to create interesting page transitions, and more. You can animate most WPF classes, even custom classes. <br>(WPF 애니메이션 지원을 통해 컨트롤을 성장, 흔들기, 회전, 페이드하여 흥미로운 페이지 전환 등을 만들 수 있습니다. 대부분의 WPF 클래스, 심지어 사용자 지정 클래스도 애니메이션화할 수 있습니다.)</p>



<p>The following figure shows a simple animation in action:<br>(다음 그림은 간단한 애니메이션이 실제로 작동하는 모습을 보여줍니다:)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="454" height="300" src="https://lycos7560.com/wp-content/uploads/2024/10/animation-cube.gif" alt="" class="wp-image-38357"/></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>For more information, see&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/graphics-multimedia/animation-overview?view=netdesktop-8.0" target="_blank" rel="noreferrer noopener">Animation overview</a>.</p>



<p>(자세한 내용은 <a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/graphics-multimedia/animation-overview?view=netdesktop-8.0" target="_blank" rel="noreferrer noopener">Animation 개요를 참조</a>하세요.)</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading" id="text-and-typography">Text and typography</h3>



<p>To provide high-quality text rendering, WPF offers the following features:<br>(고품질 텍스트 렌더링을 제공하기 위해 WPF는 다음과 같은 기능을 제공합니다:)</p>



<ul class="wp-block-list">
<li>OpenType font support.<br>(OpenType 글꼴 지원)</li>



<li>ClearType enhancements.<br>(ClearType 향상)</li>



<li>High performance that takes advantage of hardware acceleration.<br>(하드웨어 가속을 활용한 높은 성능)</li>



<li>Integration of text with media, graphics, and animation.<br>(미디어, 그래픽 및 애니메이션과의 텍스트 통합)</li>



<li>International font support and fallback mechanisms.<br>(다국적 글꼴 지원 및 대체 메커니즘)</li>
</ul>



<p>As a demonstration of text integration with graphics, the following figure shows the application of text decorations:<br>(그래픽과의 텍스트 통합을 보여주는 예로, 다음 그림은 텍스트 장식의 적용을 보여줍니다.)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="521" height="242" src="https://lycos7560.com/wp-content/uploads/2024/10/image-6.png" alt="" class="wp-image-38358" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-6.png 521w, https://lycos7560.com/wp-content/uploads/2024/10/image-6-300x139.png 300w" sizes="(max-width: 521px) 100vw, 521px" /></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>For more information, see&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/advanced/typography-in-wpf?view=netdesktop-8.0" target="_blank" rel="noreferrer noopener">Typography in Windows Presentation Foundation</a>.<br>(자세한 내용은 <a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/advanced/typography-in-wpf?view=netdesktop-8.0" target="_blank" rel="noreferrer noopener">Typography in Windows Presentation Foundation</a>를 참조하십시오.)</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">Customize WPF apps (기본 WPF 앱 사용자 정의)</h3>



<p>Up to this point, you&#8217;ve seen the core WPF building blocks for developing applications:<br>(지금까지 WPF 애플리케이션 개발을 위한 핵심 구성 요소를 살펴보았습니다:)</p>



<ul class="wp-block-list">
<li>You use the application model to host and deliver application content, which consists mainly of controls.<br>(주로 컨트롤로 구성된 애플리케이션 콘텐츠를 호스팅하고 제공하기 위해 애플리케이션 모델을 사용합니다.)</li>



<li>To simplify the arrangement of controls in a user interface, you use the WPF layout system.<br>(사용자 인터페이스에서 컨트롤의 배치를 단순화하기 위해 WPF 레이아웃 시스템을 사용합니다.)</li>



<li>You use data binding to reduce the work of integrating your user interface with data.<br>(데이터와 사용자 인터페이스의 통합 작업을 줄이기 위해 데이터 바인딩을 사용합니다.)</li>



<li>To enhance the visual appearance of your application, you use the comprehensive range of graphics, animation, and media support provided by WPF.<br>(애플리케이션의 시각적 외관을 향상시키기 위해 WPF에서 제공하는 다양한 그래픽, 애니메이션 및 미디어 지원을 사용합니다.)</li>
</ul>



<p>Often, though, the basics aren&#8217;t enough for creating and managing a truly distinct and visually stunning user experience.<br>(그러나 기본 사항만으로는 진정으로 독특하고 시각적으로 뛰어난 사용자 경험을 만들고 관리하기에 충분하지 않습니다.)</p>



<p>The standard WPF controls might not integrate with the desired appearance of your application.<br>(표준 WPF 컨트롤은 애플리케이션의 원하는 외관과 통합되지 않을 수 있습니다.)</p>



<p>Data might not be displayed in the most effective way.<br>(데이터가 가장 효과적인 방식으로 표시되지 않을 수 있습니다.)</p>



<p>Your application&#8217;s overall user experience may not be suited to the default look and feel of Windows themes.<br>(애플리케이션의 전반적인 사용자 경험이 Windows 테마의 기본적인 모습과 느낌에 맞지 않을 수 있습니다.)</p>



<p>For this reason, WPF provides various mechanisms for creating unique user experiences.<br>(이런 이유로 WPF는 독특한 사용자 경험을 생성하기 위한 다양한 메커니즘을 제공합니다.)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">Content Model (콘텐츠 모델)</h4>



<p>The main purpose of most of the WPF controls is to display content.<br>(WPF 컨트롤의 주요 목적은 콘텐츠를 표시하는 것입니다.)</p>



<p>In WPF, the type and number of items that can constitute the content of a control is referred to as the control&#8217;s content model.<br>(WPF에서는 컨트롤의 콘텐츠를 구성할 수 있는 항목의 종류와 수를 컨트롤의 콘텐츠 모델이라고 합니다.)</p>



<p>Some controls can contain a single item and type of content.<br>(일부 컨트롤은 단일 항목과 콘텐츠 유형을 포함할 수 있습니다.)</p>



<p>For example, the content of a <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.textbox?view=windowsdesktop-8.0" target="_blank" rel="noreferrer noopener">TextBox</a> is a string value that is assigned to the <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.textbox.text?view=windowsdesktop-8.0" target="_blank" rel="noreferrer noopener">Text property</a>.<br>(예를 들어, <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.textbox?view=windowsdesktop-8.0" target="_blank" rel="noreferrer noopener">TextBox</a>의 콘텐츠는 <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.textbox.text?view=windowsdesktop-8.0" target="_blank" rel="noreferrer noopener">Text 속성</a>에 할당된 문자열 값입니다.)</p>



<p>Other controls, however, can contain multiple items of different types of content;<br>(그러나 다른 컨트롤은 다양한 유형의 콘텐츠를 포함할 수 있습니다.)</p>



<p>the content of a <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.button?view=windowsdesktop-8.0" target="_blank" rel="noreferrer noopener">Button</a>, specified by the <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.contentcontrol.content?view=windowsdesktop-8.0" target="_blank" rel="noreferrer noopener">Content </a>property, can contain various items including layout controls, text, images, and shapes.<br>(<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.contentcontrol.content?view=windowsdesktop-8.0" target="_blank" rel="noreferrer noopener">Content </a>속성에 의해 지정된 <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.button?view=windowsdesktop-8.0" target="_blank" rel="noreferrer noopener">Button</a>의 콘텐츠는 레이아웃 컨트롤, 텍스트, 이미지 및 도형을 포함하는 다양한 항목을 포함할 수 있습니다.)</p>



<p>For more information on the kinds of content that is supported by various controls, see <a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/wpf-content-model?view=netframeworkdesktop-4.8&amp;viewFallbackFrom=netdesktop-8.0" target="_blank" rel="noreferrer noopener">WPF content model</a>.<br>(다양한 컨트롤에서 지원되는 콘텐츠의 종류에 대한 자세한 내용은 <a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/wpf-content-model?view=netframeworkdesktop-4.8&amp;viewFallbackFrom=netdesktop-8.0" target="_blank" rel="noreferrer noopener">WPF 콘텐츠 모델</a>을 참조하십시오.)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">Triggers (트리거)</h4>



<p>Although the main purpose of XAML markup is to implement an application&#8217;s appearance, you can also use XAML to implement some aspects of an application&#8217;s behavior.<br>(XAML 마크업의 주요 목적은 애플리케이션의 외관을 구현하는 것이지만, XAML을 사용하여 애플리케이션의 동작의 일부 측면을 구현할 수도 있습니다.)</p>



<p>One example is the use of triggers to change an application&#8217;s appearance based on user interactions.<br>(한 가지 예로, 사용자 상호 작용에 따라 애플리케이션의 외관을 변경하는 트리거의 사용이 있습니다.)</p>



<p>For more information, see <a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/styles-templates-overview?view=netdesktop-8.0" target="_blank" rel="noreferrer noopener">Styles and templates.</a><br>(자세한 내용은 스타일 및 템플릿을 참조하십시오.)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">Templates (템플릿)</h4>



<p>The default user interfaces for WPF controls are typically constructed from other controls and shapes.<br>(WPF 컨트롤의 기본 사용자 인터페이스는 일반적으로 다른 컨트롤과 도형으로 구성됩니다.)</p>



<p>For example, a Button is composed of both <a href="https://learn.microsoft.com/en-us/dotnet/api/microsoft.windows.themes.buttonchrome?view=windowsdesktop-8.0" target="_blank" rel="noreferrer noopener">ButtonChrome </a>and <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.contentpresenter?view=windowsdesktop-8.0" target="_blank" rel="noreferrer noopener">ContentPresenter</a> controls.<br>(예를 들어, Button은 ButtonChrome과 ContentPresenter 컨트롤로 구성됩니다.)</p>



<p>The ButtonChrome provides the standard button appearance, while the ContentPresenter displays the button&#8217;s content, as specified by the Content property.<br>(ButtonChrome은 표준 버튼 외관을 제공하고, ContentPresenter는 Content 속성에 의해 지정된 버튼의 콘텐츠를 표시합니다.)</p>



<p>Sometimes the default appearance of a control may conflict with the overall appearance of an application.<br>(때때로, 컨트롤의 기본 외관이 애플리케이션의 전반적인 외관과 충돌할 수 있습니다.)</p>



<p>In this case, you can use a ControlTemplate to change the appearance of the control&#8217;s user interface without changing its content and behavior.<br>(이 경우 ControlTemplate을 사용하여 컨트롤의 콘텐츠와 동작을 변경하지 않고 사용자 인터페이스의 외관을 변경할 수 있습니다.)</p>



<p>For example, a Button raises the Click event when it&#8217;s clicked.<br>(예를 들어, Button은 클릭되면 Click 이벤트를 발생시킵니다.)</p>



<p>By changing the template of a button to display an Ellipse shape, the visual of the aspect of the control has changed, but the functionality hasn&#8217;t.<br>(버튼의 템플릿을 Ellipse 모양으로 변경하면 컨트롤의 시각적 요소는 변경되지만 기능은 변경되지 않습니다.)</p>



<p>You can still click on the visual aspect of the control and the Click event is raised as expected.<br>(여전히 컨트롤의 시각적 요소를 클릭할 수 있으며, Click 이벤트가 예상대로 발생합니다.)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="496" height="288" src="https://lycos7560.com/wp-content/uploads/2024/10/image-7.png" alt="" class="wp-image-38359" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-7.png 496w, https://lycos7560.com/wp-content/uploads/2024/10/image-7-300x174.png 300w" sizes="(max-width: 496px) 100vw, 496px" /></figure>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">Data templates (데이터 템플릿)</h4>



<p>Whereas a control template lets you specify the appearance of a control, a data template lets you specify the appearance of a control&#8217;s content.<br>(컨트롤 템플릿이 컨트롤의 외관을 지정하게 해주는 반면, 데이터 템플릿은 컨트롤의 콘텐츠 외관을 지정할 수 있게 해줍니다.)</p>



<p>Data templates are frequently used to enhance how bound data is displayed.<br>(데이터 템플릿은 바인딩된 데이터가 표시되는 방식을 향상시키기 위해 자주 사용됩니다.)</p>



<p>The following figure shows the default appearance for a ListBox that is bound to a collection of Task objects, where each task has a name, description, and priority:<br>(다음 그림은 이름, 설명 및 우선 순위를 가진 Task 객체의 컬렉션에 바인딩된 ListBox의 기본 모양을 보여줍니다:)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="347" height="251" src="https://lycos7560.com/wp-content/uploads/2024/10/image-8.png" alt="" class="wp-image-38360" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-8.png 347w, https://lycos7560.com/wp-content/uploads/2024/10/image-8-300x217.png 300w" sizes="(max-width: 347px) 100vw, 347px" /></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>The default appearance is what you would expect from a ListBox.<br>(기본 모양은 ListBox에서 예상할 수 있는 것입니다.)</p>



<p>However, the default appearance of each task contains only the task name.<br>(그러나 각 작업의 기본 모양은 작업 이름만 포함되어 있습니다.)</p>



<p>To show the task name, description, and priority, the default appearance of the ListBox control&#8217;s bound list items must be changed by using a DataTemplate.<br>(작업 이름, 설명 및 우선 순위를 표시하려면 ListBox 컨트롤의 바인딩된 리스트 항목의 기본 모양을 DataTemplate을 사용하여 변경해야 합니다.)</p>



<p>Here is an example of applying a data template that was created for the Task object.<br>(다음은 Task 객체를 위해 생성된 데이터 템플릿을 적용한 예입니다.)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="347" height="251" src="https://lycos7560.com/wp-content/uploads/2024/10/image-9.png" alt="" class="wp-image-38361" srcset="https://lycos7560.com/wp-content/uploads/2024/10/image-9.png 347w, https://lycos7560.com/wp-content/uploads/2024/10/image-9-300x217.png 300w" sizes="(max-width: 347px) 100vw, 347px" /></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>The <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.listbox?view=windowsdesktop-8.0" target="_blank" rel="noreferrer noopener">ListBox </a>retains its behavior and overall appearance and only the appearance of the content being displayed by the list box has changed.<br>(ListBox는 동작과 전체 외관을 유지하며, 리스트 박스에 의해 표시되는 콘텐츠의 외관만 변경되었습니다.)</p>



<p>For more information, see <a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/data/data-templating-overview?view=netframeworkdesktop-4.8&amp;viewFallbackFrom=netdesktop-8.0" target="_blank" rel="noreferrer noopener">Data templating overview.</a><br>(자세한 내용은 데이터 템플릿 개요를 참조하십시오.)</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading" id="styles">Styles</h4>



<p>Styles enable developers and designers to standardize on a particular appearance for their product.<br>(스타일은 개발자와 디자이너가 제품의 특정 외관을 표준화할 수 있도록 합니다.)</p>



<p>WPF provides a strong style model, the foundation of which is the Style element.<br>(WPF는 강력한 스타일 모델을 제공하며, 그 기반이 되는 요소는 Style 요소입니다.)</p>



<p>Styles can apply property values to types.<br>(스타일은 속성 값을 유형에 적용할 수 있습니다.)</p>



<p>They can be applied automatically to everything according to the type or individual objects when referenced.<br>(스타일은 유형에 따라 자동으로 모든 것에 적용되거나 참조할 때 개별 객체에 적용될 수 있습니다.)</p>



<p>The following example creates a style that sets the background color for every Button on the window to Orange:<br>(다음 예제는 창에 있는 모든 Button의 배경 색상을 오렌지색으로 설정하는 스타일을 생성합니다:)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="xml" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="SDKSample.StyleWindow"
    Title="Styles"> &lt;!-- 창의 제목을 "Styles"로 설정 -->

    &lt;Window.Resources>
        &lt;!-- 이 창의 모든 버튼에 적용될 스타일 정의 -->
        &lt;Style TargetType="{x:Type Button}"> &lt;!-- 버튼 유형을 대상으로 하는 스타일 -->
            &lt;Setter Property="Background" Value="Orange" /> &lt;!-- 배경색을 오렌지색으로 설정 -->
            &lt;Setter Property="BorderBrush" Value="Crimson" /> &lt;!-- 테두리 색상을 크림슨으로 설정 -->
            &lt;Setter Property="FontSize" Value="20" /> &lt;!-- 글자 크기를 20으로 설정 -->
            &lt;Setter Property="FontWeight" Value="Bold" /> &lt;!-- 글자 굵기를 Bold로 설정 -->
            &lt;Setter Property="Margin" Value="5" /> &lt;!-- 버튼의 외부 여백을 5로 설정 -->
        &lt;/Style>
    &lt;/Window.Resources> &lt;!-- 스타일 정의 끝 -->

    &lt;StackPanel> &lt;!-- 수직으로 자식 요소를 쌓아 나가는 StackPanel -->

        &lt;!-- 이 버튼에는 위에서 정의한 스타일이 적용됨 -->
        &lt;Button>Click Me!&lt;/Button>

        &lt;!-- 이 레이블은 스타일이 적용되지 않음 -->
        &lt;Label>Don't Click Me!&lt;/Label>

        &lt;!-- 이 버튼에도 위에서 정의한 스타일이 적용됨 -->
        &lt;Button>Click Me!&lt;/Button>
        
    &lt;/StackPanel> &lt;!-- StackPanel 끝 -->
&lt;/Window>
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>Because this style targets all&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.button">Button</a>&nbsp;controls, the style is automatically applied to all the buttons in the window, as shown in the following figure:<br>(이 스타일은 모든 버튼 컨트롤을 대상으로 하므로 다음 그림과 같이 창의 모든 버튼에 스타일이 자동으로 적용됩니다)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img decoding="async" width="243" height="149" src="https://lycos7560.com/wp-content/uploads/2024/10/image-10.png" alt="" class="wp-image-38362"/></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>For more information, see&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/styles-templates-overview?view=netdesktop-8.0" target="_blank" rel="noreferrer noopener">Styles and templates</a>.<br>(자세한 내용은 스타일 및 템플릿을 참조하세요.)</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading"><strong>Resources</strong> (리소스)</h4>



<p>Controls in an application should share the same appearance, which can include anything from fonts and background colors to control templates, data templates, and styles.<br>(응용 프로그램의 컨트롤은 동일한 모양을 공유해야 하며, 이는 글꼴, 배경 색상, 컨트롤 템플릿, 데이터 템플릿 및 스타일 등 다양한 요소를 포함할 수 있습니다.)</p>



<p>You can use WPF&#8217;s support for user interface resources to encapsulate these resources in a single location for reuse.<br>(WPF의 사용자 인터페이스 리소스 지원을 사용하여 이러한 리소스를 하나의 위치에 캡슐화하고 재사용할 수 있습니다.)</p>



<p>The following example defines a common background color that is shared by a Button and a Label:<br>(다음 예제는 버튼과 레이블이 공유하는 공통 배경 색상을 정의합니다.)</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<pre class="EnlighterJSRAW" data-enlighter-language="xml" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="SDKSample.ResourcesWindow"
    Title="Resources Window">

  &lt;!-- 
    Window.Resources 섹션에서 배경 색상 리소스를 정의합니다. 
    SolidColorBrush 객체는 x:Key 속성을 통해 리소스의 이름을 지정합니다. 
    여기서 "defaultBackground"라는 키를 가진 빨간색(SolidColorBrush) 브러시를 생성합니다.
  -->
  &lt;Window.Resources>
    &lt;SolidColorBrush x:Key="defaultBackground" Color="Red" />
  &lt;/Window.Resources>

  &lt;!-- 
    버튼의 배경 색상은 window-scoped 리소스에 의해 정의됩니다. 
    StaticResource를 사용하여 "defaultBackground" 리소스를 참조합니다.
    이 버튼은 빨간색 배경을 가지게 됩니다.
  -->
  &lt;Button Background="{StaticResource defaultBackground}">One Button&lt;/Button>

  &lt;!-- 
    레이블의 배경 색상도 window-scoped 리소스에 의해 정의됩니다. 
    StaticResource를 사용하여 "defaultBackground" 리소스를 참조합니다.
    이 레이블 또한 빨간색 배경을 가지게 됩니다.
  -->
  &lt;Label Background="{StaticResource defaultBackground}">One Label&lt;/Label>
&lt;/Window>
</pre>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<p>For more information, see&nbsp;<a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/systems/xaml-resources-how-to-define-and-reference?view=netdesktop-8.0" target="_blank" rel="noreferrer noopener">How to define and reference a WPF resource</a>.<br>(자세한 내용은 <a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/systems/xaml-resources-how-to-define-and-reference?view=netdesktop-8.0" target="_blank" rel="noreferrer noopener">WPF 리소스를 정의하고 참조하는 방법</a>을 참조하십시오.)</p>



<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading" id="custom-controls">Custom controls (사용자 정의 컨트롤)</h4>



<p>Although WPF provides a host of customization support, you may encounter situations where existing WPF controls do not meet the needs of either your application or its users.<br>(WPF는 많은 사용자 정의 지원을 제공하지만, 기존 WPF 컨트롤이 애플리케이션이나 사용자의 요구를 충족하지 못하는 상황에 직면할 수 있습니다.)</p>



<p>This can occur when:<br>(이는 다음과 같은 경우에 발생할 수 있습니다:)</p>



<ul class="wp-block-list">
<li>The user interface that you require cannot be created by customizing the look and feel of existing WPF implementations.<br>(필요한 사용자 인터페이스를 기존 WPF 구현의 모양과 느낌을 사용자 정의하여 만들 수 없는 경우입니다.)</li>



<li>The behavior that you require isn&#8217;t supported (or not easily supported) by existing WPF implementations.<br>(필요한 동작이 기존 WPF 구현에서 지원되지 않거나 쉽게 지원되지 않는 경우입니다.)</li>
</ul>



<p>At this point, however, you can take advantage of one of three WPF models to create a new control.<br>(그러나 이 시점에서 새로운 컨트롤을 만들기 위해 세 가지 WPF 모델 중 하나를 활용할 수 있습니다.)</p>



<p>Each model targets a specific scenario and requires your custom control to derive from a particular WPF base class.<br>(각 모델은 특정 시나리오를 목표로 하며, 사용자 정의 컨트롤이 특정 WPF 기본 클래스에서 파생되도록 요구합니다.)</p>



<p>The three models are listed here:<br>(세 가지 모델은 다음과 같습니다:)</p>



<ul class="wp-block-list">
<li>User Control Model (사용자 컨트롤 모델)<br>A custom control derives from <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.usercontrol?view=windowsdesktop-8.0" target="_blank" rel="noreferrer noopener">UserControl </a>and is composed of one or more other controls.<br>(사용자 정의 컨트롤은 <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.usercontrol?view=windowsdesktop-8.0" target="_blank" rel="noreferrer noopener">UserControl</a>에서 파생되며, 하나 이상의 다른 컨트롤로 구성됩니다.)</li>



<li>Control Model (컨트롤 모델)<br>A custom control derives from <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.control?view=windowsdesktop-8.0" target="_blank" rel="noreferrer noopener">Control </a>and is used to build implementations that separate their behavior from their appearance using templates, much like most WPF controls.<br>(사용자 정의 컨트롤은 <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.controls.control?view=windowsdesktop-8.0" target="_blank" rel="noreferrer noopener">Control</a>에서 파생되며, 대부분의 WPF 컨트롤처럼 동작과 외관을 템플릿을 사용하여 분리하는 구현을 만드는 데 사용됩니다.)<br>Deriving from Control allows you more freedom for creating a custom user interface than user controls, but it may require more effort.<br>(Control에서 파생되면 사용자 컨트롤보다 사용자 정의 사용자 인터페이스를 생성할 수 있는 더 많은 자유를 제공하지만, 더 많은 노력이 필요할 수 있습니다.)</li>



<li>Framework Element Model (프레임워크 요소 모델)<br>A custom control derives from <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.frameworkelement?view=windowsdesktop-8.0" target="_blank" rel="noreferrer noopener">FrameworkElement</a> when its appearance is defined by custom rendering logic (not templates).<br>(사용자 정의 컨트롤은 외관이 사용자 정의 렌더링 논리(템플릿이 아님)로 정의될 때 <a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.frameworkelement?view=windowsdesktop-8.0" target="_blank" rel="noreferrer noopener">FrameworkElement</a>에서 파생됩니다.)</li>
</ul>



<p>For more information on custom controls, see<a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/control-authoring-overview?view=netframeworkdesktop-4.8&amp;viewFallbackFrom=netdesktop-8.0" target="_blank" rel="noreferrer noopener"> Control authoring overview.</a><br>(사용자 정의 컨트롤에 대한 자세한 내용은 <a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/control-authoring-overview?view=netframeworkdesktop-4.8&amp;viewFallbackFrom=netdesktop-8.0" target="_blank" rel="noreferrer noopener">컨트롤 작성 개요를 참조</a>하세요.)</p>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading" id="see-also">See also (참조)</h2>



<ul class="wp-block-list">
<li><a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/get-started/create-app-visual-studio?view=netdesktop-8.0" target="_blank" rel="noreferrer noopener">Tutorial: Create a new WPF app</a></li>



<li><a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/migration/convert-project-from-net-framework?view=netdesktop-8.0" target="_blank" rel="noreferrer noopener">Migrate a WPF app to .NET</a></li>



<li><a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/windows/?view=netdesktop-8.0" target="_blank" rel="noreferrer noopener">Overview of WPF windows</a></li>



<li><a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/data/?view=netdesktop-8.0" target="_blank" rel="noreferrer noopener">Data binding overview</a></li>



<li><a href="https://learn.microsoft.com/en-us/dotnet/desktop/wpf/xaml/?view=netdesktop-8.0" target="_blank" rel="noreferrer noopener">XAML overview</a></li>
</ul>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<p></p>
<p>The post <a href="https://lycos7560.com/c/windows-presentation-foundation-%ea%b0%9c%ec%9a%94-%eb%b2%88%ec%97%ad/38348/">Windows Presentation Foundation 개요 &#8211; 번역</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/c/windows-presentation-foundation-%ea%b0%9c%ec%9a%94-%eb%b2%88%ec%97%ad/38348/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>STAThread 속성 &#8211; WPF</title>
		<link>https://lycos7560.com/c/stathread-%ec%86%8d%ec%84%b1-wpf/38344/</link>
					<comments>https://lycos7560.com/c/stathread-%ec%86%8d%ec%84%b1-wpf/38344/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Sat, 05 Oct 2024 06:26:56 +0000</pubDate>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[Example]]></category>
		<category><![CDATA[multi thread]]></category>
		<category><![CDATA[Single Thread]]></category>
		<category><![CDATA[STA]]></category>
		<category><![CDATA[STAThread]]></category>
		<category><![CDATA[thread]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Presentation Foundation]]></category>
		<category><![CDATA[wpf]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=38344</guid>

					<description><![CDATA[<p>WPF 애플리케이션에서 [STAThread] 속성은 Main Thread가 STA(Single-Threaded Apartment) 모델을 사용하도록 지정합니다. STA 모델은 COM(Component Object Model)의 스레드 모델 중 하나로, UI 요소들이 단일 스레드에서 안전하게 처리되도록 보장합니다. 이는 스레드 간 동기화 문제를 줄여주며, UI 컴포넌트와의 호환성이 좋습니다.</p>
<p>그러나 STA 모델은 모든 작업이 단일 스레드에서 실행되므로 성능 저하가 발생할 수 있습니다. 이를 해결하기 위해서는 스레드를 새로 만들어 작업을 분리하고, UI와의 상호작용 시 Dispatcher.Invoke를 사용하여 UI 스레드에서 코드를 실행해야 합니다.</p>
<p>The post <a href="https://lycos7560.com/c/stathread-%ec%86%8d%ec%84%b1-wpf/38344/">STAThread 속성 &#8211; WPF</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading"><code>[STAThread]</code> 속성</h2>



<p>Windows Presentation Foundation (WPF) 애플리케이션에서 사용되는 <code>[STAThread]</code> 속성은 Main Thread가 STA(Single-Threaded Apartment) 모델을 사용하도록 지정합니다.</p>



<p>STA 모델은 COM(Component Object Model)의 스레드 모델 중 하나로, 이 속성을 통해 WPF 애플리케이션이 COM 구성 요소와 호환되며 안전하게 접근할 수 있게 됩니다. </p>



<p>특히, UI 요소가 Single Thread에서 안전하게 접근되도록 보장하며, Multi Thread으로 인해 발생할 수 있는 문제들을 방지할 수 있습니다.</p>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">STA(Single-Threaded Apartment) 모델</h3>



<p>STA 모델은 객체가 생성된 Thread에서만 해당 객체에 접근할 수 있도록 보장하는 Thread 모델입니다. </p>



<p>이 모델의 주요 특징은 다음과 같습니다:</p>



<ul class="wp-block-list">
<li>모든 메서드 호출과 이벤트가 Single Thread에서 직렬화됩니다.</li>



<li>Thread 간 동기화 문제를 줄여줍니다.</li>



<li>대부분의 UI 요소는 STA 모델을 사용합니다.</li>
</ul>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">STA 모델의 장점</h3>



<ul class="wp-block-list">
<li><strong>Thread 안전성</strong>이 뛰어납니다.</li>



<li><strong>UI 컴포넌트와의 호환성</strong>이 좋습니다.</li>
</ul>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">STA 모델의 단점</h3>



<ul class="wp-block-list">
<li>모든 작업이 단일 Thread에서 실행되므로 <strong>성능 저하</strong>가 발생할 수 있습니다.</li>
</ul>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h4 class="wp-block-heading">예제 코드</h4>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="false" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">using System;
using System.Windows;
using System.Threading;

namespace WPFSTAExample
{
    public partial class App : Application
    {
        [STAThread]
        public static void Main()
        {
            App app = new App();
            MainWindow mainWindow = new MainWindow();
            app.Run(mainWindow);
        }
    }

    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            Button button = new Button
            {
                Content = "Click me",
                Width = 100,
                Height = 30
            };
            button.Click += Button_Click;
            this.Content = button;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            // 이 메서드는 UI 스레드(STA)에서 실행됩니다.
            MessageBox.Show("Button clicked!");

            // 새 스레드에서 작업을 실행하려면:
            Thread thread = new Thread(() =>
            {
                // 이 코드는 별도의 스레드에서 실행됩니다.
                // UI 요소에 직접 접근하면 예외가 발생합니다.
                // Dispatcher.Invoke를 사용하여 UI 스레드에서 코드를 실행해야 합니다.
                this.Dispatcher.Invoke(() =>
                {
                    MessageBox.Show("Hello from another thread!");
                });
            });
            thread.Start();
        }
    }
}</pre>



<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading">결론</h3>



<p>WPF 애플리케이션에서는 <code>[STAThread]</code> 속성을 통해 STA 모델을 사용하여 UI Thread에서의 안정성을 보장할 수 있습니다. </p>



<p>다만, 모든 작업이 Single Thread에서 실행되기 때문에 성능 문제가 발생할 수 있으므로, 적절한 비동기 처리를 통해 이러한 문제를 해결하는 것이 중요합니다.</p>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<p></p>
<p>The post <a href="https://lycos7560.com/c/stathread-%ec%86%8d%ec%84%b1-wpf/38344/">STAThread 속성 &#8211; WPF</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/c/stathread-%ec%86%8d%ec%84%b1-wpf/38344/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
