title: How to get property values by name
body: <p>I have a class with some published properties that I want to list.
  The properties are of type TcxCustomStyle which are from DevExpress styling.
  I use the following code to add the names to a memdata table and if I remove all the TcxCustomStyle related it works OK.</p>
  
  <p>The question is how do I get the value of a property that is of type TcxCustomStyle?</p>
  
  <p>Most likely it is simple error by my side - but I can't figure out what.</p>
  
  <pre><code>procedure TfrmMain.ListProperties;
  var
    ctx: TRttiContext;
    rType: TRttiType;
    rProp: TRttiProperty;
    i: integer;
    Value: TcxCustomStyle;
  begin
    i := 1;
    memProperties.DisableControls;
    try
      memProperties.Close;
      memProperties.Open;
  
      rType := ctx.GetType(Settings.Styling.ClassType);
      for rProp in rType.GetProperties do
        begin
          Value := TcxCustomStyle(rProp.GetValue(Self).AsObject);
          memProperties.AppendRecord([i, rProp.Name, Value.Name]);
          Inc(i);
        end;
  
    finally
      ctx.Free;
      memProperties.EnableControls;
    end;
  end;
  </code></pre>