---
title: "Are XAML files compiled or built at runtime?"  
description: "Are XAML files compiled or built at runtime?"  
author: "AVADHESH PATEL"  
published: 2012-11-17  
updated: 2020-09-22  
canonical: https://www.mindstick.com/interview/1575/are-xaml-files-compiled-or-built-at-runtime  
category: "wpf"  
tags: ["wpf"]  
reading_time: 1 minute  

---

# Are XAML files compiled or built at runtime?

XAML files are usually compiled rather than parsed at runtime. But it also supports parsing during runtime. When we build a XAML based **project**, you will see it creates a g.cs extension in the obiDebug folder. Therefore, for every XAML file, you will find a g.cs file. For instance, a MainPage.XAML will have a MainPage.g.cs file in the obiDebug folder. In short, at run time, you actually do not see the XAML file. But if you want to do runtime parsing of the XAML file, it also allows **that to be** done.

## Answers

### Answer by AVADHESH PATEL

XAML files are usually compiled rather than parsed at runtime. But it also supports parsing during runtime. When we build a XAML based **project**, you will see it creates a g.cs extension in the obiDebug folder. Therefore, for every XAML file, you will find a g.cs file. For instance, a MainPage.XAML will have a MainPage.g.cs file in the obiDebug folder. In short, at run time, you actually do not see the XAML file. But if you want to do runtime parsing of the XAML file, it also allows **that to be** done.


---

Original Source: https://www.mindstick.com/interview/1575/are-xaml-files-compiled-or-built-at-runtime

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
