Telerik Forums
UI for Silverlight Forum
3 answers
206 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
13 answers
137 views
Hi,
 
Is there a way to set the calendar rule for the week number when showing week intervals on the timebar?

Cheers,

Simeon
Brian
Top achievements
Rank 1
Veteran
 answered on 07 May 2020
1 answer
87 views
     Since Silverlight is retired from all browsers Is there any chance Telerik UI for Silverlight be free ?
Martin Ivanov
Telerik team
 answered on 29 Apr 2020
0 answers
70 views

We have a context menu that has ContextMenuItem(s) which are connected to commands which take as a parameter the particular tree item the context menu was called on. In other words, if I right click on a particular tree item specifically, some of the ContextMenuItems have functionality which derives from that selected tree item's properties.

So we would like to be able to open the context menu of our treeview as though it was opened by right clicking a particular item in a rad tree view.

Our RadContextMenu is not nested inside of the treeviewitems as in the following solution:

https://www.telerik.com/forums/show-context-menu-for-tree-view-from-keyboard-shows-silverlight-menu-also

 

The context menu is nested inside of the treeview itself, and the treeitem parameters are passed in using the following XAML:

<telerik:RadMenuItem Header="Assign Write All Modules"
                                             Command="{Binding Path=ViewModel.OurCommand}"
                                             CommandParameter="{Binding RelativeSource={RelativeSource                                                                                          Self}}">
                                                    <telerik:RadMenuItem.Icon>
                                                        <Image
                                Source="OurImage.png"
                                Width="16" Height="16" />

 

Sorry it's messy. The web-code-formatter wasn't working quite right.

When right clicking, everything works fine, so I don't intend to change the way this is done unless I have to. 

How can I play with the ContextMenu to be able to do this?

I have tried this:

RadTreeView tree = sender as RadTreeView;
RadContextMenu.SetContextMenu(tree.SelectedContainer, RadContextMenu.GetContextMenu(tree));
var menu1 = RadContextMenu.GetContextMenu(tree.SelectedContainer);
if (menu1 != null)
{
    menu1.PlacementTarget = tree.SelectedContainer;
    menu1.InheritDataContext = true;
    menu1.IsOpen = true;
    e.Handled = true;
}

 

but that just opens the context menu of the treeview, of course. When I select the menu items that consume a treeitem as a parameter, the functions attached to my command do not receive the treeitem. I saw in the library that there is a "UIElement" property and an "elementCausedContextMenuOpen" property. I was thinking that with the way we have our XAML implemented, we could simply set one of these parameters. I started to look into it, but these parameters are both private, which led me to believe I will have to get some guidance from you guys on this.

What seems like the most simple way to go about this?

Matthew
Top achievements
Rank 1
 asked on 23 Apr 2020
3 answers
354 views
I'm not having much success in what I thought would be a simple process (at least is was in Windows Forms apps).

I have a GridView bound to an observableCollection ... columns are being displayed correctly with bound data.  I simply want to do some additional processing when my GridViewCheckBoxColumn is checked (or unchecked).

Any hints on how to accomplish this?  I've surfed and read the documentation and there is NOTHING about how to respond to a GridViewCheckBoxColumn event -- I'm guessing this must be a pretty common task??  But so far, I haven't been able to find any event that will consistently work with a GridViewCheckBoxColumn check/uncheck.

Thanks, Rob.

Hai
Top achievements
Rank 1
 answered on 13 Apr 2020
2 answers
107 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
12 answers
597 views
Hi,

How to change GridViewColumnGroup border brush ?

I tested this  :

<Style TargetType="telerik:GridViewHeaderCell">
        <Setter Property="BorderBrush">
            <Setter.Value>
                <SolidColorBrush Color="LightGray"/>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderThickness" Value="0,0,0,1"/>
    </Style>

this works for headercell. How can I do the same for ColumnGroup ?

See attached picture for exemple, I want to change the color of Red borders to lightGray.

Thanks for help.
Dinko | Tech Support Engineer
Telerik team
 answered on 25 Mar 2020
1 answer
68 views
Can I add more than one item to an viewport? 
Dinko | Tech Support Engineer
Telerik team
 answered on 14 Mar 2020
1 answer
91 views
Can I make the TimeLineIten move along the whole area. So that it is not static
Dinko | Tech Support Engineer
Telerik team
 answered on 14 Mar 2020
8 answers
798 views
So I'm trying to develop a proper MVVM solution with RadGridView and some FilterDescriptors. I've read on forums in some old posts that FilterDescriptor don't support binding, but you were supposed to add it...and looking at it now, it indeed looks like FilterDescriptor is a DependencyObject (I'm running version 2011.1.419.1040). So here's what I tried:

<telerik:RadGridView Grid.Row="2" x:Name="BudgetGrid" AutoGenerateColumns="False"
                                 ShowGroupPanel="False"
                                 Background="{StaticResource LightGreyBackground}"
                                 ItemsSource="{Binding Posts}"
                                 RowDetailsVisibilityMode="Collapsed"
                                 RowIndicatorVisibility="Collapsed"
                                 CanUserDeleteRows="False"
                                 CanUserInsertRows="False"
                                 CanUserSelect="True"
                                 SelectedItem="{Binding DataContext.SelectedPost,Mode=TwoWay, ElementName=LayoutRoot}"
                                 DataContext="{Binding Budget}" ShowColumnFooters="True"
                                 >
            <telerik:RadGridView.FilterDescriptors>
                <telerik:FilterDescriptor IsCaseSensitive="False"
                                          Member="Name"
                                          Operator="Contains"
                                          Value="Upd"/>
            </telerik:RadGridView.FilterDescriptors>
</telerik:RadGridView>

This does actually work, but isn't very dynamic (just showing snippets of the code here and there are columns in the grid). Back to the drawingboard.

<TextBox x:Name="SearchTermTextBox" Grid.Column="0" Width="150" VerticalAlignment="Center">
       <i:Interaction.Behaviors>
              <behaviors:UpdateOnTextChangedBehavior/>
       </i:Interaction.Behaviors>
</TextBox>
<telerik:RadGridView Grid.Row="2" x:Name="BudgetGrid" AutoGenerateColumns="False"
                                 ShowGroupPanel="False"
                                 Background="{StaticResource LightGreyBackground}"
                                 ItemsSource="{Binding Posts}"
                                 RowDetailsVisibilityMode="Collapsed"
                                 RowIndicatorVisibility="Collapsed"
                                 CanUserDeleteRows="False"
                                 CanUserInsertRows="False"
                                 CanUserSelect="True"
                                 SelectedItem="{Binding DataContext.SelectedPost,Mode=TwoWay, ElementName=LayoutRoot}"
                                 DataContext="{Binding Budget}" ShowColumnFooters="True"
                                 >
            <telerik:RadGridView.FilterDescriptors>
                <telerik:FilterDescriptor IsCaseSensitive="False"
                                          Member="Name"
                                          Operator="Contains"
                                          Value="{Binding ElementName=SearchTermTextBox,Path=Text}"/>
            </telerik:RadGridView.FilterDescriptors>
</telerik:RadGridView>

This doesn't work at all. It seems like the FilterDescriptor can't locate the SearchTermTextBox. If that is the case, what's the point of adding support for binding on a FilterDescriptor? Seems kind of odd to me. I've tried a few other different approaches with no luck as well. Looking at the demo (http://demos.telerik.com/silverlight/#GridView/Search) doesn't help either. I'm not going to add the GridView in my viewmodel as suggested there.

Bottom line...is there a proper MVVM way to use this functionality?
srinivasan
Top achievements
Rank 1
 answered on 11 Mar 2020
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?