This is a migrated thread and some comments may be shown as answers.

PDFViewer Toolbar ComboBox

1 Answer 163 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Victor
Top achievements
Rank 1
Victor asked on 05 Jun 2012, 04:19 PM
Hello,

I am not able to bind the PDFViewer Command for setting the Scale Factor with a regular ComboBox like so:

<Button
  Command="{Binding ZoomInCommand}">
  <Image Source="/Telerik.Windows.Controls.FixedDocumentViewers;component/Images/zoom-in.png" Stretch="None" />
</Button>

<Button
  Command="{Binding ZoomOutCommand}">
  <Image Source="/Telerik.Windows.Controls.FixedDocumentViewers;component/Images/zoom-out.png"
              Stretch="None" />
</Button>

<ComboBox
  Margin="2"
  Height="Auto"
  SelectedIndex="4"
  Text="{ Binding Path=FixedDocumentViewer.ScaleFactor,
              Converter={StaticResource doubleToStringPercentConverter},
              Mode=TwoWay}">
              <ComboBoxItem Content="25%" />
               <ComboBoxItem Content="50%" />
               <ComboBoxItem Content="100%" />
               <ComboBoxItem Content="150%" />
               <ComboBoxItem Content="200%" />
               <ComboBoxItem Content="500%" />
</ComboBox>

When I click on one of the Buttons the document change it size but the new scale factor is not shown in the ComboBox - except 100.

I am using the PDF Viewer Control inside a WPF User Control - if I am using the Control directly inside the WPF window it works like int the WPF demo.

May be I am missing a reference in the main project?

Regards,
Peter

 

1 Answer, 1 is accepted

Sort by
0
Kammen
Telerik team
answered on 07 Jun 2012, 03:30 PM
Hi Victor,

The problem may be due to the fact that the buttons change the scale factor to a value that may not be included in the combo box. You can verify that by adding a TextBox bound to the scale factor of the editor and see the value of the property.

When it comes to the references you have mentioned, RadPdfViewer version 2012.1.326 requires the following assemblies:
  • Telerik.Windows.Controls.dll
  • Telerik.Windows.Controls.Input.dll 
  • Telerik.Windows.Controls.FixedDocumentViewers.dll
  • Telerik.Windows.Documents.Fixed.dll
  • Telerik.Windows.Zip.dll
If this does not help, we will appreciate if you could send us a demo application attached to a support ticket to better understand the problem. 

Kind regards,
Kammen
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
PDFViewer
Asked by
Victor
Top achievements
Rank 1
Answers by
Kammen
Telerik team
Share this question
or