Telerik Forums
UI for WPF Forum
4 answers
581 views

RadRichTextBox is realy a very powerful control, except when comes to using Arabic language. However, I made many posts regarding this issue and came up with e result; where such problems regarding Arabic language may be managed later on in next releases.

Any way, I found a work around; where I captured keyboard messages and replaced numbers with their Arabic representations using the following function:

Public Shared Function TranslateNumerals(ByVal _char As Char) As String
            If TranslationService.CurrentLocalizationInstance.CurrentLanguage = LanguageNames.Arabic Then
                Dim enc As New System.Text.UTF8Encoding
                Dim utf8Decoder As System.Text.Decoder
                utf8Decoder = enc.GetDecoder
                Dim sTranslated = New System.Text.StringBuilder
                Dim cTransChar(1) As Char
                Dim bytes() As Byte = {217, 160}
 
                ' Start Converting characters into Arabic mode.
 
                If Char.IsDigit(_char) Then
                    bytes(1) = 160 + CInt(Char.GetNumericValue(_char))
                    utf8Decoder.GetChars(bytes, 0, 2, cTransChar, 0)
                    sTranslated.Append(cTransChar(0))
                Else
                    sTranslated.Append(_char)
                End If
                TranslateNumerals = sTranslated.ToString
            Else
                TranslateNumerals = _char
            End If
        End Function

Where _char is an english number (e.g. 2,3,4,...) and the return string is the Arabic representation.

My question is: how to use such function to replace English numbers coming up from numbered lists, with their Arabic representation? I tried using ListLevelStyle but I could not find where lies the up coming numbers of the list.

Any help would be greatly appreciated .....

The attached image shows my requirement:

 

①Dr Mostafa
Top achievements
Rank 1
 answered on 08 Sep 2017
1 answer
146 views

Hello Telerik Forum,

 

We have a problem in the EditAppointment dialog of the ScheduleView. In ower Software we have two options to view an appointment.

the first one is over the ScheduleView with wich we have no problems. the second one is over a RadGridView.

If we open an Appointment over the RadGridView we use:

"RadScheduleViewCommands.EditAppointment.Execute(appointment, scheduleView);" to get a EditAppointment dialog.

Now if we change the start- or endtime of the appointment we get an NullReference exception by calling the "DateSpan(IDateSpan)" Constructor. This error occurs only by editing the appointment via RadGridView. So we have no influence by saving the appointment.

 

Here is the snippet of the StackTrace where the error appears:

System.NullReferenceException: object reference not set to an instance of an object.
   bei Telerik.Windows.Controls.ScheduleView.DateSpan..ctor(IDateSpan other)
   bei Telerik.Windows.Controls.ScheduleView.Slot..ctor(IOccurrence occurence)
   bei Telerik.Windows.Controls.ScheduleView.ReadOnlyBehavior.CanEditAppointment(IReadOnlySettings readOnlySettings, IOccurrence occurrence)
   bei Telerik.Windows.Controls.ScheduleView.ReadOnlyBehavior.CanSaveAppointment(IReadOnlySettings readOnlySettings, IOccurrence occurrence)
   bei Telerik.Windows.Controls.ScheduleViewBase.OnAppointmentEditConfirmed(Object sender, EventArgs e)
   bei Telerik.Windows.Controls.SchedulerDialogViewModel.OnConfirmed(EventArgs eventArgs)
   bei Telerik.Windows.Controls.SchedulerDialogViewModel.<OnConfirmCommand>b__0(SchedulerDialogViewModel vm)
   bei Telerik.Windows.Controls.SchedulerDialogViewModel.DoWithViewModel[T](Object sender, Action`1 action)
   bei Telerik.Windows.Controls.SchedulerDialogViewModel.OnConfirmCommand(Object sender, ExecutedRoutedEventArgs e)
   bei System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
   bei System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
   bei System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
   bei System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
   bei System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
   bei System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
   bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   bei System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
   bei System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)
   bei MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   bei System.Windows.Controls.Primitives.ButtonBase.OnClick()
   bei System.Windows.Controls.Button.OnClick()
   bei Telerik.Windows.Controls.RadButton.OnClick() --> LAST USER INTERACTION

 

Nice greetings Patrick.

 

Kalin
Telerik team
 answered on 08 Sep 2017
3 answers
362 views
We had bought a licence for Dev Craft Complete for WPF library and began use it since spring of 2016. This library has been installed on my computer. Сurrently the license is valid. But when I try (in my application) to add reference to any DLL then this reference is not found. For example, if I try to add reference to Telerik.Windows.Controls then it hasn't been found e.t.c. Why does this situation has place? In this situation I can't write the application using Telerik Dev Craft Complete. Please help me.
Vladimir Stoyanov
Telerik team
 answered on 07 Sep 2017
4 answers
120 views

Hi,

 

I have a disabled button in my ribbon bar and I want to have Hot key  ( Access Text ) is not highlighted when the button is disabled. How could I make not associated highlighted hot key when the button associated is disabled?

 

Please help me in this issue

 

BR,

Support ESW DVP

 

Dilyan Traykov
Telerik team
 answered on 07 Sep 2017
5 answers
334 views

Hi All,

I am trying to implement an AutoCompleteBox dynamically in C#, everything loads great but I have ~15,000 records to filter and it takes a few seconds to load. I have read that this can be improved with AsyncFilteringBehaviour but only ever see reference to how this is set in XAML.

 

I have tried to simply set the following, but am obviously missing something because it doesn't filter at all when I do this:

myAutoCompleteBox.FilteringBehavior = new AsyncFilteringBehavior();

 

Any help would be appreciated!

Kalin
Telerik team
 answered on 07 Sep 2017
1 answer
173 views

Hi!

I have a Grid FilteringMode="FilterRow" and column type is Date , near funnel icon have button to show calendar , how can i customize that calendar with my component .

i search a lot in Documents and forums but could't find anything.

attached my component UI

Dilyan Traykov
Telerik team
 answered on 07 Sep 2017
1 answer
127 views
Hello,

as mentioned in the title, I would like to set some of RadToolTipServices' properties globally. I tried to set them as follows:
<Style x:Key="RadToolTipStyle" TargetType="telerik:RadToolTip">
    <Setter Property="Placement" Value="Top"/>
    <Setter Property="HorizontalOffset" Value="10"/>
    <Setter Property="VerticalOffset" Value="10"/>
    ...
</Style>
<Style TargetType="telerik:RadToolTip" BasedOn="{StaticResource RadToolTipStyle}"/>
but this had no effect on the positioning. Do I have to set those properties elsewhere or is this a bug?
Currently, I got the desired result by adjusting the margin in the template.

Best regards
Dinko | Tech Support Engineer
Telerik team
 answered on 07 Sep 2017
6 answers
755 views
I have a GridView and a PropertyGrid both created in code not XAML.
Now I try to bind the selected item of the GridView to the PropertyGrid also via code and not XAML.
I tried something like this:

Binding propGridBinding = new Binding("SelectedItem");
propGridBinding.ElementName = "myTreeListView";   // assuming this is the name of the GridView
propertyGrid.Item = propGridBinding;

But when I try to run this code I get an error message like this:
An unhandled exception of type 'System.NotSupportedException' occurred in System.dll
Additional information: 'CultureInfoIetfLanguageTagConverter' is unable to convert '(null)' to 'System.String'.

I even get the same type of error if I just try to bind the PropertyGrid to a visual element to be able to view and edit its properties.

I must be missing something.

Any help is very much appreciated.

Thanks,
Markus
Yoan
Telerik team
 answered on 06 Sep 2017
1 answer
406 views

Hi

We have implemented a validation through data annotation on a RadMaskedTextInput using this link: http://docs.telerik.com/devtools/wpf/controls/radmaskedinput/features/validation/regex

We are having an issue when we are implementing it with a custom control.

 

In the provided solution when RadMaskedTextInput, one is provided through the  control and the other one is directly in the MainWindow.

The first RadMaskedTextInput (from the custom control) does not validate the data.

The second RadMaskedTextInput is validating the data when we are directly typing in it.

we suspect that it is related to the fact that we are binding a dependency property

How can we modify the custom control to trigger the validation on the property?

Thank you for your help

Alexandre

Solution

https://drive.google.com/open?id=0B46KQ0X-Kpsddk1CWmcyeXV3bzg

Martin Ivanov
Telerik team
 answered on 06 Sep 2017
3 answers
156 views

Hi,

 

How to add tab separators for the Rad Ribbon Tabs in Ribbon view. I want the separators to appear whenever it exceeds the minimum window size

Could you please help me with this

 

BR,

Shreedhar Bhat

Dilyan Traykov
Telerik team
 answered on 06 Sep 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?