You can set anchors on the Base pane of the custom view, as the base pane can contain many views it is up to the developer to control the content in the Base_Resize sub. Or with a layout loaded into the Base.
If you have wrapped a view and only want to control that, it's as simple as:
Sub Base_Resize(Width As Double,Height As Double)
MyView.PrefWidth = Width
MyView.PrefHeight = Height
End Sub
Or it's JavaObject equivalent.