<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">
    <Script file="BankFrame.lua"/>
	<Button name="BankItemButtonGenericTemplate" inherits="ItemButtonTemplate" virtual="true">
		<Frames>
			<Cooldown name="$parentCooldown" inherits="CooldownFrameTemplate"/>
		</Frames>
		<Scripts>
			<OnLoad>
				BankFrameItemButton_OnLoad(self);
			</OnLoad>
			<OnEnter>
				BankFrameItemButton_OnEnter(self);
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide();
				ResetCursor();
			</OnLeave>
			<OnClick>
				if ( IsModifiedClick() ) then
					BankFrameItemButtonGeneric_OnModifiedClick(self, button);
				else
					BankFrameItemButtonGeneric_OnClick(self, button);
				end
			</OnClick>
            <OnDragStart>
                BankFrameItemButtonGeneric_OnClick(self, "LeftButton");
            </OnDragStart>
            <OnReceiveDrag>
                BankFrameItemButtonGeneric_OnClick(self, "LeftButton");
            </OnReceiveDrag>
		</Scripts>
	</Button>
	<Button name="BankItemButtonBagTemplate" inherits="ItemButtonTemplate" virtual="true">
		<Frames>
			<Cooldown name="$parentCooldown" inherits="CooldownFrameTemplate"/>
			<Frame name="$parentHighlightFrame" setAllPoints="true">
				<Layers>
					<Layer>
						<Texture name="$parentTexture" alphaMode="ADD" file="Interface\Buttons\CheckButtonHilight" setAllPoints="true" hidden="true"/>
					</Layer>
				</Layers>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad>
				BankFrameBagButton_OnLoad(self);
			</OnLoad>
			<OnEnter>
				BankFrameItemButton_OnEnter(self);
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide();
				ResetCursor();
			</OnLeave>
			<OnClick>
				if ( IsModifiedClick("PICKUPACTION") ) then
					BankFrameItemButtonBag_Pickup(self);
				else
					BankFrameItemButtonBag_OnClick(self, button);
				end
			</OnClick>
	        <OnDragStart>
				BankFrameItemButtonBag_Pickup(self);
			</OnDragStart>
	        <OnReceiveDrag>
	            BankFrameItemButtonBag_OnClick(self);
	        </OnReceiveDrag>
		</Scripts>
	</Button>


	<Frame name="BankFrame" toplevel="true" movable="true" enableMouse="true" hidden="true" parent="UIParent">
		<Size>
			<AbsDimension x="425" y="512"/>
		</Size>
		<Anchors>
			<Anchor point="TOPLEFT">
				<Offset>
					<AbsDimension x="0" y="-104"/>
				</Offset>
			</Anchor>
		</Anchors>
		<HitRectInsets>
			<AbsInset left="0" right="30" top="0" bottom="70"/>
		</HitRectInsets>
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="BankPortraitTexture">
					<Size>
						<AbsDimension x="60" y="60"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
                                <AbsDimension x="7" y="-6"/>
							</Offset>
						</Anchor>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BORDER">
				<Texture file="Interface\BankFrame\UI-BankFrame">
					<Size>
						<AbsDimension x="512" y="512"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT"/>
					</Anchors>
				</Texture>
				<FontString name="BankFrameTitleText" inherits="GameFontHighlight">
					<Anchors>
						<Anchor point="CENTER">
							<Offset>
								<AbsDimension x="-3" y="233"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString inherits="GameFontNormal" text="ITEMSLOTTEXT">
					<Anchors>
						<Anchor point="CENTER">
							<Offset>
								<AbsDimension x="-3" y="200"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString inherits="GameFontNormal" text="BAGSLOTTEXT">
					<Anchors>
						<Anchor point="CENTER">
							<Offset>
								<AbsDimension x="-3" y="-2"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name="BankCloseButton" inherits="UIPanelCloseButton">
				<Anchors>
					<Anchor point="TOPRIGHT" relativeTo="BankFrame" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="-22" y="-8"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem1" inherits="BankItemButtonGenericTemplate" id="1">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="40" y="-73"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem2" inherits="BankItemButtonGenericTemplate" id="2">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem1" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem3" inherits="BankItemButtonGenericTemplate" id="3">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem2" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem4" inherits="BankItemButtonGenericTemplate" id="4">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem3" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem5" inherits="BankItemButtonGenericTemplate" id="5">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem4" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem6" inherits="BankItemButtonGenericTemplate" id="6">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem5" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem7" inherits="BankItemButtonGenericTemplate" id="7">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem6" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem8" inherits="BankItemButtonGenericTemplate" id="8">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem1" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-7"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem9" inherits="BankItemButtonGenericTemplate" id="9">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem8" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem10" inherits="BankItemButtonGenericTemplate" id="10">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem9" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem11" inherits="BankItemButtonGenericTemplate" id="11">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem10" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem12" inherits="BankItemButtonGenericTemplate" id="12">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem11" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem13" inherits="BankItemButtonGenericTemplate" id="13">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem12" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem14" inherits="BankItemButtonGenericTemplate" id="14">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem13" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem15" inherits="BankItemButtonGenericTemplate" id="15">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem8" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-7"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem16" inherits="BankItemButtonGenericTemplate" id="16">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem15" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem17" inherits="BankItemButtonGenericTemplate" id="17">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem16" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem18" inherits="BankItemButtonGenericTemplate" id="18">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem17" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem19" inherits="BankItemButtonGenericTemplate" id="19">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem18" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem20" inherits="BankItemButtonGenericTemplate" id="20">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem19" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem21" inherits="BankItemButtonGenericTemplate" id="21">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem20" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem22" inherits="BankItemButtonGenericTemplate" id="22">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem15" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-7"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem23" inherits="BankItemButtonGenericTemplate" id="23">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem22" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem24" inherits="BankItemButtonGenericTemplate" id="24">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem23" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem25" inherits="BankItemButtonGenericTemplate" id="25">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem24" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem26" inherits="BankItemButtonGenericTemplate" id="26">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem25" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem27" inherits="BankItemButtonGenericTemplate" id="27">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem26" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameItem28" inherits="BankItemButtonGenericTemplate" id="28">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem27" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>


			<Button name="BankFrameBag1" inherits="BankItemButtonBagTemplate" id="5">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameItem22" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-32"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameBag2" inherits="BankItemButtonBagTemplate" id="6">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameBag1" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameBag3" inherits="BankItemButtonBagTemplate" id="7">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameBag2" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameBag4" inherits="BankItemButtonBagTemplate" id="8">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameBag3" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameBag5" inherits="BankItemButtonBagTemplate" id="9">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameBag4" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameBag6" inherits="BankItemButtonBagTemplate" id="10">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameBag5" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="BankFrameBag7" inherits="BankItemButtonBagTemplate" id="11">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="BankFrameBag6" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="12" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Frame name="BankFramePurchaseInfo" hidden="false">
				<Size>
					<AbsDimension x="380" y="72"/>
				</Size>
				<Anchors>
					<Anchor point="CENTER" relativeTo="BankFrame" relativePoint="CENTER">
						<Offset>
							<AbsDimension x="-23" y="-105"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<FontString inherits="GameFontHighlight" text="BANKSLOTPURCHASE_LABEL" justifyH="LEFT">
							<Size>
								<AbsDimension x="380" y="0"/>
							</Size>
							<Anchors>
								<Anchor point="CENTER">
									<Offset>
										<AbsDimension x="42" y="20"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
						<FontString name="BankFrameSlotCost" inherits="GameFontNormal" text="COSTS_LABEL">
							<Size>
								<AbsDimension x="0" y="12"/>
							</Size>
							<Anchors>
								<Anchor point="LEFT" relativePoint="LEFT">
									<Offset>
										<AbsDimension x="45" y="-10"/>
									</Offset>
								</Anchor>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<Button name="BankFramePurchaseButton" inherits="UIPanelButtonTemplate" virtual="true" text="BANKSLOTPURCHASE">
						<Size>
							<AbsDimension x="124" y="21"/>
						</Size>
						<Anchors>
							<Anchor point="RIGHT" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="-10" y="-10"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnClick>
								PlaySound("igMainMenuOption");
								StaticPopup_Show("CONFIRM_BUY_BANK_SLOT");
							</OnClick>
						</Scripts>
					</Button>
					<Frame name="BankFrameDetailMoneyFrame" inherits="SmallMoneyFrameTemplate" hidden="false">
						<Anchors>
							<Anchor point="LEFT" relativeTo="BankFrameSlotCost" relativePoint="RIGHT">
								<Offset>
									<AbsDimension x="10" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								SmallMoneyFrame_OnLoad(self);
								MoneyFrame_SetType(self, "STATIC");
							</OnLoad>
						</Scripts>
					</Frame>
				</Frames>
			</Frame>
			<Frame name="BankFrameMoneyFrame" inherits="SmallMoneyFrameTemplate" hidden="false">
				<Anchors>
					<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="-30" y="103"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad>
				BankFrame_OnLoad(self);
			</OnLoad>
			<OnEvent>
				BankFrame_OnEvent(self, event, ...);
			</OnEvent>
			<OnShow>
				BankFrame_OnShow(self);
			</OnShow>
			<OnHide>
				BankFrame_OnHide(self);
			</OnHide>
		</Scripts>
	</Frame>
</Ui>
