Telerik Forums
UI for Silverlight Forum
1 answer
191 views

Hello,

I have an old Silverlight application using the `Windows 7` theme.

In this application, I'm using many controls and the `app.xaml` file contains the following theme files:

      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/VisManager;component/Themes/Themes/Windows7/System.Windows.xaml" />
        <ResourceDictionary Source="/VisManager;component/Themes/Themes/Windows7/Telerik.Windows.Controls.Docking.xaml" />
        <ResourceDictionary Source="/VisManager;component/Themes/Themes/Windows7/Telerik.Windows.Controls.GridView.xaml" />
        <ResourceDictionary Source="/VisManager;component/Themes/Themes/Windows7/Telerik.Windows.Controls.ImageEditor.xaml" />
        <ResourceDictionary Source="/VisManager;component/Themes/Themes/Windows7/Telerik.Windows.Controls.Input.xaml" />
        <ResourceDictionary Source="/VisManager;component/Themes/Themes/Windows7/Telerik.Windows.Controls.Navigation.xaml" />
        <ResourceDictionary Source="/VisManager;component/Themes/Themes/Windows7/Telerik.Windows.Controls.RibbonView.xaml" />
        <ResourceDictionary Source="/VisManager;component/Themes/Themes/Windows7/Telerik.Windows.Controls.RichTextBoxUI.xaml" />
        <ResourceDictionary Source="/VisManager;component/Themes/Themes/Windows7/Telerik.Windows.Controls.xaml" />
        <ResourceDictionary Source="/VisManager;component/Themes/Themes/Windows7/Telerik.Windows.Documents.xaml" />
      </ResourceDictionary.MergedDictionaries>

After installation Ui for Silverlight R1 2022 SP1, the application no more starts: it complains about a referenced static resource that is missing, in the `Telerik.Windows.Controls.RichTextBoxUI.xaml` file.

Replacing this file with the one from version R1 2022 makes it work again.

You should really test Silverlight application while you're adding new functions!

 

Patrick
Top achievements
Rank 2
Iron
Iron
Iron
 updated question on 28 Mar 2022
3 answers
227 views
Hi

I am developing an application that should be able to preview a set of documents of different types.
Word, txt, html seems to work fine, but what would really be useful is the ability to preview pdf documents since most of the documents that are going to be previewed in this application is just that.

I noticed in version 2010.3.1129.1040 that a PdfFormatProvider had been included, but the PdfFormatProvider.Import()-method throws a NotSupportedException.

I was just wondering as to when such a method will be supported or if there is another way to preview pdf documents that I have yet to discover?

Regards
Sindre
Tanya
Telerik team
 answered on 19 Feb 2021
3 answers
230 views

I'm trying to figure out how to "intercept" the SaveCommand for RadRibbonBackstageItem and respond to the event in my MVVM code.

 

<telerik:RadRichTextBoxRibbonUI IsMinimized="True"  Grid.Row="0" Grid.Column="0" BackstageClippingElement="{Binding ElementName=gridRadRtbParent}" DataContext="{Binding Commands, ElementName=ManageLettersRadRTB}" CollapseThresholdSize="50,50" Title="Letter" TitleBarVisibility="Collapsed" QuickAccessToolBarPosition="BelowRibbon" ApplicationButtonContent="File">
 
    <telerik:RadRichTextBoxRibbonUI.Resources>
        <telerik:FontFamiliesProvider x:Key="FontFamiliesProvider" />
    </telerik:RadRichTextBoxRibbonUI.Resources>
 
    <!-- Menu - File -->
    <telerik:RadRichTextBoxRibbonUI.Backstage>
        <telerik:RadRibbonBackstage >
            <telerik:RadRibbonBackstageItem Header="New" Icon="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/new.png" IsSelectable="false" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding NewDocumentCommand}" />
            <telerik:RadRibbonBackstageItem Header="Open" Icon="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/open.png" IsSelectable="false" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding OpenDocumentCommand}" />
            <telerik:RadRibbonBackstageItem x:Name="FileSave"  Header="Save" Icon="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/save.png" IsSelectable="false" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SaveCommand}" >

I tried to use SL5 interactivity but in order to make that work I had remove 

"DataContext="{Binding Commands, ElementName=ManageLettersRadRTB}"

from RadRichTextBoxRibbonUI which basically disables all the built in functionality ... not what I want.

 My goal is to respond with my own code when File - Save (which are RadRibbonBackstageItem) is selected from the RadRichTextBoxRibbonUI and not use the default controls Save process.

Is this possible?  If so, could you provide any hints/sample.

Cheers, Rob.

 

Tanya
Telerik team
 answered on 26 May 2020
3 answers
200 views
Hello World 

I am getting an exception when i am trying to use RadRichTextBox. Control is added to page successfully but when i am trying to load my page it gives me an exception

Code : 4004
Category : ManagedRuntimeError
Message : System.TypeInitizlizationException : The Type initializer for 'Telerik.Windows.Document.UI.Extensibility.RadCompositionInitizlizer' threw..

it opens the VS debugger 

please let me know how the solve this kind of prob ASAP. my xaml code is

<navigation:Page x:Class="PracticeAssignments.Home"
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"                
    xmlns:telerikWindowsControls="clr-namespace:Telerik.Windows;assembly=Telerik.Windows.Controls"   
    xmlns:telerikDocuments="clr-namespace:System;assembly=Telerik.Windows.Documents"
    xmlns:telerikData="clr-namespace:Telerik.Windows.Data;assembly=Telerik.Windows.Data"
    xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
    xmlns:telerikRichTextBoxCommands="clr-namespace:Telerik.Windows.Documents.RichTextBoxCommands;assembly=Telerik.Windows.Documents"
    xmlns:telerikRichTextBoxUI="clr-namespace:Telerik.Windows.Controls.RichTextBoxUI;assembly=Telerik.Windows.Controls.RichTextBoxUI"
    xmlns:telerikFormatProRTF="clr-namespace:Telerik.Windows.Documents.FormatProviders.Rtf;assembly=Telerik.Windows.Documents"
     
    mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"
    Title="Home"
    Style="{StaticResource PageStyle}">
 
    <Grid x:Name="LayoutRoot">
        <ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}" Margin="-54,-8,-62,-22">
            <StackPanel x:Name="ContentStackPanel" VerticalAlignment="Center">
                <telerik:RadRichTextBox VerticalAlignment="Center" HorizontalAlignment="Center" Width="200"></telerik:RadRichTextBox>
            </StackPanel>
        </ScrollViewer>
    </Grid>
 
</navigation:Page>
Dimitar
Telerik team
 answered on 11 May 2020
2 answers
97 views
I am working on a screen in clicking a button runs the RadRichTextBox.Print() method, using either Html or HtmlPreview as parameters depending on which button you pressed.  If I double click a button, there is a chance that I will get an "Eval failed" error.  When I close the popup that displays the document, the error doesn't occur.  Is there any way to check if that window is closed?  If so, I could disable the functionality until the window is closed.  
Bob
Top achievements
Rank 1
 answered on 07 Apr 2020
6 answers
231 views
Hi there, Please help me solve this problem

I'm working with the exporting the RadDocument into different file format.(HTML,Docx,PDF)
I have data in the table which are both English and Thai language(My native language). At this time, exporting to HTML and Docx work fine. However, when I export this into PDF, the table cell that has a Thai text becomes unreadable (It becomes a kind of square text or something). I already set a font family (such as MS Arial Unicode) in which Thai language can be used but exporting still failed.

The source code of setting font is some kind like this.

            Telerik.Windows.Documents.Model.Span span = new Telerik.Windows.Documents.Model.Span();
            span.FontFamily = new FontFamily("Arial Unicode MS");
            paragraph.Inlines.Add(span);
            paragraph.TextAlignment = Telerik.Windows.Documents.Layout.RadTextAlignment.Center;
            cell.Blocks.Add(paragraph);

Do I need to thing set something else?

Thanks
Martin
Telerik team
 answered on 03 Jan 2020
7 answers
115 views
Hi Telerik Team,

I remember that RadRichTextBox did't support exporting and importing in DOC.It supports only DOCX.But I really have a need for DOC.Any chance that you will support that format in a future???Or may be any converter between DOC and DOCX files????
Tanya
Telerik team
 answered on 05 Dec 2019
3 answers
96 views
Hello,

I have an RichTextBox with ad RichTextBoxRibbonUI.
I implemented the "Orientation" - DropDownButton similar to the Silverlight Demo (http://demos.telerik.com/silverlight/#RichTextBox/TelerikEditor) like this:

<Controls:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding Path=ChangePageOrientationCommand}" LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageOrientation.png" Controls:ScreenTip.Description="Switch the pages between portrait and landscape layouts." Controls:ScreenTip.Title="Page Orientation" Size="Medium" Text="Orientation">
                                    <Controls:RadRibbonDropDownButton.DropDownContent>
                                        <Controls:RadGallery ItemHeight="54" ItemWidth="109" RichTextBoxUI:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangePageOrientationCommand}" ViewportHeight="216" ViewportWidth="110">
                                            <Controls:RadGalleryItem HorizontalContentAlignment="Left" Tag="Portrait">
                                                <StackPanel Orientation="Horizontal">
                                                    <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageOrientationPortrait.png" Stretch="None" />
                                                    <TextBlock FontWeight="Bold" Text="Portrait" VerticalAlignment="Center" />
                                                </StackPanel>
                                            </Controls:RadGalleryItem>
                                            <Controls:RadGalleryItem HorizontalContentAlignment="Left" Tag="Rotate90">
                                                <StackPanel Orientation="Horizontal">
                                                    <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageOrientationLandscape.png" Stretch="None" />
                                                    <TextBlock FontWeight="Bold" Text="Landscape" VerticalAlignment="Center" />
                                                </StackPanel>
                                            </Controls:RadGalleryItem>
                                            <Controls:RadGalleryItem HorizontalContentAlignment="Left" Tag="Rotate180">
                                                <StackPanel Orientation="Horizontal">
                                                    <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageOrientationRotate180.png" Stretch="None" />
                                                    <TextBlock FontWeight="Bold" Text="Rotate 180" VerticalAlignment="Center" />
                                                </StackPanel>
                                            </Controls:RadGalleryItem>
                                            <Controls:RadGalleryItem HorizontalContentAlignment="Left" Tag="Rotate270">
                                                <StackPanel Orientation="Horizontal">
                                                    <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageOrientationRotate270.png" Stretch="None" />
                                                    <TextBlock FontWeight="Bold" Text="Rotate 270" VerticalAlignment="Center" />
                                                </StackPanel>
                                            </Controls:RadGalleryItem>
                                        </Controls:RadGallery>
                                    </Controls:RadRibbonDropDownButton.DropDownContent>
                                </Controls:RadRibbonDropDownButton>

The problem is that the Button is always disabled.
Is there any condition which prevents the button to be enabled?

Regards,

Bastian Kraehmer
Peshito
Telerik team
 answered on 21 Sep 2018
5 answers
254 views
I have an ASP.NET application that makes the user open, read and save back word files. Today I'm using webdav to open the word files so the user can edit the files locally.

Is there any way of doing something likethis:

1. The user browses his files, Docx or just database records, preferable docx files
2. The user clicks one of the items, a new web window opens with a silverlight page that holds the richtexteditor and the content of the file.
3. the user saves the contect back

Thanks
Tanya
Telerik team
 answered on 17 Sep 2018
9 answers
243 views
I added bookmarks to the document via the UI.
Using 'GetAllBookmarks' function I am able to get a list of the bookmarks.
How to assign a new value to bookmark programmatically (C#)  ?
Is there any example?

Thanks.
Tanya
Telerik team
 answered on 01 Aug 2018
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?