WoW Frames Tutorial (Frame 1)

In FaraFrames1.XML we add the next Frame, but it's not a real one yet, but a virtual one:

<Frame name="FaraFrames" hidden="true" virtual="true" parent="UIParent">
    <!-- set the size of the frame -->
    <Size>
      <AbsDimension x="200" y="200"/>
    </Size>

    <!-- set where the frame will be anchored -->
    <Anchors>
      <Anchor point="CENTER" />
    </Anchors>

    <!-- set the parameters for the layers of the frame -->
    <Layers>
      <Layer level="BACKGROUND">
        <Texture name="$parent_Background" setAllPoints="true">
                        <!-- Texture has blue color wit 50% alpha -->
          <Color r="0" g="0" b="1" a="0.5" />
        </Texture>
      </Layer>
    </Layers>
  </Frame>
 

Virtual means, that this Frame can't be used, but it's a kind of Template we can use in the Future.
This to save Text in the XML itself, we can create virtual frames, and buttons and other elements.

If a Name definition contains $parent it means it replaces that with the parents name. This is a good technique to use

The Frame is documented so you should understand most of the entries

But now we want our first frame to appear (let's have some action now)
we need to create an instance of the virtual frame FaraFrames
who we just have defined.

   <!-- FRAME 1 -->     
        <!-- we now create this frame, which innherits all of the virtual frame "FaraFrames" -->
    <!-- Additionally we add a Fontstring that is located at TOPLEFT -->
   <Frame name="FaraFrames1" hidden="true" inherits="FaraFrames">
    <!-- set the parameters for the layers of the frame -->
    <Layers>
      <Layer level="ARTWORK">
                <FontString name="$parent_Text" inherits="GameFontNormal" text="Hello World">
                        <Anchors><Anchor point="LEFT" relativePoint="TOPLEFT" /></Anchors>
                </FontString>
      </Layer>
    </Layers>
   </Frame>


We can now call it with /ff 1 ,and the result will look like this:



Note that we added a Fontstring, since it's not allowed to add a Fontstring directly to the Frame,
We have to nest it into Layers/Layer to make it work.

The Anchor below Fonstring is the Anchor Element that belongs to Fontstring ,it's not the same as the Anchor in the virtual Frame above.
They have the same name ,but because of their placement different Effects

You can think of it as follow:
Frame.Anchor
Frame.Layers.Layer["ARTWORK"].Anchor


Proceed to Frame 2