Telerik Forums
UI for WPF Forum
3 answers
229 views

I'm trying to bind my own ICommand to a RadRibbonButton's Command. My code is based on the example at http://demos.telerik.com/silverlight/#RichTextBox/Binding. The relevant bit of the XAML hierarchy is:

<telerik:RadRichTextBoxRibbonUI DataContext="{Binding Path=Commands, ElementName=richTextBox}">
     <telerik:RadRichTextBoxRibbonUI.QuickAccessToolBar>
                        <telerik:QuickAccessToolBar>
                            <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=SaveCommand}"     <== This is the button I want to bind my MVVM ICommand to.

Obviously, I removed the RichTextCommand attached property, and tried to bind the Command property to the ICommand on my viewmodel, which is set as the DataContext for the Window. As you can see, the example XAML (above) modifies DataContext at the RadRichTextBoxRibbonUI level, so to get back to "my" DataContext, I set a "Name" to an element higher up the visual tree, and used "ElementName" in my Binding, with the intent of using "Path=DataContext.MySaveCommand"; but I got a binding error saying that it couldn't even find the named element. I also tried {x:Reference} but got circular reference issues with that.

Please can someone demonstrate how to bind that command using MVVM?

My project references the "2016.3.1024.45" version of the assemblies. I tried attaching it; but it wouldn't let me.

Richard
Top achievements
Rank 1
 answered on 09 Jun 2017
1 answer
99 views

 

Hi,

Is there a way to show tool tip when I hovering on the "hour" or "day" in my time line? see attached file.

When I hovering 11 AM I want to show tool tip  : 11:00 AM Aug 6 2012

(according the boundaries of the start/end TimeLine parameters)
When I hovering 13 PM I want to show tool tip  : 13:00 PM Aug 6 2012

 

Martin Ivanov
Telerik team
 answered on 09 Jun 2017
1 answer
159 views

Hi,

 

I have a custom library which has provision to handle '+', '-' and many other operators along with custom functions. My requirement is that, I want spreadsheet to call my library to evaluate the cell formula. The operands of the operators ('+' etc. ) are custom and cannot be calculated by default engine.

Boby
Telerik team
 answered on 09 Jun 2017
1 answer
173 views
We're trying to upgrade our applcations to version 2017 R2 (from 2016 R2) and we are unable to get the dialog boxes from the radRichTextBox control to appear (font and paragraph). When we try to open those dialogs explicitly in code we get exceptions thrown. While tracking down the problems we found that you've introduced many compile time checks for WPF in your code (#if WPF) which are causing the problems.

The assumption in your code that checking for WPF at compile time is enough is incorrect in cases (like ours) that  have applications that mix both WinForms and WPF in the same application. The ability to mix is a core feature provided by Microsoft to provide the ability to support and enhance legacy WinForms applications with WPF functionality.

The error we're experiencing is in the method DialogHelper.CheckApplicationTheme. When the code attempts to access the Application object it is failing because we don't have a WPF Application object - we have a WInForms object. That results in the Application.Current value being null which causes an exception.

We've been using your WPF controls for years and haven't had this problem with previous versions and this is a major problem for us. Microsoft has supported mixing WPF, WInForms and even C++ in one application for years and we have used that ability extensively in our applications. Until now your controls have supported that functionality too.

Do you have a recommended method for supporting mixed application types like we have?
Would rebuilding your WPF source code with the WPF compile flag turned off help us or will there be side effects to that?
Martin
Telerik team
 answered on 09 Jun 2017
1 answer
179 views

Freeze Pane is not working as expected when we try to change freeze position programmatically.

When i try to change freeze position on a Button click the change in the UI for freeze is not happening.

 

Is anything i am doing wrong.?

Thanks

Deyan
Telerik team
 answered on 08 Jun 2017
1 answer
442 views

Hi

I have a RadCartesianChart (see XAML below) in a DataGridTemplateColumn but cannot find a way to reduce the amount of vertical space it is taking up.  It seems to have a minimum height?  Please advise.

<DataGridTemplateColumn Header="MyColumn"
IsReadOnly="True"
Width="300">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<telerik:RadCartesianChart Name="MyChart"
VerticalAlignment="Stretch"
Margin="10"
MaxHeight="20">
<telerik:RadCartesianChart.Behaviors>
<telerik:ChartTooltipBehavior />
</telerik:RadCartesianChart.Behaviors>
<telerik:LineSeries ItemsSource="{Binding HistoricValues}"
ValueBinding="RawValue"
CategoryBinding="Year">
<telerik:LineSeries.PointTemplate>
<DataTemplate>
<Ellipse Fill="Blue"
Width="8"
Height="8"/>
</DataTemplate>
</telerik:LineSeries.PointTemplate>
</telerik:LineSeries>
<telerik:RadCartesianChart.HorizontalAxis>
<telerik:CategoricalAxis />
</telerik:RadCartesianChart.HorizontalAxis>
<telerik:RadCartesianChart.VerticalAxis>
<telerik:LinearAxis Minimum="{Binding HistoricValueMinimum}"
Maximum="{Binding HistoricValueMaximum}"
MajorStep="{Binding HistoricValueStep}"
Visibility="Collapsed"/>
</telerik:RadCartesianChart.VerticalAxis>
</telerik:RadCartesianChart>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>

Thanks

 

Martin Ivanov
Telerik team
 answered on 08 Jun 2017
5 answers
149 views

Hello everyone.

I have noticed a strange RadGridView's behavior when I'm copying value from decimal cell (with DataFormat string) or exporting grid content to Excel. 

If I use IQueryable as GridView ItemsSource, there is copied value the same as on-screen value. For example, I have a value 1000000 in data source and {0:N2} as DataFormatString, and a result value displayed in cell will be "1 000 000,00". When I copy this cell via Ctrl+C or export the datagrid to Excel, the result will be also "1 000 000,00", string with spaces between digits, not number. Math functions in Excel cannot be applied for that value.

However, If use IEnumberable instead IQueryable, the exported and pasted values will be absolutely the same as it in DataSource and will have their native type (decimal).

How can I copy the cell value in it native type using IQueryable as data source?

Ivan Ivanov
Telerik team
 answered on 08 Jun 2017
2 answers
197 views
I would like to implement a ComboBox font selector for all selected diagram text elements. I currently can achieve this via a one-way binding (i.e., the user selects the items, then changes the value of the ComboBox which applies the font to each element). How can I achieve two-way binding for this?
Josh
Top achievements
Rank 1
 answered on 08 Jun 2017
6 answers
203 views
Hi, I use RadRibbonWindow and when I hover on the Quick Access Tool Bar buttons, screen tips appear in a far lower position as in the image.
How can I fix this?
Efi
Top achievements
Rank 1
 answered on 07 Jun 2017
2 answers
124 views

The check-spelling-as-you-type logic of RichTextBox treats multiple words separated by a non-space character (e.g., a comma or slash) as a single word. For example, me/myself gets underlined as shown on the attached picture (or here). Also note how a punctuation mark (e.g., a period) is included and underlined as a part of the word, e.g. for miiispelled. on the same picture.

I've investigated this a bit and it comes down to the fact that both "me/myself" and "miiispelled." are treated with a single SpanLayoutBox, which I believe is an atomic unit for underlining. Please correct me if I'm wrong.

Is this a bug or a "feature"? Is there any workarounds to make RichTextBox to interpret (and spell-check) such sequences of text as separate SpanLayoutBox objects?

Thank you.

Boby
Telerik team
 answered on 07 Jun 2017
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?