Hi,
I have a WPF application with SpellChecker integrated with RadRichTextBox. The Richtextbox has a long content and is displayed in multiple pages and i need to achieve the below 3 things
1) SpellChecker highlights the word that needs to be changed but it does not not properly scroll to the next mispelled word which is on the next page.
2) The 'Not in Dictionary' section of the SpellChecker does not allow editing the wording there itself similar to MS Word.
3) SpellChcker not not go to the top of the page if we are at the bottom of the page.
Please help on how to achieve this.

Hi Telerik,
I'm using a RadDiagram with a custom RadDiagramConnection :
<Style TargetType="diagramscontrols:RadDiagramConnection" x:Key="RadDiagramConnectionStyle_RotateText"> <Setter Property="StrokeThickness" Value="1"/> <Setter Property="HorizontalContentAlignment" Value="Stretch"/> <Setter Property="VerticalContentAlignment" Value="Stretch"/> <Setter Property="FocusVisualStyle" Value="{x:Null}"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="telerik:RadDiagramConnection"> <Grid x:Name="RootTemplate" MinHeight="0" HorizontalAlignment="Stretch"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="SelectionStates"> <VisualState x:Name="Selected"/> <VisualState x:Name="SelectedInGroup"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectedInGroupPath" Storyboard.TargetProperty="Visibility" Duration="0"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Unselected"/> <VisualState x:Name="SelectedAsGroup"/> </VisualStateGroup> <VisualStateGroup x:Name="EditMode"> <VisualState x:Name="NormalMode"/> <VisualState x:Name="NormalEditMode"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="NormalContent" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Collapsed</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="EditContent" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="TextBoxEditMode"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="NormalContent" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Collapsed</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="EditTextBox" Storyboard.TargetProperty="Visibility"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Path x:Name="DeferredPath" Stroke="{TemplateBinding Stroke}" Opacity="0.7" Fill="{TemplateBinding Background}" StrokeThickness="{TemplateBinding StrokeThickness}" StrokeDashArray="2 2"/> <Path x:Name="SelectedInGroupPath" Visibility="Collapsed" Stroke="Green" /> <Path Stroke="{TemplateBinding Stroke}" Fill="{TemplateBinding Background}" StrokeThickness="{TemplateBinding StrokeThickness}" x:Name="GeometryPath" StrokeDashArray="{TemplateBinding StrokeDashArray}"/> <Grid x:Name="EdittingElement" RenderTransformOrigin="0.5 0.5" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Grid.LayoutTransform> <RotateTransform> <RotateTransform.Angle> <MultiBinding Converter="{StaticResource PointsToAngleConverter}"> <Binding Path="StartPoint" RelativeSource="{RelativeSource AncestorType=telerik:RadDiagramConnection}" /> <Binding Path="EndPoint" RelativeSource="{RelativeSource AncestorType=telerik:RadDiagramConnection}" /> <Binding ElementName="DeferredPath" Path="Data" /> </MultiBinding> </RotateTransform.Angle> </RotateTransform> </Grid.LayoutTransform> <Border Background="Transparent"/> <TextBlock x:Name="NormalContent" Foreground="{TemplateBinding Foreground}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" Text="{TemplateBinding Content}" TextAlignment="{Binding Tag.TextAlignement, RelativeSource={RelativeSource AncestorType=diagramscontrols:RadDiagramConnection}}" HorizontalAlignment="{Binding Tag.HorizontalTextAlignement, RelativeSource={RelativeSource AncestorType=diagramscontrols:RadDiagramConnection}}" VerticalAlignment="Center"> <TextBlock.Margin> <MultiBinding Converter="{StaticResource MarginConverter}"> <Binding Path="StartPoint" RelativeSource="{RelativeSource AncestorType=telerik:RadDiagramConnection}" /> <Binding Path="EndPoint" RelativeSource="{RelativeSource AncestorType=telerik:RadDiagramConnection}" /> <Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}" /> </MultiBinding> </TextBlock.Margin> </TextBlock> <ContentPresenter x:Name="EditContent" Visibility="Collapsed" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding EditTemplate}"/> <TextBox x:Name="EditTextBox" Visibility="Collapsed"> <TextBox.InputBindings> <KeyBinding Key="Enter" Command="ApplicationCommands.NotACommand"/> </TextBox.InputBindings> </TextBox> </Grid> </Grid> </ControlTemplate> </Setter.Value> </Setter></Style>
To save my diagram, I'm using this code :
Dim pathDiagram As String = myDiagram.Save()Dim xml_doc As XDocument = XDocument.Parse(pathDiagram)
The problem is that I want to save the HorizontalAlignement of the text in my custom RadDiagramConnection, and I don't know how I can do this.
For custom TextShape, the HorizontalAlignement is saved, like in the attached picture.
Do you know how I can add the save of HorizontalAlignement property during Diagram saving ?
Thank you.
Valentin.
Hi All,
I created a custom gridview which inherit from radgridview. And I have a ControlPanelItem which include a toggle button, The button has IsFilteringAllowed property. It works correctly when the gridview Visible.
But when the gridview initially collapsed a binding error occured in output.
"Cannot find source for binding with reference 'ElementName=grid'. BindingExpression:Path=IsFilteringAllowed; DataItem=null; target element is 'ToggleButton' (Name=''); target property is 'IsChecked' (type 'Nullable`1')"
This is my control xaml
<UserControl x:Class="DemoApplication.CustomGridView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="300"
x:Name="grid">
<Grid>
<telerik:RadGridView>
<telerik:RadGridView.ControlPanelItems>
<telerik:ControlPanelItem ButtonTooltip="Allow Filtering">
<telerik:ControlPanelItem.ButtonContent>
<ToggleButton IsChecked="{Binding IsFilteringAllowed, ElementName=grid}"
Width="16"
Height="16"
MinWidth="16"
MinHeight="16"
Padding="0,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderThickness="0">
</ToggleButton>
</telerik:ControlPanelItem.ButtonContent>
</telerik:ControlPanelItem>
</telerik:RadGridView.ControlPanelItems>
</telerik:RadGridView>
this is xaml.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace DemoApplication
{
/// <summary>
/// Interaction logic for CustomGridView.xaml
/// </summary>
public partial class CustomGridView : UserControl
{
public CustomGridView()
{
InitializeComponent();
}
//
// Summary:
// Gets or sets a value indicating whether the control can be filtered through
// the UI.
public static readonly DependencyProperty IsFilteringAllowedProperty =
DependencyProperty.Register("IsFilteringAllowed", typeof(Boolean), typeof(CustomGridView));
public Boolean IsFilteringAllowed
{
get { return (Boolean)GetValue(IsFilteringAllowedProperty); }
set { SetValue(IsFilteringAllowedProperty, value); }
}
}
}
</Grid>
</UserControl>
and this is my view
<Window x:Class="DemoApplication.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:DemoApplication"
Title="MainWindow"
Height="350"
Width="525">
<Grid>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
</Grid.RowDefinitions>
<local:CustomGridView x:Name="grid"
Visibility="Collapsed" />
</Button>
</Grid>
</Window>
Thanks
Hi,
on my data grids I have implemented the functionality to do an save and load the layout, reset the layout to default and to do an export to Excel. This is done by a ContextMenu defined in a style, which works fine.
<Setter Property="ContextMenu">
<Setter.Value>
<ContextMenu>
<MenuItem Header="Export to Excel" Command="{Binding ExportToExcelCmd}" CommandParameter="{Binding Path=PlacementTarget, RelativeSource={RelativeSource Mode=FindAncestor, AncestorLevel=1, AncestorType={x:Type ContextMenu}}}">
<MenuItem.Icon>
<Image Source="/Resources/Icons/Excel.png" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="Save grid layout" Command="{Binding SaveDataGridLayoutCmd}" CommandParameter="{Binding Path=PlacementTarget, RelativeSource={RelativeSource Mode=FindAncestor, AncestorLevel=1, AncestorType={x:Type ContextMenu}}}">
<MenuItem.Icon>
<Image Source="/Resources/Icons/Save.png" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="Load grid layout" Command="{Binding LoadDataGridLayoutCmd}" CommandParameter="{Binding Path=PlacementTarget, RelativeSource={RelativeSource Mode=FindAncestor, AncestorLevel=1, AncestorType={x:Type ContextMenu}}}">
<MenuItem.Icon>
<Image Source="/Resources/Icons/Refresh.png" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="Reset grid layout" Command="{Binding ResetDataGridLayoutCmd}" CommandParameter="{Binding Path=PlacementTarget, RelativeSource={RelativeSource Mode=FindAncestor, AncestorLevel=1, AncestorType={x:Type ContextMenu}}}">
<MenuItem.Icon>
<Image Source="/Resources/Icons/Refresh.png" />
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</Setter.Value>
</Setter>
Recently I discoverd the ControlPanel control. I copied/paste the code from the demo to implement the show/hide columns feature. Now I would like to switch from the above ContextMenu to a ControlPanel with buttons for each action:
<telerik:ControlPanelItemCollection>
<telerik:ControlPanelItem ButtonTooltip="Column chooser" >
<telerik:ControlPanelItem.ContentTemplate>
<DataTemplate>
<ListBox ItemsSource="{Binding Columns}" BorderThickness="0">
<ListBox.ItemTemplate>
<DataTemplate>
<CheckBox Content="{Binding Header, Mode=OneWay}" IsChecked="{Binding IsVisible, Mode=TwoWay}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DataTemplate>
</telerik:ControlPanelItem.ContentTemplate>
</telerik:ControlPanelItem>
<telerik:ControlPanelItem ButtonTooltip="Save/Load layout" >
<telerik:ControlPanelItem.Content>
<ListBox>
<Button Content="Export to Excel" Command="{Binding ExportToExcelCmd}" CommandParameter="{Binding ?"/>
<Button Content="Save grid layout" Command="{Binding SaveDataGridLayoutCmd}" CommandParameter="{Binding ?}"/>
<Button Content="Load grid layout" Command="{Binding LoadDataGridLayoutCmd}" CommandParameter="{Binding ?}"/>
<Button Content="Reset grid layout" Command="{Binding ResetDataGridLayoutCmd}" CommandParameter="{Binding ?}"/>
</ListBox>
</telerik:ControlPanelItem.Content>
</telerik:ControlPanelItem>
But I'm stuck with the binding of the Command. As I'm using the MVVM pattern, the Command is bound to a command in my ViewModel. This works fine for the ContextMenu, but not for the ControlPanel.
Also, the datagrid itself needs to be send as a parameter with the command and I'm not sure how to do this.
Any help would be much appreciated.
Regards,
Hans

Hi,
Is it possible to select different visual template/theme dynamically in code to handle different type of alert. For example red background for critical message while blue background is for normal alert.
Thanks.


Hi,
I'm creating a radgridview from an existing datatable. I need one column to have all its cells as hyperlinks to a directory.
I tried:
GridViewHyperlinkColumn gridViewHyperlinkColumn = new GridViewHyperlinkColumn(){Header = "test",TargetName = "c://" + rowValue};gridViewHyperlinkColumn.PreviewMouseDown += OpenTarget;datarow[column] = gridViewHyperlinkColumn;
But the cell shows the following result: Telerik.Windows.Controls.GridViewHyperlinkColumn instead of showing the row value underlined.
Can anyone help me?
Regards
Telerik version: 2018.2.820.40, Visual Studio 2017, Theme Method = StyleManager, Theme Applied = ExpressionDark, MVVM
<telerik:RadTileView Grid.Row="1" IsEnabled="{Binding CanAccess, Mode=OneWay}" ItemsSource="{Binding TestBoardCollection, Mode=OneWay}" Style="{StaticResource tileStyle}"/>
<telerik:RadTabControl ItemsSource="{Binding TestSiteCollection, Mode=OneWay}" IsContentPreserved="True"> <telerik:RadTabControl.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding TestSiteName, Mode=OneWay}"/> </DataTemplate> </telerik:RadTabControl.ItemTemplate> <telerik:RadTabControl.ContentTemplate> <DataTemplate> <ContentControl cal:View.Model="{Binding}" Margin="0,8,0,0"/> </DataTemplate> </telerik:RadTabControl.ContentTemplate></telerik:RadTabControl>Hi,
I have a RadGrid created via code behind, all data is of type String.
When i try to group any of the columns i get the following error:
System.InvalidCastException: 'Specified cast is not valid.'
More details:
System.InvalidCastException HResult=0x80004002 Message=Specified cast is not valid. Source=PresentationFramework StackTrace: at System.Windows.Controls.Border.get_BorderThickness() at System.Windows.Controls.Border.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Grid.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.StackPanel.StackMeasureHelper(IStackMeasure measureElement, IStackMeasureScrollData scrollData, Size constraint) at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.StackPanel.StackMeasureHelper(IStackMeasure measureElement, IStackMeasureScrollData scrollData, Size constraint) at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.ContextLayoutManager.UpdateLayout() at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg) at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork() at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.DispatcherOperation.InvokeImpl() at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state) at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Threading.DispatcherOperation.Invoke() at System.Windows.Threading.Dispatcher.ProcessQueue() at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) at System.Windows.Application.RunDispatcher(Object ignore) at System.Windows.Application.RunInternal(Window window) at System.Windows.Application.Run(Window window) at System.Windows.Application.Run() at MyModule.App.Main()I have no idea of what is wrong. Can anyone help me?