Pan and Text Selection buttons

3 posts, 1 answers
  1. Seth
    Seth avatar
    5 posts
    Member since:
    Oct 2012

    Posted 12 Dec 2012 Link to this post

    I know that since Q2 RadPdfViewer has a new property called Mode for choosing between pan and text selection. However the example in http://www.telerik.com/help/wpf/radpdfviewer-wiring-ui.html seems to use an old way. (It also doesn't have the example for text selection or find in the xaml even though the find is in the provided code behind).

    It is probably just because I am new to WPF but I can't figure out what to do in the xaml. Could someone give me an updated example? Thanks.
  2. Answer
    Kammen
    Admin
    Kammen avatar
    312 posts

    Posted 13 Dec 2012 Link to this post

    Hi Seth,

    You can find the XAML example in our online demo. It is almost identical in WPF and Silverlight.

    Here is a sample code that will add both Pan and TextSelection modes to your RadToolBar:

    <telerik:RadToggleButton IsChecked="{Binding FixedDocumentViewer.Mode, Mode=TwoWay, Converter={StaticResource ModeConverter}, ConverterParameter=Pan}" Margin="2" Padding="0" IsBackgroundVisible="False" HorizontalAlignment="Left" VerticalAlignment="Stretch">
                    <ToolTipService.ToolTip>
                        <TextBlock Text="Pan" />
                    </ToolTipService.ToolTip>
                    <Image Source="/Telerik.Windows.Controls.FixedDocumentViewers;component/Images/hand-free.png" Stretch="None" />
                </telerik:RadToggleButton>
      
                <telerik:RadToggleButton IsChecked="{Binding FixedDocumentViewer.Mode, Mode=TwoWay, Converter={StaticResource ModeConverter}, ConverterParameter=TextSelection}" Margin="2" Padding="0" IsBackgroundVisible="False" HorizontalAlignment="Left" VerticalAlignment="Stretch">
                    <ToolTipService.ToolTip>
                        <TextBlock Text="Text Selection" />
                    </ToolTipService.ToolTip>
                    <Image Source="/Telerik.Windows.Controls.FixedDocumentViewers;component/Images/text-selection.png" Stretch="None" />
    </telerik:RadToggleButton>

    We made sure to update the documentation on this topic and it will be uploaded next week. You can check the latest additions to the documentation in these blog posts.
     
    All the best,
    Kammen
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Seth
    Seth avatar
    5 posts
    Member since:
    Oct 2012

    Posted 20 Dec 2012 Link to this post

    Sorry for the belated reply but thank you the updated documentation fixed me up.
Back to Top