<Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.blizzard.com/wow/ui/">
	<Script file="Main.lua"></Script>

	<Frame name="AddonFactory_AuctionHouseMainFrameTemplate" toplevel="true" parent="UIParent" inherits="PortraitFrameTemplate" enableMouse="true" movable="true" resizable="true" hidden="true" virtual="true">
		<Size x="800" y="538" />
		<Anchors>
			<Anchor point="CENTER"/>
		</Anchors>
		<!-- Deprecated in 10.0 -->
		<!--  
		<Layers>
			<Layer level="OVERLAY">
				<FontString parentKey="Title" inherits="GameFontNormal" justifyH="CENTER">
					<Anchors>
						<Anchor point="TOPLEFT" x="20" y="-4" />
						<Anchor point="RIGHT" x="-20" y="0" />
						<Anchor point="BOTTOM" relativeTo="$parent" relativePoint="TOPRIGHT"  x="0" y="-20" />
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		-->
		<Frames>
			<!-- Isolated loader, to prevent from being superseded by the inherited frame's OnLoad -->
			<Frame>
				<Scripts>
					<OnLoad>
						LibStub("LibMVC-1.0"):BindViewToController(self:GetParent(), "AddonFactory.AuctionHouseMainFrame")
					</OnLoad>
					<OnShow>
						local parent = self:GetParent()
						if not parent.silent then
							PlaySound(1115)
						end
						
						parent:SetPortraitToUnit("player")
					</OnShow>
					<OnHide>
						local parent = self:GetParent()
						if not parent.silent then
							PlaySound(1115)
						end
					</OnHide>
				</Scripts>
			</Frame>
		</Frames>
	</Frame>
</Ui>
