or
01.
HyperlinkRangeStart hyperlinkStart =
new
HyperlinkRangeStart();
02.
HyperlinkRangeEnd hyperlinkEnd =
new
HyperlinkRangeEnd();
03.
hyperlinkEnd.PairWithStart(hyperlinkStart);
04.
HyperlinkInfo hyperlinkInfo =
new
HyperlinkInfo() { NavigateUri = hrefURL, Target = HyperlinkTargets.Blank };
05.
hyperlinkStart.HyperlinkInfo = hyperlinkInfo;
06.
07.
ImageInline image =
new
ImageInline();
08.
image.UriSource =
new
Uri(linkFormatter.FormatAllImageHyperlink(link));
09.
image.Size =
new
Size(16, 16);
10.
11.
Telerik.Windows.Documents.Model.Paragraph activeParagraph = Document.CaretPosition.GetCurrentParagraphBox().AssociatedParagraph;
12.
DocumentElementCollection docElemColl =
new
DocumentElementCollection(activeParagraph);
13.
docElemColl.Add(hyperlinkStart);
14.
docElemColl.Add(image);
15.
docElemColl.Add(hyperlinkEnd);
16.
radRichTextBox.InsertHyperlink(hyperlinkStart.HyperlinkInfo,
new
Telerik.Windows.Documents.Model.InlineCollection(docElemColl));
17.
18.
//activeParagraph.Inlines.Add(hyperlinkStart);
19.
//activeParagraph.Inlines.Add(image);
20.
//activeParagraph.Inlines.Add(hyperlinkEnd);
21.
22.
//Telerik.Windows.Documents.Model.Inline inline = Document.CaretPosition.GetCurrentInline();
23.
//inline.Children.Add(hyperlinkStart);
24.
//inline.Children.Add(image);
25.
//inline.Children.Add(hyperlinkEnd);
<
scj:scjListBox
Visibility
=
"Visible"
Grid.Column
=
"2"
x:Name
=
"lstItemsSmall"
ItemsSource
=
"{Binding Path=Modeles}"
Style
=
"{DynamicResource ModelesStyleSmall}"
Background
=
"#FF525252"
>
<
scj:scjListBox.ItemsPanel
>
<
ItemsPanelTemplate
>
<
scj:scjVirtualizingWrapPanel
ItemWidth
=
"300"
ItemHeight
=
"300"
></
scj:scjVirtualizingWrapPanel
>
</
ItemsPanelTemplate
>
</
scj:scjListBox.ItemsPanel
>
</
scj:scjListBox
>
<
Style
TargetType
=
"scj:scjListBox"
x:Key
=
"ModelesStyleSmall"
>
<
Setter
Property
=
"ItemContainerStyle"
>
<
Setter.Value
>
<
Style
TargetType
=
"telerik:RadListBoxItem"
>
<
Setter
Property
=
"HorizontalContentAlignment"
Value
=
"Stretch"
/>
<
Setter
Property
=
"VerticalContentAlignment"
Value
=
"Stretch"
/>
<
Setter
Property
=
"Background"
Value
=
"Transparent"
/>
<
Setter
Property
=
"BorderBrush"
Value
=
"Transparent"
/>
<
Setter
Property
=
"BorderThickness"
Value
=
"0"
/>
<
Setter
Property
=
"Foreground"
Value
=
"White"
/>
<
Setter
Property
=
"FontSize"
Value
=
"12"
/>
<
Setter
Property
=
"Padding"
Value
=
"0"
/>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"telerik:RadListBoxItem"
>
<
Border
CornerRadius
=
"5"
BorderBrush
=
"#FF565656"
BorderThickness
=
"1"
Margin
=
"5"
Padding
=
"5"
Background
=
"#FF606060"
>
<
Grid
>
<
ContentPresenter
x:Name
=
"HeaderElement"
HorizontalAlignment
=
"Center"
VerticalAlignment
=
"Center"
Margin
=
"0,0"
ContentTemplate
=
"{StaticResource ProduitsDataTemplateSmall}"
/>
</
Grid
>
</
Border
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
</
Setter.Value
>
</
Setter
>
</
Style
>
<
DataTemplate
x:Key
=
"ProduitsDataTemplateSmall"
>
<
scj:scjGrid
Height
=
"280"
Width
=
"280"
>
<
scj:scjGrid.RowDefinitions
>
<
RowDefinition
Height
=
"200"
></
RowDefinition
>
<
RowDefinition
Height
=
"Auto"
></
RowDefinition
>
<
RowDefinition
Height
=
"50"
></
RowDefinition
>
</
scj:scjGrid.RowDefinitions
>
<
scj:scjGrid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"1*"
></
ColumnDefinition
>
<
ColumnDefinition
Width
=
"1*"
></
ColumnDefinition
>
<
ColumnDefinition
Width
=
"1*"
></
ColumnDefinition
>
</
scj:scjGrid.ColumnDefinitions
>
<
Image
Grid.Row
=
"0"
Grid.ColumnSpan
=
"3"
Source
=
"{Binding Path=ImagePhoto}"
></
Image
>
<
scj:scjTextBlock
Grid.Row
=
"1"
Grid.ColumnSpan
=
"3"
NoTranslate
=
"True"
Text
=
"{Binding Path=DisplayCodeName}"
TextWrapping
=
"Wrap"
HorizontalAlignment
=
"Left"
></
scj:scjTextBlock
>
<
scj:scjButton
Grid.Row
=
"2"
Grid.Column
=
"0"
NoTranslate
=
"True"
Style
=
"{StaticResource ButtonStyle}"
Click
=
"btnPanier_Click"
Tag
=
"{Binding Path=sIdModele, Mode=OneWay}"
>
<
Image
Source
=
"Images/panier_ajout.png"
Width
=
"32"
Height
=
"32"
></
Image
>
</
scj:scjButton
>
<
scj:scjButton
Grid.Row
=
"2"
Grid.Column
=
"1"
NoTranslate
=
"True"
Style
=
"{StaticResource ButtonStyle}"
Click
=
"btnLoupe_Click"
Tag
=
"{Binding Path=sIdModele, Mode=OneWay}"
>
<
Image
Source
=
"Images/loupe.png"
Height
=
"32"
Width
=
"32"
></
Image
>
</
scj:scjButton
>
<
scj:scjCheckBox
Grid.Row
=
"2"
Grid.Column
=
"2"
x:Name
=
"chkStatut"
NoTranslate
=
"True"
BorderBrush
=
"Black"
BorderThickness
=
"0.3"
Checked
=
"chkStatut_Checked"
Unchecked
=
"chkStatut_Checked"
HorizontalAlignment
=
"Center"
VerticalAlignment
=
"Center"
>
<
scj:scjCheckBox.LayoutTransform
>
<
ScaleTransform
ScaleX
=
"3"
ScaleY
=
"3"
></
ScaleTransform
>
</
scj:scjCheckBox.LayoutTransform
>
</
scj:scjCheckBox
>
</
scj:scjGrid
>
</
DataTemplate
>