Telerik Forums
UI for Silverlight Forum
1 answer
7 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
6 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
77 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
5 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
256 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
Telerik team
 answered on 25 Mar 2020
1 answer
4 views
Can I add more than one item to an viewport? 
Dinko
Telerik team
 answered on 14 Mar 2020
1 answer
4 views
Can I make the TimeLineIten move along the whole area. So that it is not static
Dinko
Telerik team
 answered on 14 Mar 2020
8 answers
334 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
1 answer
16 views

I'm working on WPF app with RadTabControl as Prism region and I don't find solution that fully works as expected.

I have region adapter for tab control, close buttons on tabs, but if I close tab, my region adapter doesn't dispose view model attached by Prism to tab item, it is not garbage collected, so I have memory leaks. 

Can someone attache sample project that works?

Vladimir Stoyanov
Telerik team
 answered on 10 Mar 2020
9 answers
134 views
Hi all,

I'm binding to a RadPane's IsHidden property as follows:

IsHidden

 

="{Binding Hidden, Mode=TwoWay}"

 


My ViewModel looks like this:

 

public bool Hidden

 

{

 

get { return hidden; }

 

 

set

 

{

hidden =

value;

 

PropertyChanged.Raise(

this, "IsHidden");  // Raise is an extension method to do a property changed event

 

}

}


The first time Hidden is set in the ViewModel's constructor, the IsHidden seems to work properly.  Subsequent changes to try to reshow the RadPane through the Hidden property don't work.

best,
-Mike Gold


Vladimir Stoyanov
Telerik team
 answered on 28 Feb 2020
Top users last month
Psyduck
Top achievements
Rank 3
Bronze
Iron
Iron
VB
Top achievements
Rank 1
Iron
serge
Top achievements
Rank 2
Bronze
Iron
Iron
Michael
Top achievements
Rank 1
Iron
Sachita
Top achievements
Rank 1
Iron
Iron
Iron