Telerik Forums
UI for WPF Forum
1 answer
155 views
Hi,

I export a report to a word document (.docx). If I open the document with Word 2010, everything is perfect. If I open with the RadRichTextBox for WPF, It is very very long to open the document ( there is only 1 page and the file is 12 KB) and, it is not as accurate as when opened wint Word. Is it a know issue?

Patrick
Iva Toteva
Telerik team
 answered on 10 Jul 2012
3 answers
277 views
Hi,

I'm using Telerik V2012.1.325.35 and when I'm trying to open a PDF docuement using the PDFViewer. Here is the call stack:

System.NullReferenceException was unhandled
  Message="La référence d'objet n'est pas définie à une instance d'un objet."
  Source="Telerik.Windows.Controls.FixedDocumentViewers"
  StackTrace:
       à Telerik.Windows.Documents.Fixed.FixedDocumentStreamSource.<>c__DisplayClass8.<LoadDocument>b__6() dans c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Documents\Fixed\FixedDocumentViewers\Fixed\FixedDocumentStreamSource.cs:ligne 118
       à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       à System.Threading.ExecutionContext.runTryCode(Object userData)
       à System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       à System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       à System.Threading.ThreadHelper.ThreadStart()
  InnerException:

Here is my XAML:

<UserControl x:Class="com.christiegrp.Neuron.ClientApplication.PdfViewer"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:converters="clr-namespace:Telerik.Windows.Documents.Converters;assembly=Telerik.Windows.Controls.FixedDocumentViewers"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls">

    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="PdfViewer-Fr-Res.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/Resources;component/Neuron-CustomStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
   
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <!-- The following element is used to trigger an event allowing to replace the language resources before they are used. -->
        <TextBlock Initialized="ReplaceLanguageResources"/>
       
        <telerik:RadToolBar x:Name="pdfToolBar" DataContext="{Binding ElementName=pdfViewer, Path=Commands}">
            <telerik:RadToolBar.Resources>
                <converters:DoubleToStringPercentConverter x:Key="doubleToStringPercentConverter" />               
            </telerik:RadToolBar.Resources>

            <controls:RadButton Padding="4" Command="{Binding OpenPdfDocumentCommand}">
                <ToolTipService.ToolTip>
                    <TextBlock Text="{StaticResource Open}" />
                </ToolTipService.ToolTip>
                <Image Source="/Telerik.Windows.Controls.FixedDocumentViewers;component/Images/open.png" Stretch="None" />
            </controls:RadButton>

            <controls:RadButton Command="{Binding PrintPdfDocumentCommand}">
                <ToolTipService.ToolTip>
                    <TextBlock Text="{StaticResource Print}" />
                </ToolTipService.ToolTip>
                <Image Source="/Telerik.Windows.Controls.FixedDocumentViewers;component/Images/printer.png" Stretch="None" />
            </controls:RadButton>

            <telerik:RadToolBarSeparator/>

            <controls:RadButton Command="{Binding PageUpCommand}" >
                <ToolTipService.ToolTip>
                    <TextBlock Text="{StaticResource PreviousPage}" />
                </ToolTipService.ToolTip>
                <Image Source="/Telerik.Windows.Controls.FixedDocumentViewers;component/Images/previous.png" Stretch="None" />
            </controls:RadButton>

            <controls:RadButton Command="{Binding PageDownCommand}">
                <ToolTipService.ToolTip>
                    <TextBlock Text="{StaticResource NextPage}" />
                </ToolTipService.ToolTip>
                <Image Source="/Telerik.Windows.Controls.FixedDocumentViewers;component/Images/next.png" Stretch="None" />
            </controls:RadButton>

            <TextBox Width="30" Margin="2" Text="{Binding FixedDocumentViewer.CurrentPageNumber, Mode=TwoWay}" HorizontalContentAlignment="Center" x:Name="tbCurrentPage" KeyDown="tbCurrentPage_KeyDown"/>
            <TextBlock VerticalAlignment="Center" Margin="2" Text="/" />
            <TextBlock VerticalAlignment="Center" Margin="2" Text="{Binding ElementName=pdfViewer, Path=Document.Pages.Count}" />
            <telerik:RadToolBarSeparator/>

            <controls:RadButton Command="{Binding ZoomInCommand}">
                <ToolTipService.ToolTip>
                    <TextBlock Text="{StaticResource ZoomIn}" />
                </ToolTipService.ToolTip>
                <Image Source="/Telerik.Windows.Controls.FixedDocumentViewers;component/Images/zoom-in.png" Stretch="None" />
            </controls:RadButton>

            <controls:RadButton x:Name="PART_btnZoomOut" Command="{Binding ZoomOutCommand}">
                <ToolTipService.ToolTip>
                    <TextBlock Text="{StaticResource ZoomOut}" />
                </ToolTipService.ToolTip>
                <Image Source="/Telerik.Windows.Controls.FixedDocumentViewers;component/Images/zoom-out.png" Stretch="None" />
            </controls:RadButton>

            <telerik:RadComboBox IsEditable="True" Margin="2" Width="70" SelectedIndex="4"
                                 Text="{Binding FixedDocumentViewer.ScaleFactor, Converter={StaticResource doubleToStringPercentConverter}, Mode=TwoWay}">
                <telerik:RadComboBoxItem Content="10%" />
                <telerik:RadComboBoxItem Content="25%" />
                <telerik:RadComboBoxItem Content="50%" />
                <telerik:RadComboBoxItem Content="75%" />
                <telerik:RadComboBoxItem Content="100%" />
                <telerik:RadComboBoxItem Content="150%" />
                <telerik:RadComboBoxItem Content="200%" />
                <telerik:RadComboBoxItem Content="500%" />
                <telerik:RadComboBoxItem Content="1000%" />
                <telerik:RadComboBoxItem Content="2000%" />
            </telerik:RadComboBox>
           
            <telerik:RadToolBarSeparator />

            <controls:RadToggleButton IsChecked="{Binding FixedDocumentViewer.IsInPanMode, Mode=TwoWay}" >
                <ToolTipService.ToolTip>
                    <TextBlock Text="{StaticResource Pan}" />
                </ToolTipService.ToolTip>
                <Image Source="/Telerik.Windows.Controls.FixedDocumentViewers;component/Images/hand-free.png" Stretch="None" />
            </controls:RadToggleButton>
        </telerik:RadToolBar>
       
        <telerik:RadPdfViewer Grid.Row="1" x:Name="pdfViewer" />
    </Grid>
</UserControl>


Thank's
Iva Toteva
Telerik team
 answered on 10 Jul 2012
2 answers
182 views
Hi,

I have a pie chart set up, and I've been following the tutorial at http://www.telerik.com/help/wpf/radchart-features-chart-legend.html to set up the legend. I have the UseAutoGeneratedItems set to true for the legend, but the items in the legend are showing as "Item 1", "Item 2", ...etc. Isn't the auto generation supposed to use the categories that the chart is set up to use? Here's the code for the chart:

<Telerik:RadChart Name="RefundAmountsByBucketChart" Grid.Row="1" Grid.Column="1" Background="White" Margin="5,5,10,5">
            <Telerik:RadChart.DefaultView>
                <Telerik:ChartDefaultView>
                    <Telerik:ChartDefaultView.ChartTitle>
                        <Telerik:ChartTitle Content="Refund Amounts By Bucket" Background="{x:Null}" Foreground="Black" OuterBorderBrush="{x:Null}" BorderBrush="{x:Null}" />
                    </Telerik:ChartDefaultView.ChartTitle>
                    <Telerik:ChartDefaultView.ChartLegend>
                        <Telerik:ChartLegend x:Name="RefundAmountsPieChartLegend" UseAutoGeneratedItems="True" Header="Buckets"/>
                    </Telerik:ChartDefaultView.ChartLegend>
                    <Telerik:ChartDefaultView.ChartArea>
                        <Telerik:ChartArea SmartLabelsEnabled="False" LegendName="RefundAmountsPieChartLegend"/>
                    </Telerik:ChartDefaultView.ChartArea>
                </Telerik:ChartDefaultView>
            </Telerik:RadChart.DefaultView>
            <Telerik:RadChart.SeriesMappings>
                <Telerik:SeriesMapping ItemsSource="{Binding RefundAmountsByBucket}" >
                    <Telerik:SeriesMapping.SeriesDefinition>
                        <Telerik:PieSeriesDefinition ItemLabelFormat="#%{P0}" RadiusFactor="0.75">
                            <Telerik:PieSeriesDefinition.LabelSettings>
                                <Telerik:RadialLabelSettings ShowZeroValueLabels="False" SpiderModeEnabled="True" ShowConnectors="True" Distance="15"/>
                            </Telerik:PieSeriesDefinition.LabelSettings>
                        </Telerik:PieSeriesDefinition>
                    </Telerik:SeriesMapping.SeriesDefinition>
                    <Telerik:SeriesMapping.ItemMappings>
                        <Telerik:ItemMapping FieldName="Bucket" DataPointMember="XCategory"/>
                        <Telerik:ItemMapping FieldName="RefundAmount" DataPointMember="YValue"/>
                    </Telerik:SeriesMapping.ItemMappings>
                </Telerik:SeriesMapping>
            </Telerik:RadChart.SeriesMappings>
        </Telerik:RadChart>

Thanks!
Jeremy
Top achievements
Rank 1
 answered on 10 Jul 2012
1 answer
178 views
Hello,

I have two questions
 1. when I set a radsplitcontainer.InitialPosition to floatingonly, in visualstudio i can't use "design mode".
 2. when i execute my application, the title of others radpane are empties... (i can't reproduce it in a small project for the moment), but maybe have you an idea of why it would be possible.

I obtain the following trace for point 2 :
System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='<null>' BindingExpression:Path=(0); DataItem='ToolWindow' (Name=''); target element is 'WindowHostWindow' (Name=''); target property is 'Title' (type 'String')


I obtain the following error for 1. :

La référence d'objet n'est pas définie à une instance d'un objet.
   à Telerik.Windows.Controls.InternalWindow.PopupWindowHost.PopupHostManagerBase.GetManager(DependencyObject obj) dans c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\InternalWindow\PopupWindowHost.cs:ligne 36
   à Telerik.Windows.Controls.InternalWindow.SinglePopupWindowHost.GetHostManager() dans c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\InternalWindow\SinglePopupWindowHost.cs:ligne 51
   à Telerik.Windows.Controls.InternalWindow.PopupWindowHost.Open(Boolean isModal) dans c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\InternalWindow\PopupWindowHost.cs:ligne 105
   à Telerik.Windows.Controls.WindowBase.ShowWindow(Boolean isModal) dans c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:ligne 714
   à Telerik.Windows.Controls.Docking.ToolWindow.Open() dans c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Parts\ToolWindow.cs:ligne 101
   à Telerik.Windows.Controls.RadDocking.ShowWindow(ToolWindow window, Boolean shouldReallyOpen) dans c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadDocking.cs:ligne 1465
   à Telerik.Windows.Controls.RadDocking.OpenInToolWindow(RadPane pane) dans c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadDocking.cs:ligne 519
   à Telerik.Windows.Controls.RadDocking.OpenAsFloatingOnly(RadSplitContainer container) dans c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadDocking.cs:ligne 1248
   à Telerik.Windows.Controls.RadDocking.InitializeSplitContainer(RadSplitContainer container) dans c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadDocking.cs:ligne 1201
   à Telerik.Windows.Controls.RadDocking.OnApplyTemplate() dans c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\Docking\Docking\Docking\RadDocking.cs:ligne 178
   à System.Windows.FrameworkElement.ApplyTemplate()
   à Microsoft.Expression.Platform.WPF.WpfViewNodeManager.EnsureElementInDictionary(Object root, ViewNode knownAncestor)


Aurore
Aurore
Top achievements
Rank 1
 answered on 10 Jul 2012
3 answers
491 views
Hi!

I need to set some document information keys of an exported PDF-file.

In an exported PDF-file, all I can see are some hardcoded(?) properties like Producer="Telerik RadRichTextBox" and Creator.

How can I set Title, Subject, Keywords, Creator and Author of the exported PDF-File?

Thanks!
Mihail
Telerik team
 answered on 10 Jul 2012
3 answers
160 views
I have a flag enum that contains more than 32 flags so I set the underlying type to be long (Int64). When I set the RadPropertyGrid.Item to an object which has a long flags property, I get an OverflowException: "Value was either too large or too small for an Int32." (originating at Telerik.Windows.Controls.Data.PropertyGrid.FlagEnumEditor.OnEnumTypePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) ).

Is there a way for the property grid to deal with enums whose underlying type is Int64 (or some other type > 32bit)?
Maya
Telerik team
 answered on 10 Jul 2012
3 answers
232 views
Hello,

My ganttview has many rows, and I would like to programactilly show a particular row the first visible row, that is I would like to programactilly scroll to a particular row.  Is this possible in ganttview?

Thanks,
Eric
Miroslav Nedyalkov
Telerik team
 answered on 10 Jul 2012
1 answer
207 views
hello,

while running some CodedUI Tests on WPF Aplication who use Rad Gridview (2012 Q1)
Usual CodedUI Test (click on grid, click On Cells, Press Down...)
using VS2010
Windows XP.

suddenly i got this Exception from the Application itself (not the test!)

System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generics.List'1.Enumerator.MoveNextRare()
at System.Collections.Generics.List'1.Enumerator.MoveNext() 
at
Telerik.Windows.Controls.GridView.Automation.GridViewDataControlAutomationPeer.GeneratePeersForDataItems(List'1 newPeerList, AutomationPeerStorage'2 oldCachedPeers)
at
Telerik.Windows.Controls.GridView.Automation.GridViewDataControlAutomationPeer.GetItemPeers()
at
Telerik.Windows.Controls.GridView.Automation.GridViewVirtualizingPanelAutomationPeer.GetChildrenCore()
at Telerik.Windows.Automation.Peers.AutomationPeer.EnsureChildren()
at Telerik.Windows.Automation.Peers.AutomationPeer.UpdateChildrenInternal(Int32 invalidateLimit)
at System.Windows.Automation.Peers.AutomationPeer.UpdateChildren()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()  
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()   
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()   
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree() 
  
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree() 
  
at System.Windows.ContextLayOutManager.fireAutomationEvents()
at System.Windows.ContextLayOutManager.UpdateLayout() 
at System.Windows.ContextLayOutManager.UpdateLayoutCallBack(Object arg) 
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() 
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) 
at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)  
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object Args, Int32 numArgs, Delegate catchHandler)



can someone help..?
thanks in advance.





Yordanka
Telerik team
 answered on 10 Jul 2012
6 answers
183 views
Hey,
Just a quick question - in the WPF demo application, when You download it and it loads for the first time it displays a line loading and massive numbers going up. Is that done with one of Your tools provided ? and If yes which is it ?
Regards,
(Premium Collection user) Neil
Ivan Zhekov
Telerik team
 answered on 10 Jul 2012
1 answer
96 views
Hy,

I've got the following Problem.
If i Save the Diagram to String and Load the string back into the same Diagram, my binding doesn't work anymore.
Bug inside the Diagram Framework or OSI Layer 9 (20 cm in the front of the monitor) ?


XAML:
<telerik:RadDiagramShape x:Class="SPARE_BPMS_Framework.Shapes.General.ProcessShape"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d" Content="{Binding}"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             d:DesignHeight="300" d:DesignWidth="300">
 
    <telerik:RadDiagramShape.Resources>
        <DataTemplate x:Key="editTemplate">
            <StackPanel Orientation="Horizontal">
                <TextBox Height="24" Text="{Binding Name}" />
            </StackPanel>
        </DataTemplate>
        <DataTemplate x:Key="template">
            <WrapPanel Orientation="Vertical">
                <TextBlock Text="{Binding Name}" />
                <TextBlock Text="{Binding ChildProcessName}" />
            </WrapPanel>
 
        </DataTemplate>
    </telerik:RadDiagramShape.Resources>
</telerik:RadDiagramShape>

Code Behinde
public partial class ProcessShape : RadDiagramShape
    {
        public ProcessItem Model { get; set; }
 
        public string Name { get; set; }
 
        public ProcessShape()
        {
            InitializeComponent();
 
            Model = new ProcessItem();
           
            this.EditTemplate = (DataTemplate)this.FindResource("editTemplate");
            this.ContentTemplate = (DataTemplate)this.FindResource("template");
 
            this.DataContext = Model;
 
            this.MouseDoubleClick += new MouseButtonEventHandler(Model.shape_MouseDoubleClick);
        }
 
        public void Update()
        {
            this.EditTemplate = (DataTemplate)this.FindResource("editTemplate");
            this.ContentTemplate = (DataTemplate)this.FindResource("template");
 
        }
 
         
    }

Method who call the Reload and Load
string temp = diagram.Save();
                diagram.Clear();
            diagram.Load(temp);

Greetings

Alfred

Miro Miroslavov
Telerik team
 answered on 10 Jul 2012
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?