Telerik Forums
UI for WPF Forum
5 answers
267 views

Hello,

 

We are using RadControls for WPF Q3 2011.2.712.40 Runtime version v4.0.30319 and we are facing a problem with printing using RadRichTextBox control.

 

The code using to print (as shown on your Website) is :

 

Telerik.Windows.Documents.UI.PrintSettings printSettings = new Telerik.Windows.Documents.UI.PrintSettings();

printSettings.PrintMode = Telerik.Windows.Documents.UI.PrintMode.Native;

printSettings.PrintScaling = Telerik.Windows.Documents.UI.PrintScaling.None;

MyRichTextBox.Print(printSettings);

 

And I’m getting the following error :

 

   at Telerik.Windows.Documents.UI.HeaderFooterPresenterBase.UpdateBody() in c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\HeaderFooterPresenterBase.cs:line 338

   at Telerik.Windows.Documents.UI.HeaderFooterPresenterBase.OnApplyTemplate() in c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\HeaderFooterPresenterBase.cs:line 417

   at System.Windows.FrameworkElement.ApplyTemplate()

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)

   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)

   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)

   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at System.Windows.Controls.Control.MeasureOverride(Size constraint)

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at System.Windows.Controls.Canvas.MeasureOverride(Size constraint)

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at Telerik.Windows.Documents.UI.DocumentPrintPresenter.MeasureOverride(Size availableSize) in c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\DocumentPrintPresenter.cs:line 455

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)

   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)

   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

   at System.Windows.UIElement.Measure(Size availableSize)

   at System.Windows.ContextLayoutManager.UpdateLayout()

   at System.Windows.UIElement.UpdateLayout()

   at Telerik.Windows.Documents.UI.DocumentPrintPresenter.UpdateEditorLayout() in c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\DocumentPrintPresenter.cs:line 308

   at Telerik.Windows.Documents.UI.DocumentPrintPresenter.DoOnDocumentChanged() in c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\DocumentPrintPresenter.cs:line 301

   at Telerik.Windows.Documents.UI.DocumentPrintPresenter.OnOwnerChanged() in c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\DocumentPrintPresenter.cs:line 283

   at Telerik.Windows.Documents.UI.DocumentPrintPresenter.set_Owner(RadRichTextBox value) in c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\DocumentPrintPresenter.cs:line 102

   at Telerik.Windows.Controls.RadRichTextBox.InitActiveEditorPresenter() in c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\RadRichTextBox.cs:line 2862

   at Telerik.Windows.Controls.RadRichTextBox.set_ActiveEditorPresenter(IDocumentEditorPresenter value) in c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\RadRichTextBox.cs:line 1010

   at Telerik.Windows.Controls.RadRichTextBox.<>c__DisplayClass22.<Print>b__20(Object o, EventArgs e) in c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\RadRichTextBox.cs:line 2391

   at Telerik.Windows.Documents.UI.DocumentPrintPresenter.OnPrintingStarted() in c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\DocumentPrintPresenter.cs:line 702

   at Telerik.Windows.Documents.UI.DocumentPrintPresenter.Print() in c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\DocumentPrintPresenter.cs:line 654

   at Telerik.Windows.Controls.RadRichTextBox.Print(PrintSettings printSettings) in c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Documents\UI\RadRichTextBox.cs:line 2411

   at Optivia.WpfClient.Views.UserControls.CourrierType.UpdateCourrierTypeViewModel.ExportCourrierType(RadRichTextBoxBindable RTB) in C:\Projects\Eurovia_SSO\Optivia\Code\Optivia.WpfClient\Views\UserControls\CourrierType\UpdateCourrierTypeViewModel.cs:line 200

   at GalaSoft.MvvmLight.Command.RelayCommand`1.Execute(Object parameter)

   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)

   at System.Windows.Controls.Primitives.ButtonBase.OnClick()

   at System.Windows.Controls.Button.OnClick()

   at Telerik.Windows.Controls.RadButton.OnClick() in c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Core\Controls\Buttons\RadButton.cs:line 357

   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)

   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)

   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)

   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)

   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)

   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)

   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)

   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)

   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)

   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)

   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)

   at System.Windows.Input.InputManager.ProcessStagingArea()

   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)

   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)

   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)

   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

   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)

 

The print screen attached gives you a visual description of the error we are getting.

 

We had tried to pass by HTML to do the job, but, and for client desire reason, we must pass by the control printing tool.

 

Thank you so much for your time.

 

Best regards

Iva Toteva
Telerik team
 answered on 02 Aug 2013
3 answers
85 views
Hi Experts,

I have done a customized settingspane referenced to the MindMap example(But I change the RadDiagramShape instead of MindmapRootShape in example case). And in the my settingspane, I have a button to open a new window, when the window closed, the settingspane will be closed by default.

What I want is to keep its showing. Or when the window closed, the settingspane should be show again. How to do it like this ? Thanks  very much. It is appreciate if you can provide me a simple example.
Pavel R. Pavlov
Telerik team
 answered on 02 Aug 2013
1 answer
209 views
Hi,

I have a RadRichTextBox, and I have added a span dynamically by change the default cursor style but It not reflected on the added span text.

So how can I change the default cursor style of dynamically added span.

Telerik.Windows.Documents.Model.Span spn = new Telerik.Windows.Documents.Model.Span();
               spn.Text = rnd.Next().ToString()+"[]";
               spn.FontWeight = FontWeights.SemiBold;
               spn.Cursor = Cursors.Hand;
               selectedpara.Children.AddAfter(currentspan, spn);

above code added the span to RadRichTextBox but not change the cursor to Hand


how to do this?

Regards
Sopan Vaidya
Iva Toteva
Telerik team
 answered on 02 Aug 2013
3 answers
94 views
Hello,

In Demo RadControl after Horizontal Scrolling code highlight disabled, Please see screenshot.

Thanks so much.
Yana
Telerik team
 answered on 02 Aug 2013
1 answer
59 views

Good morning,

I´m working with the RadDiagram Shape (WPF), in a specific process project.. but im facing a problem when i tried to connect a shape with itself... 

its there any way to achive this behaviour ?

Thanks in advanced

PD: im attaching a image for the way i would like to see it.
Pavel R. Pavlov
Telerik team
 answered on 02 Aug 2013
3 answers
306 views
Hi everyone,

I'm in front of a strange issue...
I develop a WPF application with Prism/MEF and MVVM pattern, for this one I'm using the Docking control.

As Prism pattern usecase, I have region with many views, those views are not UserControl but RadPanel.
For every views, I'm using a HeaderTemplate to bind a header title and tooltip.

Here's the view code (MyView.xaml) :
<telerik:RadPane Style="{StaticResource RadPaneHeaderStyle}">

And the HeaderTemplate code (App.xaml) :
<Style x:Key="RadPaneHeaderStyle" TargetType="telerik:RadPane">
    <Setter Property="Header" Value="{Binding HeaderTitle, Mode=TwoWay}" />
    <Setter Property="HeaderTemplate">
        <Setter.Value>
            <DataTemplate>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="{Binding}" ToolTip="{Binding}" />
                </StackPanel>
            </DataTemplate>
        </Setter.Value>
    </Setter>
</Style>

It's working corretly in the DocumentHost region (default position), but when I move the window to Anchor it anywhere else, pinned and unpinned, style of all the window is changed... Please see the attached image for illustration.

Anyone have a solution for this problem ?
Thanks in advance.

Regards.

Guillaume


Guillaume
Top achievements
Rank 1
 answered on 02 Aug 2013
1 answer
64 views
Hi Telerik,

we are using RadGrid View as show in image. I want recorder on TEXBOX1 and TEXBOX2.CUIT recorder is recorded correctly but while playing back it is clicking only on TEXTBOX1 not on TEXTBOX2.

Can you please provide a unique properties for two textboxs

Regards,
Rajendar.
Maya
Telerik team
 answered on 02 Aug 2013
2 answers
128 views
Good day.
When I set a mask for my RadMaskedTextBox MaskType = "Numeric" Mask = "N" and start typing numeric values ​​by default are presenting 0.00 and continue typing the number in the beginning these zeros always remain at the end of the value. Fasso How to get around this? Somehow need that 0.00, but only when the control does not have a set value and without focu, but by winning the focu needed it to be cleaned and defining mascara according co the value entered!

In short: I do not have a default value of 0.00 only when the need has not focu and the set value is 0 otherwise need the formatted value and typing in the value vanish with 0.00!

NOTE: The same goes for the type MaskType = "DateTime" values ​​pre-defined not.

graciously
André
Pavel R. Pavlov
Telerik team
 answered on 02 Aug 2013
3 answers
492 views
Hello,

I have a grid view which I want to ALWAYS group by a particular column.  I need to let the user also group by more columns if they choose so I still need to show the group panel.

I can set the initial group descriptor fine in XAML, but would like to hide the button which appears in the Group Panel so the user cannot remove the grouping. (not sure what the proper term for this button is)

I found code to handle the Grouping event and canceling the removal, but I'd really like to have that button hidden if possible.

Thanks,
Chris
Muhammad
Top achievements
Rank 1
 answered on 01 Aug 2013
2 answers
124 views
Hello,
Is it possible to set different FilteringMode for columns, not for grid?
I.e.:
Column1 - FilteringMode=Popup
.
.
.
Column9 - FilteringMode=FilterRow.

I'll be appreciate for any help.
Paweł
Top achievements
Rank 1
 answered on 01 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?