or
Text="{Binding Path=Content.Field.Value}" |
Text="{Binding Path=DataContext.Price, Mode=TwoWay, Converter = {StaticResource CentPriceConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:GridViewRow}}}" |
<ControlTemplate x:Key="PriceExpandedCell" TargetType="telerik:GridViewCell"> |
<Border Name="Part_Border" |
CornerRadius="0" |
Loaded="Part_Border_Loaded" |
Height="Auto" |
BorderBrush="{StaticResource SolidBorderBrush}" |
VerticalAlignment="Stretch"> |
<StackPanel Name="Part_StackPanel" |
ScrollViewer.VerticalScrollBarVisibility="Hidden" |
Orientation="Vertical" |
Background="{Binding Path=Background, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:GridViewRow}}}"> |
<TextBox Name="Part_Text" |
Width="Auto" |
BorderThickness="0" |
Background="Transparent" |
Margin="2,2,2,2" |
TextChanged="Part_Text_TextChanged" |
Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:GridViewRow}}}" |
Text="{Binding Path=DataContext.Price, Mode=TwoWay, Converter = {StaticResource CentPriceConverter}, |
RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:GridViewRow}}}"/> |
<Button Content="Discount" Margin="15,3,3,3" |
Name="btnDiscount" |
Click="btnDiscount_Click" |
HorizontalAlignment="Left" |
Style="{StaticResource CompactButton}"/> |
</StackPanel> |
</Border> |
<ControlTemplate.Triggers> |
<DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:GridViewRow}}}" Value="True"> |
<Setter TargetName="Part_StackPanel" Property="Background" Value="{StaticResource HighlightGradientBrush}"/> |
</DataTrigger> |
<Trigger Property="IsInEditMode" Value="True"> |
<Setter TargetName="Part_Border" Property="BorderThickness" Value="3"/> |
<Setter TargetName="Part_StackPanel" Property="Background" Value="{StaticResource LightBlueBrush}"/> |
</Trigger> |
</ControlTemplate.Triggers> |
</ControlTemplate> |
private
void
LoadFile(String filePath)
{
documentStream =
new
FileStream(filePath, FileMode.Open);
var doc =
new
PdfFormatProvider(documentStream, FormatProviderSettings.ReadOnDemand).Import();
book.ItemsSource = doc.Pages;
}
<
DataTemplate
x:Key
=
"PageTemplate"
>
<
Viewbox
>
<
Grid
>
<
ui:FixedDocumentSinglePagePresenter
Page
=
"{Binding}"
Width
=
"500"
Height
=
"500"
/>
<
hosts:DrawingCanvas
Width
=
"500"
Height
=
"500"
Margin
=
"15"
Background
=
"#00000000"
/>
</
Grid
>
</
Viewbox
>
</
DataTemplate
>
And when trying to use the RadBook.ItemContainerGenerator the problem is that myBook.ItemContainerGenerator.ContainerFromIndex(leftPageInd) returns null,
and I also tried to use the book.Items property, but my Items type are RadFixedPage (because I've set ItemsSource of book to PdfFormatProvider's Pages property) and I don't know how can I use it to get my DrawingCanvas.
Regards, Vahid
<
Style
TargetType
=
"telerik:RadWatermarkTextBox"
x:Key
=
"RadWatermark"
>
<
Style.Triggers
>
<
DataTrigger
Binding
=
"{Binding Path=IsActive}"
Value
=
"False"
>
<
Setter
Property
=
"TextBlock.Foreground"
Value
=
"Red"
/>
<
Setter
Property
=
"TextBlock.Background"
Value
=
"LightYellow"
/>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>
<
Style
TargetType
=
"telerik:RadWatermarkTextBox"
x:Key
=
"RadWatermark"
>
<
Style.Triggers
>
<
DataTrigger
Binding
=
"{Binding Path=IsActive}"
Value
=
"False"
>
<
Setter
Property
=
"TextBlock.Foreground"
Value
=
"Red"
/>
<
Setter
Property
=
"TextBlock.Background"
Value
=
"LightYellow"
/>
<
Setter
Property
=
"Background"
Value
=
"LightYellow"
/>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>