バージョン

回転器

Rotator 要素は、コンテンツを時計回りに 90 度または反時計回りに 90 度のいずれかに回転します。コンテンツは、デフォルトで反時計回りに回転されますが、Backward プロパティを True に設定することによって、コンテンツを時計回りに回転することができます。コンテンツを 90 度回転することだけが必要な場合には、Rotator 要素を使用してください。コンテンツを 45 度またはその他の任意の角度回転する必要がある場合には、Site 要素を使用する必要があります。Site 要素の詳細は、「サイト」を参照してください。

右側の画像では、Rotator 要素内に 2 つの Text 要素があります。最初の Rotator 要素は、Backward プロパティを True に設定することによって、テキストを時計回りに 90 度回転します。テキストが左揃えだったために、Stretcher 要素も必要でした。2 番目の Rotator 要素は最初の要素と正反対です。

以下のコードは、上記のスクリーンショットと同じようにレポートにページを作成します。

以下のテキストを使用して、string1 変数を設定します。

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.Donec imperdiet mattis sem.Nunc ornare elit at justo.In quam nulla, lobortis non, commodo eu, eleifend in, elit.Nulla eleifend.Nulla convallis.Sed eleifend auctor purus.Donec velit diam, congue quis, eleifend et, pretium id, tortor.Nulla semper condimentum justo.Etiam interdum odio ut ligula.Vivamus egestas scelerisque est. Donec accumsan.In est urna, vehicula non, nonummy sed, malesuada nec, purus.Vestibulum erat.Vivamus lacus enim, rhoncus nec, ornare sed, scelerisque varius, felis.Nam eu libero vel massa lobortis accumsan.Vivamus id orci.Sed sed lacus sit amet nibh pretium sollicitudin.Morbi urna.

C# の場合:

using Infragistics.Documents.Reports.Report;
...
string string1 = "Lorem ipsum...";

// Define a Rotator element and add it to a section.
Infragistics.Documents.Reports.Report.IRotator rotator1 = section1.AddRotator();

// Define a Text element and add it to the rotator.
// Add content to the Text element. You may replace
// 'string1' with some text.
Infragistics.Documents.Reports.Report.Text.IText rotatorText1 = rotator1.AddText();
rotatorText1.AddContent(string1);

// Set standard properties to help us see the rotator
// better. The Backward property flips the content 180
// degrees. The AddStretcher method stretches the content
// to the bottom (right side since it's rotated 90 degrees)
// of the content area.
rotator1.Backward = true;
rotator1.Background = new Background(Brushes.LightSteelBlue);
rotator1.Height = new RelativeHeight(50);
rotator1.Paddings.All = 10;
rotator1.Margins.All = 5;
rotator1.AddStretcher();

// Define another rotator, same as above. This time, the text
// will be rotated to the opposite direction and will be at the
// top (left side since it's rotated -90 degrees) of the content
// area.
Infragistics.Documents.Reports.Report.IRotator rotator2 = section1.AddRotator();

Infragistics.Documents.Reports.Report.Text.IText rotatorText2 = rotator2.AddText();
rotatorText2.AddContent(string1);

rotator2.Backward = false;
rotator2.Background = new Background(Brushes.LightSteelBlue);
rotator2.Height = new RelativeHeight(100);
rotator2.Paddings.All = 10;
rotator2.Margins.All = 5;

オンラインで表示: GitHub