<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">

    <Frame name="GwPaperDollSelectedIndicator" frameStrata="DIALOG" toplevel="true" hidden="true" virtual="true">
        <size x="16" y="32"></size>
        <Anchors>
            <Anchor point="LEFT"></Anchor>
        </Anchors>
        <Layers>
            <Layer level="OVERLAY" textureSubLevel="2">
                <Texture parentKey="arrow" file="Interface\AddOns\GW2_UI\textures\party\manage-group-arrow">
                    <Size x="16" y="32"></Size>
                    <Anchors>
                        <Anchor point="LEFT" x="0"></Anchor>
                    </Anchors>
                </Texture>
            </Layer>
        </Layers>
    </Frame>

    <Frame name="GwPaperDollStat" enableMouse="true" virtual="true">
        <Size x="92" y="30"></Size>
        <Anchors>
            <Anchor point="TOPLEFT"></Anchor>
        </Anchors>
        <Layers>
            <Layer level="OVERLAY">
                <Texture name="$parentIcon" parentKey="icon" file="Interface\AddOns\GW2_UI\textures\character\statsicon">
                    <Size x="30" y="30"></Size>
                    <Anchors>
                        <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT"></Anchor>
                    </Anchors>
                </Texture>
                <FontString parentKey="Value" text="Not Loaded" justifyV="MIDDLE" justifyH="LEFT">
                    <Size x="72" y="30"></Size>
                    <Anchors>
                        <Anchor point="TOPLEFT" x="35"></Anchor>
                    </Anchors>
                </FontString>
                <FontString parentKey="Label" text="" justifyH="LEFT">
                    <Size x="72" y="20"></Size>
                    <Anchors>
                        <Anchor point="TOPLEFT"></Anchor>
                    </Anchors>
                </FontString>
            </Layer>
        </Layers>
    </Frame>

    <CheckButton hidden="true" name="GWIgnoreSlotCheck" parentKey="ignoreSlotCheck" checked="false" virtual="true">
        <Size x="16" y="16"></Size>
        <Anchors>
            <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="0" y="0"></Anchor>
        </Anchors>
        <NormalTexture file="Interface/AddOns/GW2_UI/textures/uistuff/checkbox"></NormalTexture>
        <CheckedTexture file="Interface/AddOns/GW2_UI/textures/uistuff/checkboxchecked"></CheckedTexture>
    </CheckButton>

    <ItemButton name="GwPaperDollButtonTemplate" registerForDrag="LeftButton" registerForClicks="LeftButtonUp, RightButtonUp" mixin="ContainerFrameItemButtonMixin" inherits="SecureHandlerClickTemplate,PaperDollAzeriteItemOverlayTemplate" virtual="true">
        <Size x="49" y="49"></Size>
        <Layers>
            <Layer level="BACKGROUND">
                <Texture parentKey="BACKGROUND" file="Interface\AddOns\GW2_UI\textures\character\slot-bg">
                    <Size x="49" y="49"></Size>
                    <Anchors>
                        <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="0" y="0"></Anchor>
                        <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="0" y="0"></Anchor>
                    </Anchors>
                    <TexCoords left="0" right="0.25" top="0" bottom="0.25"/>
                </Texture>
            </Layer>
            <Layer level="OVERLAY">
                <FontString parentKey="itemlevel" inherits="GameFontNormalSmall" justifyH="LEFT">
                    <Size x="100" y="10"/>
                    <Color r="1" g="1" b="1"></Color>
                    <Anchors>
                        <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" x="2" y="2"></Anchor>
                    </Anchors>
                </FontString>
                <Texture name="$parentRepair" hidden="true" parentKey="repairIcon" file="Interface/AddOns/GW2_UI/textures/globe/repair">
                    <Size x="20" y="20"></Size>
                    <Anchors>
                        <Anchor point="BOTTOMRIGHT" relativeTo="$parent" relativePoint="BOTTOMRIGHT" x="0" y="0"></Anchor>
                    </Anchors>
                    <TexCoords left="0" right="1" top="0.5" bottom="1"/>
                </Texture>
            </Layer>
        </Layers>
    </ItemButton>

    <ItemButton name="GwPaperDollBagItem" registerForClicks="LeftButtonDown, RightButtonDown" inherits="GwPaperDollButtonTemplate" virtual="true"/>

    <Button name="GwPaperDollOutFitListButton" inherits="GwCharacterMenuBlank" text="Not yet loaded" virtual="true">
        <Layers>
            <Layer>
                <Texture parentKey="ddbg" hidden="true" file="Interface\AddOns\GW2_UI\textures\character\menu-bg">
                    <Size x="32" y="30"></Size>
                    <Anchors>
                        <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT"></Anchor>
                        <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT"></Anchor>
                    </Anchors>
                </Texture>
            </Layer>
            <Layer level="OVERLAY" textureSubLevel="2">
                <Texture parentKey="SpecRing" atlas="equipmentmanager-spec-border" useAtlasSize="true">
                    <Anchors>
                        <Anchor point="TOPLEFT" x="35" y="-25"/>
                    </Anchors>
                </Texture>
            </Layer>
            <Layer level="OVERLAY" textureSubLevel="3">
                <Texture parentKey="SpecIcon">
                    <Size x="18" y="18"/>
                    <Anchors>
                        <Anchor point="CENTER" relativeKey="$parent.SpecRing" relativePoint="CENTER" x="0" y="0"/>
                    </Anchors>
                </Texture>
            </Layer>
        </Layers>
        <Frames>
            <Button name="$parentEquipOutfit" hidden="true" parentKey="equipOutfit" inherits="GwStandardButton" text="Equip">
                <Size x="60" y="20"></Size>
                <Anchors>
                    <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" x="5" y="5"></Anchor>
                </Anchors>
            </Button>
            <Button name="$parentSaveOutfit" hidden="true" parentKey="saveOutfit" inherits="GwStandardButton">
                <Size x="25" y="20"></Size>
                <Anchors>
                    <Anchor point="BOTTOMRIGHT" relativeKey="$parent.deleteOutfit" relativePoint="BOTTOMRIGHT" x="-65" y="5"></Anchor>
                </Anchors>
                <Layers>
                    <Layer level="OVERLAY">
                        <Texture parentKey="icon" file="Interface\BUTTONS\UI-CheckBox-Check">
                            <Size x="20" y="20"></Size>
                            <Anchors>
                                <Anchor point="CENTER" relativePoint="CENTER" x="0" y="0"></Anchor>
                            </Anchors>
                        </Texture>
                    </Layer>
                </Layers>
            </Button>
            <Frame name="$parentDropDownOutfitFrame" parentKey="DropDownOutfitFrame" inherits="UIDropDownMenuTemplate" id="1" hidden="true"/>
            <Button name="$parentEditOutfit" hidden="true" parentKey="editOutfit" inherits="GwStandardButton">
                <Size x="25" y="20"></Size>
                <Anchors>
                    <Anchor point="BOTTOMRIGHT" relativeKey="$parent.deleteOutfit" relativePoint="BOTTOMRIGHT" x="-35" y="5"></Anchor>
                </Anchors>
                <Layers>
                    <Layer level="OVERLAY">
                        <Texture parentKey="icon" file="Interface/AddOns/GW2_UI/textures/icons/MainMenuMicroButton-Up">
                            <Size x="20" y="20"></Size>
                            <Anchors>
                                <Anchor point="CENTER" relativePoint="CENTER" x="0" y="0"></Anchor>
                            </Anchors>
                        </Texture>
                    </Layer>
                </Layers>
            </Button>
            <Button name="$parentDelete" parentKey="deleteOutfit" hidden="true" inherits="GwStandardButton">
                <Size x="25" y="20"></Size>
                <Anchors>
                    <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="-5" y="5"></Anchor>
                </Anchors>
                <Layers>
                    <Layer level="OVERLAY">
                        <Texture parentKey="icon" file="Interface\BUTTONS\UI-StopButton">
                            <Size x="20" y="20"></Size>
                            <Anchors>
                                <Anchor point="CENTER" relativePoint="CENTER" x="0" y="0"></Anchor>
                            </Anchors>
                        </Texture>
                    </Layer>
                </Layers>
            </Button>
        </Frames>
    </Button>

    <Frame name="GwPaperDollBagItemList" hidden="true" virtual="true">
        <Size x="231" y="498"></Size>
        <Anchors>
            <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="10" y="-70"></Anchor>
        </Anchors>
        <Layers>
            <Layer level="ARTWORK">
                <Texture file="Interface\AddOns\GW2_UI\textures\character\item-selectbg">
                    <Size x="256" y="512"></Size>
                    <Anchors>
                        <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="0" y="0"></Anchor>
                    </Anchors>
                </Texture>
            </Layer>
        </Layers>
        <Frames>
            <Button name="$parentBackButton" parentKey="backButton" inherits="GwCharacterMenuButtonBack" text="Character: Equipment">
                <Size x="231" y="50"></Size>
                <Anchors>
                    <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT" x="0" y="60"></Anchor>
                </Anchors>
            </Button>
        </Frames>
    </Frame>

    <Button name="GwPaperDollOutfitsButton" inherits="GwPaperDollOutFitListButton" virtual="true">
        <Size x="220" y="49"></Size>
        <Anchors>
            <Anchor point="TOPLEFT" x="0" y="0"></Anchor>
        </Anchors>
        <Layers>
            <Layer level="OVERLAY">
                <Texture parentKey="icon" file="Interface\AddOns\GW2_UI\textures\character\slot-bg">
                    <Size x="49" y="49"></Size>
                    <Anchors>
                        <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="0" y="0"></Anchor>
                    </Anchors>
                    <TexCoords left="0.1" right="0.9" top="0.1" bottom="0.9"/>
                </Texture>
            </Layer>
        </Layers>
    </Button>

    <Frame name="GwPaperDollOutfits" hidden="true" virtual="true">
        <Size x="220" y="478"></Size>
        <Anchors>
            <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="13" y="-105"></Anchor>
        </Anchors>
        <Layers>
            <Layer level="ARTWORK">
                <Texture file="Interface\AddOns\GW2_UI\textures\character\item-selectbg">
                    <Size x="256" y="512"></Size>
                    <Anchors>
                        <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="-3" y="7"></Anchor>
                    </Anchors>
                </Texture>
            </Layer>
        </Layers>
        <Frames>
            <Button name="$parentBackButton" parentKey="backButton" inherits="GwCharacterMenuButtonBack" text="Character: Outfits">
                <Size x="231" y="50"></Size>
                <Anchors>
                    <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT" x="0" y="90"></Anchor>
                </Anchors>
            </Button>
            <Button name="$parentNewOutfit" parentKey="newOutfit" inherits="GwStandardButton" text="New outfit">
                <Size x="100" y="20"></Size>
                <Anchors>
                    <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" x="0" y="7"></Anchor>
                </Anchors>
            </Button>
        </Frames>
    </Frame>

    <Frame name="GwPaperTitles" hidden="true" virtual="true">
        <Size x="220" y="478"></Size>
        <Anchors>
            <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="13" y="-105"></Anchor>
        </Anchors>
        <Layers>
            <Layer level="ARTWORK">
                <Texture file="Interface\AddOns\GW2_UI\textures\character\item-selectbg">
                    <Size x="256" y="512"></Size>
                    <Anchors>
                        <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="-3" y="7"></Anchor>
                    </Anchors>
                </Texture>
            </Layer>
        </Layers>
        <Frames>
            <Button name="$parentBackButton" parentKey="backButton" inherits="GwCharacterMenuButtonBack" text="Character: Titles">
                <Size x="231" y="50"></Size>
                <Anchors>
                    <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT" x="0" y="90"></Anchor>
                </Anchors>
            </Button>
        </Frames>
    </Frame>

    <Button name="GwDressingRoom" enableMouse="true" registerForClicks="LeftButtonUp" virtual="true">
        <Size x="608" y="621"></Size>
        <Anchors>
            <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="245" y="-5"></Anchor>
        </Anchors>
        <Layers>
            <Layer level="ARTWORK">
                <Texture file="Interface\AddOns\GW2_UI\textures\character\paperdollbg">
                    <Size x="608" y="621"></Size>
                    <Anchors>
                        <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="0" y="0"></Anchor>
                    </Anchors>
                </Texture>
            </Layer>
            <Layer level="ARTWORK" textureSubLevel="2">
                <Texture parentKey="classIcon" alphaMode="ADD" file="Interface\AddOns\GW2_UI\textures\party\classicons">
                    <Size x="50" y="50"></Size>
                    <Anchors>
                        <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-145" y="-45"></Anchor>
                    </Anchors>
                </Texture>
            </Layer>
            <Layer level="OVERLAY">
                <FontString parentKey="characterName" text="Unknown" justifyH="LEFT">
                    <Size x="180" y="20"></Size>
                    <Anchors>
                        <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-10" y="-5"></Anchor>
                    </Anchors>
                </FontString>
                <FontString parentKey="characterData" text="Level %d class" justifyH="LEFT">
                    <Size x="180" y="40"></Size>
                    <Anchors>
                        <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-10" y="-17"></Anchor>
                    </Anchors>
                </FontString>

                <FontString parentKey="itemLevel" text="100" justifyH="LEFT">
                    <Size x="180" y="20"></Size>
                    <Anchors>
                        <Anchor point="LEFT" relativePoint="RIGHT" relativeKey="$parent.classIcon" x="10" y="0"></Anchor>
                    </Anchors>
                </FontString>
            </Layer>
        </Layers>
        <Frames>
            <Frame parentKey="itemLevelFrame" hidden="false">
                <Size x="180" y="20"></Size>
                <Anchors>
                    <Anchor point="LEFT" relativePoint="RIGHT" relativeKey="$parent.classIcon" x="10" y="0"></Anchor>
                </Anchors>
                <Scripts>
                    <OnEnter>
                        local avgItemLevel, avgItemLevelEquipped = GetAverageItemLevel()
                        local minItemLevel = C_PaperDollInfo.GetMinItemLevel()
                        local displayItemLevel = math.max(minItemLevel or 0, avgItemLevelEquipped)

                        displayItemLevel = floor(displayItemLevel)
                        avgItemLevel = floor(avgItemLevel)

                        self.tooltip = HIGHLIGHT_FONT_COLOR_CODE .. format(PAPERDOLLFRAME_TOOLTIP_FORMAT, STAT_AVERAGE_ITEM_LEVEL) .. " " .. avgItemLevel
                        if displayItemLevel ~= avgItemLevel then
                            self.tooltip = self.tooltip .. "  " .. format(STAT_AVERAGE_ITEM_LEVEL_EQUIPPED, avgItemLevelEquipped)
                        end
                        self.tooltip = self.tooltip .. FONT_COLOR_CODE_CLOSE
                        self.tooltip2 = STAT_AVERAGE_ITEM_LEVEL_TOOLTIP
                        if not self.tooltip then
                            return
                        end
                        GameTooltip:SetOwner(self, "ANCHOR_TOP")
                        GameTooltip:SetText(self.tooltip)
                        if self.tooltip2 then
                            GameTooltip:AddLine(self.tooltip2, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, true)
                        end
                        GameTooltip:Show()
                    </OnEnter>
                    <OnLeave function="GameTooltip_Hide"/>
                </Scripts>
            </Frame>
            <Frame parentKey="stats">
                <Size x="184" y="301"></Size>
                <Anchors>
                    <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-10" y="-105"></Anchor>
                </Anchors>
                <Layers>
                    <Layer level="ARTWORK">
                        <Texture file="Interface\AddOns\GW2_UI\textures\character\statsbg">
                            <Size x="256" y="512"></Size>
                            <Anchors>
                                <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="0" y="0"></Anchor>
                            </Anchors>
                        </Texture>
                    </Layer>
                    <Layer level="OVERLAY">
                        <FontString parentKey="header" text="Attributes" justifyH="LEFT">
                            <Size x="180" y="40"></Size>
                            <Anchors>
                                <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="8" y="2"></Anchor>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
            </Frame>
            <Frame name="$parentGear" parentKey="gear">
                <Size x="184" y="301"></Size>
                <Anchors>
                    <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="10" y="-10"></Anchor>
                    <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="-10" y="10"></Anchor>
                </Anchors>
            </Frame>
            <PlayerModel inherits="ModelWithZoomTemplate ModelWithControlsTemplate ModelTemplate" enableMouse="true" parentKey="model">
                <Size x="355" y="598"></Size>
                <Anchors>
                    <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" x="60" y="20"></Anchor>
                </Anchors>
            </PlayerModel>
        </Frames>
    </Button>

</Ui>
