Inlines

Inlines text content for Title element.

 

Type: ObservableCollection<System.Windows.Documents.Inline>

Namespace: Visifire.Charts

Assembly:

Silverlight:

SLVisifire.Charts (in SLVisifire.Charts.dll)

WPF:

WPFVisifire.Charts (in WPFVisifire.Charts.dll)

 

This attribute applies to:

 

Syntax:

<vc:Chart ... >

<vc:Chart.Titles>

 

<vc:Title FontFamily="Arial" FontSize="14">

         <vc:Title.Inlines>

                    <Run Foreground="Red" Text="Athens "></Run>

                    <Run Foreground="Green" FontWeight="Bold" Text="2004 "> </Run>

                    <Run Foreground="Blue"  TextDecorations="Underline" Text="Olympics"></Run>

         </vc:Title.Inlines>

</vc:Title>

 

</vc:Chart.Titles>

</vc:Chart>

 

Sample code for creating Run elements in Inlines collection:

 

VB:

 

        'Creating Title object

        Dim title As New Title() With { _

         .FontFamily = New System.Windows.Media.FontFamily("Arial"), _

         .FontSize = 14 _

        }

 

        ' Create Run object

        Dim runElement1 As New Run() With { _

         .Foreground = New SolidColorBrush(Colors.Red), _

         .Text = "Athens " _

        }

 

        ' Add Run element in InlinesCollection

        title.Inlines.Add(runElement1)

 

        ' Create Run object

        Dim runElement2 As New Run() With { _

         .Foreground = New SolidColorBrush(Colors.Green), _

         .FontWeight = FontWeights.Bold, _

         .Text = "2004 " _

        }

 

        ' Add Run element in InlinesCollection

        title.Inlines.Add(runElement2)

 

        ' Create Run object

        Dim runElement3 As New Run() With { _

         .Foreground = New SolidColorBrush(Colors.Blue), _

         .TextDecorations = TextDecorations.Underline, _

         .Text = "Olympics" _

        }

 

        ' Add Run element in InlinesCollection

        title.Inlines.Add(runElement3)

 

        ' Add title into the Titles collectioin of Chart

        MyChart.Titles.Add(title)

 

C#

 

           // Creating Title object

            Title title = new Title()

            {

                FontFamily= new System.Windows.Media.FontFamily("Arial"),

                FontSize=14

            };

            

            // Creating Run object

            Run runElement1 = new Run()

            {

                Foreground= new SolidColorBrush(Colors.Red),

                Text="Athens "

            };

           

            // Add Run element in InlinesCollection

            title.Inlines.Add(runElement1);

 

            Run runElement2 = new Run()

            {

                Foreground= new SolidColorBrush(Colors.Green),

                FontWeight= FontWeights.Bold,

                Text="2004 "

            };

 

            // Add Run element in InlinesCollection

            title.Inlines.Add(runElement2);

 

            // Add Run element in InlinesCollection

            Run runElement3 = new Run()

            {

                Foreground= new SolidColorBrush(Colors.Blue),

                TextDecorations= TextDecorations.Underline,

                Text="Olympics"

            };

 

            // Add Run element in InlinesCollection

            title.Inlines.Add(runElement3);

 

            // Add title into the Titles collectioin of Chart

            MyChart.Titles.Add(title);

 

 

 

Below is the chart after setting Inlines property in Title.

 

 

 

Remarks:

    1. Text property has higher precedence than Inlines property. If Text and Inlines both properties are set then Text property will be considered while displaying content of the Title.