I think you have a few things confused here:
A transformation is a record from a page type, which is repeated based on results found or returned from a data operation (query, web service call, etc.). This is typically a property of a webpart (transformation name, alternating transformation name, selected transformation name, etc.) For instance a list of events, there is typically a header or opening element (<ul>
, <table>
, etc.) and then the listing tags (<li>
, <tr>
, etc.). The <li>
or <tr>
elements would be part of the transformation.
In your webpart, the properties you specify are typically set in the code behind of the webpart. The properties will not be part of a transformation ever unless you were to code this within the webpart itself.
To answer your question, the best approach is to set this property would be to create a new webpart layout and specify the logic in your post as needed (minus the Eval()
because you're accessing a public property of the webpart). If your property HorizontalLayout
was a field in a page type, then you can use it in your transformation, but since it is not, your best bet as I mentioned, is to use a new webpart layout.