Hi,
I am using telerik PDF viewer in my wpf application, i am following MVVM pattern to bind pdf to pdf viewer control. I have a PDF content as byte array which on load will be read into memory stream and then loaded to PDF document (code given below).
pdf is loading perfectly and i am able to get the selected page, selected content and i am also able to save the start & end of the previous selection and apply the same back on the pdf.
currently i am trying to reload a new pdf content and apply the saved selection indexes (start and end) and extract the text between the indexes.
my application runs in background (no ui controls) and the pdf content (byte[]) is fetched from an API and this new content must be loaded to pdfdocument (Telerik.Windows.Documents.Fixed.PdfDocumentSource) and the saved indexes must be re applied and the content between the selected region must be extracted.
problem is when i load the byte[] then there is no error but the documentsource.Document is null . how do i get this working ? can i apply the selection indexes to Fixed.PdfDocumentSource and read selection content.
below is the code that i am using.
Note: i am passing command descriptors to viewmodel constructor.
<telerik:RadPdfViewer x:Name="pdfViewer" RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="1" DocumentSource="{Binding PDFDocument,Mode=TwoWay}" Mode="TextSelection">
</telerik:RadPdfViewer>
private Telerik.Windows.Documents.Fixed.PdfDocumentSource _PDFDocument;
/// <summary>
/// Pdf Document Source
/// </summary>
public Telerik.Windows.Documents.Fixed.PdfDocumentSource PDFDocument {
get {
return _PDFDocument;
}
set {
_PDFDocument = value;
OnPropertyChanged("PDFDocument");
}
}
/// <summary>
///
/// </summary>
private void LoadPDFDocument(byte[] pdfdata) {
if (pdfdata != null) {
MemoryStream DocumentStream = new MemoryStream(pdfdata);
Telerik.Windows.Documents.Fixed.FormatProviders.FormatProviderSettings settings = new Telerik.Windows.Documents.Fixed.FormatProviders.FormatProviderSettings(Telerik.Windows.Documents.Fixed.FormatProviders.ReadingMode.OnDemand);
PDFDocument = new Telerik.Windows.Documents.Fixed.PdfDocumentSource(DocumentStream, settings);
}
}

I have implemented load/save layout based on the examples on your Github page:
using (FileStream layoutFile = new FileStream(Path.Combine(DockingLayoutPath, DockingLayoutFileName), FileMode.Open)){ radDocking.LoadLayout(layoutFile);}
using (FileStream layoutFile = new FileStream(Path.Combine(DockingLayoutPath, DockingLayoutFileName),FileMode.Create)){ radDocking.SaveLayout(layoutFile);}
I have datagrids inside my radpanes. When I do not load the layout the datagrid width will track the width of the radpane when resized. However when I save/load layout the datagrid will no longer track the radpane width when resized. On LoadLayout when the radpane is made smaller a horizontal scrollbar will appear and when the radpane is made bigger there will be an empty gap between the radpane border and the side of the datagrid.
How do I get the radpane content sizing to work like it does before the layout has been loaded?
Hi,
I create UI tests for our WPF Desktop App.
For this I use the WinAppDriver from Microsoft.
Everything works fine, excepting "SendKeys" to AutoCompleteBox.
m_session.FindElementByAccessibilityId("AutoComlpleteBoxID").Click(); // Works ... I see the input cursor inside the box
m_session.FindElementByAccessibilityId("AutoComlpleteBoxID").SendKeys("12345"); // Works not !
Exception:
An unknown error occurred in the remote end while processing the command.
Any Idea why it happens.
With a standard WPF textbox it works.
Regards
Stefan

Hi,
The buttons that needs to be available in the quick access toolbar are those buttons which are available in the ribbon view. Is there a way to get this thing done by just creating a single list of buttons and then bind them to both of them(ribbonView and QuickAccessToolbar).
Because right now, i have to hard code each and every button separately in both of them, which doesnt seem a good practice or a good solution for this.
Kindly provide me with a sample project in which the same list of button is being binded with both in a MVVM architecture.
Regards,
Tayyaba Naz
Hello,
I'm having a
problem with RadDesktopAlertManager.
Since its
position can't be changed after initialization, I have to re-assign it in order
to change the position. But after doing that, adding of a new RadDesktopAlert
item to the manager causes a "Closed" event to be raised for the alert immediately after that (I can see in the Call Stack that the item's adding
caused the event raising). Actually the item is not being closed (which is
good), but the unnecessary event effects my business logic.
Hello great team,
I have the following issue.
I have a RadContextMenu with 5 menu items. Some of those items have children items too.
1 When I click on an item which doesn't have children - it performs the action and menu is closed which is great.
2 When I click on an item which have children - it just close the menu. I want when I click on a menu which have children just to expand and show those children.
So when I click on children menu to close again?
How can I achieve the second point above?
Thanks in Advance


My problem is simple: In my RadExpander header template, I am unable to access the properties of the data context of the expander itself. Why does the header not have the same data context?
Here is a simple example: A main Window with a label and a RadExpander (with HeaderTemplate). The simple label easily accesses the "Name" property. The RadExpander's HeaderTemplate cannot
<Window x:Class="TestTelerik.MainWindow" xmlns:testTelerik="clr-namespace:TestTelerik" Title="MainWindow" Height="350" Width="525" > <StackPanel> <!-- This shows up just fine --> <Label Content="{Binding HeaderTitle}"/> <tk:RadExpander> <tk:RadExpander.HeaderTemplate> <DataTemplate> <!-- This does not show. Why not? --> <Label Content="{Binding HeaderTitle}"/> </DataTemplate> </tk:RadExpander.HeaderTemplate> </tk:RadExpander> </StackPanel></Window>
The DataContext of this window is just itself:
public partial class MainWindow : Window{ public MainWindow() { InitializeComponent(); DataContext = this; } public string HeaderTitle => "Items!";}My real-world use case it actually quite a bit more complicated so it's not a viable solution for me to try to bind the "RadExpander.Header" property directly.
Nor can I use the "ElementName=" binding syntax. Not in my case
What is the best way to make the RadExpander HeaderTemplate inherit its the RadExpander's data context?

I just added a datapager to my project but it does not seem to be honoring the Windows8touch theme.
I have the window8touch dll referenced properly as everything else works.
==> Telerik.Windows.Themes.Windows8Touch
What do I have wrong.
<ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8Touch;component/Themes/System.Windows.xaml" /> <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8Touch;component/Themes/Telerik.Windows.Controls.xaml" /> <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8Touch;component/Themes/Telerik.Windows.Controls.Chart.xaml" /> <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8Touch;component/Themes/Telerik.Windows.Controls.Input.xaml" /> <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8Touch;component/Themes/Telerik.Windows.Controls.Data.xaml" /> <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8Touch;component/Themes/Telerik.Windows.Controls.DataVisualization.xaml" /> <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8Touch;component/Themes/Telerik.Windows.Controls.Navigation.xaml" /> <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8Touch;component/Themes/Telerik.Windows.Controls.Docking.xaml" /> <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8Touch;component/Themes/Telerik.Windows.Documents.xaml" /> <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8Touch;component/Themes/Telerik.Windows.Documents.Proofing.xaml" /> <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8Touch;component/Themes/Telerik.Windows.Controls.GridView.xaml" /></ResourceDictionary.MergedDictionaries>