Fixed automatic naming of visuals for non-native controls
Ensured Control::Background visual is named to "background" regardless.
During visual registration, a lookup of registered properties is attempted to
retrieve the name of the property and assign that name to the visual.
(Used by scripting and styling).
In the case of non-native controls, where they use ControlWrapper as
their gateway class, the typeid lookup cannot get past ControlWrapper,
so will currently fail to name the visuals.
Instead, changed the RegisterVisual method to call GetPropertyName() directly -
for the ControlWrapper case, the non-native type name has been set on this object,
and in the glue layer, any C# properties annotated with ScriptableProperties
will be registered with the same type name. Consequently, GetPropertyName() will
work as intended for non-native properties.
However, this has to be within a try-catch block, as it will assert if the
developer hasn't registered the property index, which is the case
for some native controls.
Change-Id: I8b92496a21d13e3696fb827e67586f92e9e0dffb
Signed-off-by: David Steele <david.steele@samsung.com>