Telerik Forums
UI for WPF Forum
3 answers
225 views
Hi,
I was stuck at a point where I need to assign a shortcut key which is stored in the database respective to a menu.
When I fetch the data the for the menu, I fetch all the details related to it, in a hierarchical manner and bind it to RadMenu DataSource.
Now my requirement is to assign the shortcut key to each RadMenuItem in the RadMenu, for this I thought of creating a CustomCommand using RoutedCommand, CommandBinding and KeyGesture. With this will create a MenuRoutedCommand and thus create a Command that will be assigned to each RadMenuItems command property.

But when i found the RadMenu items in loaded event, those items are not the RadMenuItem but the collection of Hierarchical object used to create the item. So, not able to assign Command as I was unable to get the RadMenuItem.

Please let me know how to assign Command in HierarchicalData source.

Or If there is anyother approach to assign shortcut keys dynamically to the RadMenuItem.

Please reply to it as soon as possible.

Thanks.
 
Hristo
Telerik team
 answered on 19 May 2011
1 answer
68 views
I am getting the following sorting error in several grids with different bindings when trying to sort. The data shows up correctly but I get an error when I try to sort:
'SystemFindingSystemModifierTypeEntityCollection' type does not have property named 'SystemModifierType_.Name', so cannot sort data collection.

I am using LLBLGen as my ORM and here is an example of a GridViewDataColumn I am using:

<

 

 

telerik:GridViewDataColumn Header="Modifier Type" DataType="{x:Type System:String}" Width="*" DataMemberBinding="{Binding SystemModifierType_.Name}" />

 

Vlad
Telerik team
 answered on 19 May 2011
1 answer
96 views
Can someone provide any example to use ExpressionColumn with MVVM?

I have a GridView Itemsource binded to a collection of clients. Only on the grid i need to show a column to calculate 2 values, but i only find examples puting business logic on view, nothing using mvvm.
Vlad
Telerik team
 answered on 19 May 2011
4 answers
125 views

Hello Telerik,

We use a ResourceFIle for all displayed text in our application in order to support Globalization.  This works great for the GridViewDataColumn.Header unless it is in a child GridView. 

In the example below, we were forced to use a custom header in in the RowDetailsTemplate in order for the Header to Display correctly.  If we set the Header property in _gridDetails like in _gridPing it does not work. There were no binding errors, but the Header text was the displaying the binding property name, not the ResourceFile property value.

Is this a known issue?  I would like to use the simpler syntax if possible.


Thank you,
-Mark

<datagrid:NstrumentDataGrid x:Name="_gridPing"  Grid.Row="1" ItemsSource="{Binding Responses}"  >
    <datagrid:NstrumentDataGrid.Columns>
        <telerik:GridViewToggleRowDetailsColumn />
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Address}" Width="150" DataMemberBinding="{Binding Path=Address}" />
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Bytes}" Width="75" DataMemberBinding="{Binding Path=BufferLength}"/>
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Sent}" Width="75" DataMemberBinding="{Binding Path=Sent}"/>
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Received}" Width="90" DataMemberBinding="{Binding Path=Received}"/>
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.PercentLost}" Width="75" DataMemberBinding="{Binding Path=PercentLost}" />
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Min}" Width="75" DataMemberBinding="{Binding Path=Min}" />
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Avg}" Width="75" DataMemberBinding="{Binding Path=Avg}" />
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Max}" Width="75" DataMemberBinding="{Binding Path=Max}" />
    </datagrid:NstrumentDataGrid.Columns>
    <datagrid:NstrumentDataGrid.RowDetailsTemplate>
        <DataTemplate >
            <datagrid:NstrumentDataGrid x:Name="_gridDetail" ItemsSource="{Binding Responses}" Margin="25,0,0,0" BorderThickness="0" >
                <datagrid:NstrumentDataGrid.Columns>
                    <telerik:GridViewDataColumn Width="125" DataMemberBinding="{Binding Path=Status}" >
                        <telerik:GridViewDataColumn.Header>
                            <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Status}"/>
                        </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="125" DataMemberBinding="{Binding Path=RoundTripTime}" >
                        <telerik:GridViewDataColumn.Header>
                            <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.RTT}"/>
                        </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="125" DataMemberBinding="{Binding Path=BufferLength}" >
                        <telerik:GridViewDataColumn.Header>
                            <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.BufferLength}"/>
                        </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                </datagrid:NstrumentDataGrid.Columns>
            </datagrid:NstrumentDataGrid>
        </DataTemplate>
    </datagrid:NstrumentDataGrid.RowDetailsTemplate>
    <telerik:RadContextMenu.ContextMenu >
        <telerik:RadContextMenu x:Name="_contextMenu"  Opened="RadContextMenu_Opened"/>
    </telerik:RadContextMenu.ContextMenu>
</datagrid:NstrumentDataGrid>
mark
Top achievements
Rank 1
 answered on 18 May 2011
3 answers
163 views
Do the Telerik controls work with Visual State Manager?  I am using 2010.1.309.35 right now, and specifically I am working on the GridViewRow.  I notice that the template doesn't automatically show states in Blend, but didn't expect it to either.  But it appears that I cannot create these states either like I can on standard MS WPF 3.5 controls.  For example, I created a VisualStateGroup named CommonStates and added the states Normal and MouseOver.  I really prefer working with VSM as opposed to triggers and wondered if someone from Telerik could address VSM support in Telerik controls.

Thanks,
David
Kalin Milanov
Telerik team
 answered on 18 May 2011
5 answers
103 views
Hi,
I was wondering, is it possible to create your own chart type in RadChart?

Thanks,
Petr
Giuseppe
Telerik team
 answered on 18 May 2011
3 answers
362 views

Hi,

How would you handle the following issue?

Setup
I have a DocumentHost control which contains 2 RadPanes (RadPane1 and RadPane2). Each RadPane contains 2 textboxes (Textbox1 and Textbox2). I have subscribed to the GotFocus and LostFocus on each RadPane.

Steps
1. I float RadPane2 and subscribe to the GotFocus and LostFocus of the ToolWindow using the PaneStateChange event.
2. I leave RadPane1 in the DocumentHost.
3. I click on RadPane1 Textbox1 and the RadPane1 GotFocus is fired.
4. I click on RadPane2 Textbox1 and the RadPane2 and ToolWindow GotFocus is fired.
5. I click on RadPane1 Textbox1 and no GotFocus is fired for RadPane1.
6. I click on RadPane2 Textbox1 and no GotFocus is fired for RadPane2.
7. If I click on RadPane1 Textbox2 GotFocus is fired.

Observation
It seems as though I can have one RadPane in the DocumentHost and one floating ToolWindow which both think they have focus at the same time. Shouldn't I only be able to have one RadPane that has focus as any point in time?

Question

How can I work out which pane has focus regardless of where it is located? Unfortunately the RadDocking control does not have an event like this.

 

Yana
Telerik team
 answered on 18 May 2011
5 answers
577 views
Hey everyone,

I've been working hard for a solution for this but to no avail up to this point.  We are working in a WPF - XBAP configuration to port a legacy PowerBuilder app and are finding ourselves mostly at home using the Telerik WPF Controls.  While our issue may not be directly related to the controls in particular, it is a factor of using them for specific purposes.  We are using an overall RadMenu for navigation and obviously input accelerators (Alt+M,S, etc.) generally conflict with the browser.  However, keyboard shortcuts themselves, something like a Ctrl+Shift+M, do not conflict.  I'm looking for a configuration that allows the shortcuts to be mapped to RadMenuItem clicks application wide, so that they are focus independent and always bubble to the Menu.  So far, I've been at a loss to narrow down my search to exactly what I need and, being new to WPF, it's already been a learning curve ahead.

What approach would you recommend for achieving this?  Would doing the same setup work differently/better with a standalone WPF app or a Silverlight app such that it is truly the XBAP format that is hurting my implementation of this so far?

Thanks a ton,
Adam.g
Hristo
Telerik team
 answered on 18 May 2011
4 answers
699 views
I've been trying to style the Rad Tab Control and I've been mostly successful with one minor detail remaining. In the drop down button on the far right (where you can click through the other tabs) if you highlight over the options the background color turns orange - you can see what I'm talking about in the image below. I have tried to change the theme and all of the options seem to have a blue hover over color. It seems as though this orange background is being applied in the DropDownStyle's ItemsPresenter but I can't figure out where to make the change to use the correct color. Additionally, I'd like if the elements were stretched to take up the entire space in the drop down so that the "x" close buttons are all neatly aligned on the left. 

If you can help me with these two issues I would greatly appreciate it.
  1. Blue hover over on Drop Down Menu items (instead of the orange)
  2. Stretch the elements in the ItemsPresenter to take up the full space so that they are all neatly aligned.

On a side note, if you have the hex colors or brush easily accessible for the other blue hover overs (like on the office_blue or Windows7 themes) I would appreciate it so that I can make sure it matches with the rest of the system.

Thank you,
Ben
Drop Down Menu Image
Ben
Top achievements
Rank 1
 answered on 17 May 2011
1 answer
150 views
Hi team...
Im using Radbook with RadDocumentBindingSource.
RadDocumentBindingSource use RadDocument..
I added HyperLink in RadDocument..
But hyperLink is work at Click with Press Ctrl Key.
I Want hyperlink work just click..
RadRichTextBox Have HyperlinkNavigationMode..
but RadBook,RadDocumentBindingSource,RadDocument
don have HyperlinkNavigationMode.
How Can I use hyperlink without Ctrl Key?

And When I use System.windows.Document.hyperlink...
i could use hyperlink.MouseClick+=clickEvent;
but HyperlinkInfo don have any event..

please help me.

Thanks~
Boby
Telerik team
 answered on 17 May 2011
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
PersistenceFramework
DataPager
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?