On Live, you can add a TitleRegion to a frame as follows to get automatic draggability for that frame:
Code:
<Frame name="MyFrameTemplate" hidden="true" movable="true" toplevel="true" clampedToScreen="true" enableMouse="true" frameStrata="DIALOG" parent="UIParent" virtual="true">
<Size x="330"/>
<TitleRegion setAllPoints="true"/>
...
</Frame>
In Legion, this no longer works, but with a twist: If you do any of the following:
* Change the size or the scale of the parent in any way
while the parent is shown
* Call essentially ANY method on the TitleRegion (all those methods that are defined for Region, but not those defined for ParentedObject or UIObject),
it will cause it to start responding again. So, if you call :GetCenter(), for example, on your title region, it will start responding to drags again (even though you didn't (really) do anything to it).
This works in Legion, but is obviously pretty lame:
Code:
<Frame name="MyFrameTemplate" hidden="true" movable="true" toplevel="true" clampedToScreen="true" enableMouse="true" frameStrata="DIALOG" parent="UIParent" virtual="true">
<Size x="330"/>
<TitleRegion setAllPoints="true"/>
<Scripts>
<OnShow>
self:GetTitleRegion():GetCenter()
</OnShow>
</Scripts>
</Frame>