Telerik Forums
UI for WPF Forum
1 answer
166 views

Hi

I have the radial menu working as a standalone and can see how it works as a context menu to an element, but how do I define the context menu so it can be used by many elements of the same type.

In my app the user can double click on one of 20 items, some items are of the same type, say some are 'apples' and some are 'oranges', theses elements are added to visual tree in code, when the user double clicks one I want to be able to determine the items type and then display the correct radial menu as a context menu.

I have seen examples for other platforms, but the WPF docs do not cover this functionality.

Georgi
Telerik team
 answered on 05 Jun 2015
5 answers
325 views

Hi guys,

I have this XAML

<telerik:RadTreeListView AutoGenerateColumns="False" ItemsSource="{Binding Categories}" SelectedItem="{Binding SelectedCategory,Mode=TwoWay}">
   <telerik:RadContextMenu.ContextMenu>
     <telerik:RadContextMenu x:Name="CategoryContextMenu" Opened="CategoryContextMenu_Opened">
       <telerik:RadMenuItem Header="Aggiungi" />
     </telerik:RadContextMenu>
   </telerik:RadContextMenu.ContextMenu>
   <telerik:RadTreeListView.ChildTableDefinitions>
     <telerik:TreeListViewTableDefinition ItemsSource="{Binding Categories}" />
   </telerik:RadTreeListView.ChildTableDefinitions>
   <telerik:RadTreeListView.Columns>
     <telerik:GridViewDataColumn DataMemberBinding="{Binding Description}" Header="Categoria" />
     <telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding Positive}" Header="Positivo" />
   </telerik:RadTreeListView.Columns>
</telerik:RadTreeListView>

 Now, if I click on anything node, enter in CategoryContextMenu_Opened but GetClickedElement return null ever!

private void CategoryContextMenu_Opened(object sender, RoutedEventArgs e)
{
   RadTreeViewItem item = this.CategoryContextMenu.GetClickedElement<RadTreeViewItem>();
   if (item != null) //It never true!!!
   {
     viewModel.SelectedCategory = (LocalCategory)item.DataContext; //Can I do it?
    }
}

Dario
Top achievements
Rank 2
 answered on 05 Jun 2015
4 answers
112 views

Hello,

I need to achieve the following effect with RadChartView: both horizontal and vertical axis are numeric, I need to plot multiple rectangular regions on this Cartesian plane. See attached figure for an example.

Is there a way to achieve this with RadChartView? I know that none of the series by default do this. Is it possible to write my own custom series?

Vinod
Top achievements
Rank 1
 answered on 05 Jun 2015
2 answers
207 views

Hi,

I would like to create a Grid using Hierarchy programmatically

 

radGridView.ChildTableDefinitions.Add(new GridViewTableDefinition());
var g = new FrameworkElementFactory(typeof(TextBlock));
g.SetValue(TextBlock.TextProperty, "TEST");
DataTemplate dt = new DataTemplate();
dt.VisualTree = g;
radGridView.HierarchyChildTemplate = dt;

I can developp/reduce hierarchy but nothing in details. I did the same into xaml code with success.

How to code correctly datatemplate ?

Thanks 

Regards

Eric

 

Eric
Top achievements
Rank 1
 answered on 05 Jun 2015
1 answer
234 views

Hi

On your WPF demo, when a menuitem that has child menuitems is clicked (not using it's header, just on the name/icon), the child items are shown.

This saves this user having to click on the outer circle header which is handy.

How's this done, I can't get this to happen?

I've made the parent menuitem CanUserSelect="True", do I need to wire up some code also??

 

Thanks in advance.

Georgi
Telerik team
 answered on 05 Jun 2015
3 answers
224 views
I was pointed to the virtualised wrappanel by another developer but i've not managed to figure out if what I need is possible.

I want to have a wrappanel containing custom objects eg:

public class CO
{
    public int GroupA {get; set;}
   
    ... other properties not needed for this example
}

I've also got a group object like:

public class Group
{
    public int ID {get; set}
    public string Description {get; set}
}

I'm wanting a wrappanel where I can show the CO's. That's easy, WPF does this already.

What i'm wanting to do is trigger a "group by" so if I set to say A, then the wrappanel shows

GROUP 1 DESCRIPTION
   all CO's with GroupA = 1

GROUP 2 DESCRIPTION
  all CO's with GroupA = 2

This can be toggled on/off.

A further complication is where I may have different groups to group by eg: another GroupB member or, have a List<int> GroupMember and group if the desired ID is found in the list.

I have found a control by a telerik competitor which does do what i'm asking, but the price is over 10x Telerik and definately out of my price point.

Can this be done in the telerik suite ?

Ivan Ivanov
Telerik team
 answered on 05 Jun 2015
2 answers
192 views

Hi,
We are using Telerik RadDocking control within our main framework window. The RadDocking contains RadSplitContainers that has a RadPaneGroup with RadDoumentPane and RadDoumentPane.content 

Description: 
The content (RadDoumentPane.content) is WPF user control for to Displaying Data.
The data we display is rendered by some graphic component, using DirectX to render images on the Rad panel control.

This graphic component is writen in native C++/MFC, and is informed of the hosting WPF application window through its handle, in addition to the location of the Rad panel control. When given the order, this component is creating a window, to which it renders all its content,
placing that window exactly on the same location that we give (the location of the Dock panel). 

Issue:
The problem starts when we're undock the panel. We then have to inform the graphic component on the change
of host to the native window (when docked, the host is actually the main application window, but when undocked, it is rather the Docking panel itself). It seems that when we do that, we do get the native window to be hosted on the Dock panel (we see menus that belong to the native window, but no image is rendered on the native window.

*when the control is docked all works fine.

I think maybe it is a related issue
http://www.telerik.com/forums/wpf-frame-control-not-visible-in-floating-window

shay
Top achievements
Rank 1
 answered on 04 Jun 2015
1 answer
155 views

Hi, I have a problem probably with binding - when I try load something from database - everything works fine, but when I try save something to database - property is null

Detail.PoznamkaMax is ViewModel property - data from database

<telerik:RtfDataProvider x:Name="rtfDataProvider"
           Rtf="{Binding ElementName=poznamka, Path=Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
          RichTextBox="{Binding ElementName=editor}"
                                 />
<risCtrl:RadTextInput x:Name="poznamka" Margin="0 100 0 0" Text="{Binding Path=Detail.PoznamkaMax,Mode=TwoWay,
                                            ValidatesOnExceptions=False, NotifyOnValidationError=True}" />
             
            <telerik:RadRichTextBox x:Name="editor" Grid.Row="1" Grid.Column="0"
                                    DocumentContentChanged="editor_DocumentContentChanged"
                                    Margin="0 4 0 0"
                />

Tanya
Telerik team
 answered on 04 Jun 2015
1 answer
101 views

Hi all, 

I am facing few issues in command  OpenContextMenuOnNextSpellingErrorCommand. I use this command to find the next word that is spelled wrongly in the document. It works fine as long as the words in the document doesnt contain special characters and keeps finding the next error word in the document. But once if it finds the words contain the special character like (RevPAR), Luto'n or Test$word, it stops finding for the next word in the document and gets stuck.

Is there any way I can fix this please ? We are using telerik version 2014.3.1021.40.

Thanks

A

 

Svetoslav
Telerik team
 answered on 04 Jun 2015
3 answers
703 views
This works with the standard ListBox:
<Window x:Class="WpfApplication1.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
         
        <Grid.Resources>
            <Style  TargetType="{x:Type ListBoxItem}">
                <Style.Triggers>
                    <Trigger Property="ItemsControl.AlternationIndex" Value="0">
                        <Setter Property="Background" Value="LightYellow"></Setter>
                    </Trigger>
                    <Trigger Property="ItemsControl.AlternationIndex" Value="1">
                        <Setter Property="Background" Value="LightBlue"></Setter>
                    </Trigger>
                </Style.Triggers>
            </Style>
        </Grid.Resources>
         
         
        <ListBox ItemsSource="{Binding Path=Items}"
                      AlternationCount="2"/>
         
    </Grid>
</Window>


This does not work with the RadListBox:
<Window x:Class="WpfApplication1.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
         
        <Grid.Resources>
            <Style  TargetType="{x:Type t:RadListBoxItem}">
                <Style.Triggers>
                    <Trigger Property="ItemsControl.AlternationIndex" Value="0">
                        <Setter Property="Background" Value="LightYellow"></Setter>
                    </Trigger>
                    <Trigger Property="ItemsControl.AlternationIndex" Value="1">
                        <Setter Property="Background" Value="LightBlue"></Setter>
                    </Trigger>
                </Style.Triggers>
            </Style>
        </Grid.Resources>
         
         
        <t:RadListBox ItemsSource="{Binding Path=Items}"
                      AlternationCount="2"/>
         
    </Grid>
</Window>


Any ideas?
Geri
Telerik team
 answered on 04 Jun 2015
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
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?