DModelPanel:Center() does not center inside a DFrame:Dock( FILL )

I think the title explains the problem quite well.

It looks like that using Center() does not center the DModelPanel inside my DFrame that is filled automatically using the Dock.


local fill = vgui.Create( "DFrame", inside ) 
        fill:SetPos(0,0)
        fill:SetVisible(true)
	fill:SetSize(0,100)
	fill:Dock( FILL )
	fill:DockMargin(5,5,5,5)
	fill:ShowCloseButton(false)
	fill:SetTitle("FILLED IN")

	local ingameviewer = vgui.Create( "DModelPanel", fill )
	ingameviewer:SetPos(0,0)
	ingameviewer:SetSize( 200, 200 )
	ingameviewer:SetModel( LocalPlayer():GetModel()
	function ingameviewer:LayoutEntity( Entity ) return end
	function ingameviewer.Entity:GetPlayerColor() return Vector ( 1, 1, 1 ) end

This code gives ->

Now using Center() ;


local fill = vgui.Create( "DFrame", inside )
        fill:SetPos(0,0)
        fill:SetVisible(true)
	fill:SetSize(0,100)
	fill:Dock( FILL )
	fill:DockMargin(5,5,5,5)
	fill:ShowCloseButton(false)
	fill:SetTitle("FILLED IN")

	local ingameviewer = vgui.Create( "DModelPanel", fill )
	ingameviewer:SetPos(0,0)
	ingameviewer:SetSize( 200, 200 )
	ingameviewer:SetModel( LocalPlayer():GetModel() )
	ingameviewer:Center()
	function ingameviewer:LayoutEntity( Entity ) return end
	function ingameviewer.Entity:GetPlayerColor() return Vector ( 1, 1, 1 ) end

It shows ->

Any ideas?

Remove SetPos, Size and Center and replace it with Dock( FILL )

That worked! Thanks a lot @keeperman