Telerik Forums
UI for WPF Forum
5 answers
215 views

I use the Telerik libraries 2014.2.811.45.

I have a tree which can be edited by the user. The user as well can adjust the width of the tree and make it narrow enough to cut off some of the node names.

This post here (http://www.telerik.com/forums/treeview-tooltips-instead-of-horizontal-scroll-bar) seems to solve the problem but is unfortunately outdated. The API has changed meanwhile - the functions/properties don't exist any more.

Still I tried to adjust the solution to my library version but I couldn't get it work. The solution gets the bounds of the tree and each of its items and compares them. This seems to be an easy and adequate solution which I would like to use as well. Trying out different properties showed me the following: Width seems to return NaN. ActualWidth seems to return pretty much the width of the tree whether it is called on the tree or the node. I would expect it to return the width of the node name if called on the node. Further I could not find a property to get the right border of the tree/items.

How can I solve this problem with my telerik libraries?

Martin Ivanov
Telerik team
 answered on 11 Sep 2017
4 answers
193 views
Hi, we are evaluating DevCraft - the most critical portion that will affect our decision is the 3D charts functionality in WPF for our software. I used the WPF sample code in this https://github.com/telerik/xaml-sdk/tree/master/ChartView3D/WPF and successfully created a Surface Plot with colorizer.

 

Yet no matter what I do I cannot get the Tooltips to work - Tooltips are critical for our functionality and we need to show the datapoint that is closest in the surface plot in order to satisfy our need. 

I followed the directions in http://docs.telerik.com/devtools/wpf/controls/radchartview3d/features/behaviors/tooltipbehavior3d with no success.
 
The code below is my modified version of the code in the github to add tooltips.

https://github.com/telerik/xaml-sdk/blob/master/ChartView3D/WPF/ValueGradientColorizer/SurfaceGradients.xaml

 

I am using this project in Windows 10 professional with Telerik UI for WPF version 2017.2.629.0

A quick response would be appreciated since I will have to present a report tomorrow comparing Telerik with alternative 3D visualization libraries. 

Kind regards

<UserControl x:Class="ValKueGradientColorizer.SurfaceGradients"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <telerik:RadCartesianChart3D >
            <telerik:RadCartesianChart3D.TooltipTemplate>
                <DataTemplate>
                    <StackPanel Background="Fuchsia" MinHeight="100" MinWidth="100">
                        <StackPanel Orientation="Horizontal"  Background="Yellow">
                            <TextBlock Text="X - " FontWeight="Bold" Foreground="Blue"/>
                            <TextBlock Text="{Binding XValue}"  />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal"  Background="Yellow">
                            <TextBlock Text="Y - " FontWeight="Bold" />
                            <TextBlock Text="{Binding YValue}"   Foreground="Blue"/>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal" Background="Yellow">
                            <TextBlock Text="Z - " FontWeight="Bold" />
                            <TextBlock Text="{Binding ZValue}"   Foreground="Blue"/>
                        </StackPanel>
                    </StackPanel>
                </DataTemplate>
 
            </telerik:RadCartesianChart3D.TooltipTemplate>
            <telerik:RadCartesianChart3D.XAxis>
                <telerik:LinearAxis3D />
            </telerik:RadCartesianChart3D.XAxis>
            <telerik:RadCartesianChart3D.YAxis>
                <telerik:LinearAxis3D />
            </telerik:RadCartesianChart3D.YAxis>
            <telerik:RadCartesianChart3D.ZAxis>
                <telerik:LinearAxis3D />
            </telerik:RadCartesianChart3D.ZAxis>
            <telerik:RadCartesianChart3D.Grid>
                <telerik:CartesianChart3DGrid />
            </telerik:RadCartesianChart3D.Grid>
            <telerik:RadCartesianChart3D.Behaviors>
                <telerik:Chart3DTooltipBehavior InitialShowDelay="200" ShowDuration="200000">
                     
                </telerik:Chart3DTooltipBehavior>
                <telerik:Chart3DCameraBehavior />
            </telerik:RadCartesianChart3D.Behaviors>
 
            <telerik:RadCartesianChart3D.Series>
                <telerik:SurfaceSeries3D XValueBinding="X"
                                         YValueBinding="Y"
                                         ZValueBinding="Z"
                                         ItemsSource="{Binding}"
                                         ToolTipService.ShowOnDisabled="True"
                                          
                                         >
 
                    <telerik:SurfaceSeries3D.Colorizer>
                        <telerik:SurfaceSeries3DValueGradientColorizer IsAbsolute="True">
                            <telerik:SurfaceSeries3DValueGradientColorizer.GradientStops>
                                <GradientStopCollection>
                                    <GradientStop Offset="-100" Color="Blue" />
                                    <GradientStop Offset="50" Color="Green" />
                                    <GradientStop Offset="100" Color="Red" />
                                </GradientStopCollection>
                            </telerik:SurfaceSeries3DValueGradientColorizer.GradientStops>
                        </telerik:SurfaceSeries3DValueGradientColorizer>
                    </telerik:SurfaceSeries3D.Colorizer>
                    <telerik:SurfaceSeries3D.ToolTip>
                        <StackPanel MinWidth="200" MinHeight="200" Background="Fuchsia" ><TextBlock Background="Aqua" Foreground="Black">100000</TextBlock></StackPanel>
                    </telerik:SurfaceSeries3D.ToolTip>
                    <telerik:SurfaceSeries3D.TooltipTemplate>
                        <DataTemplate>
                            <StackPanel Background="Fuchsia" MinHeight="100" MinWidth="100">
                                <StackPanel Orientation="Horizontal"  Background="Yellow">
                                    <TextBlock Text="X - " FontWeight="Bold" Foreground="Blue"/>
                                    <TextBlock Text="{Binding XValue}"  />
                                </StackPanel>
                                <StackPanel Orientation="Horizontal"  Background="Yellow">
                                    <TextBlock Text="Y - " FontWeight="Bold" />
                                    <TextBlock Text="{Binding YValue}"   Foreground="Blue"/>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" Background="Yellow">
                                    <TextBlock Text="Z - " FontWeight="Bold" />
                                    <TextBlock Text="{Binding ZValue}"   Foreground="Blue"/>
                                </StackPanel>
                            </StackPanel>
                        </DataTemplate>
 
                    </telerik:SurfaceSeries3D.TooltipTemplate>
 
                </telerik:SurfaceSeries3D>
            </telerik:RadCartesianChart3D.Series>
        </telerik:RadCartesianChart3D>
    </Grid>
</UserControl>
Dinko | Tech Support Engineer
Telerik team
 answered on 11 Sep 2017
4 answers
142 views

I am using a RadColumnSparkline inside a RadTimebar but can't style the columns so they look a bit better than out of the box.

I want the columns to have a margin between each other, rounded tops and a dark border color. 

I've already tried to overwrite the telerik column style to tackle the rectangle for the column but no column was shown:

  <telerik:RadColumnSparkline.Resources>
<Style TargetType="telerik:Column" BasedOn="{StaticResource ColumnStyle}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="telerik:Column">
<Rectangle Stroke="Black" Margin="5,0,5,0"  Fill="{TemplateBinding Fill}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</telerik:RadColumnSparkline.Resources>

 

I've attached an image  of  how they currently look .

This is the code for the timebar:

<telerik:RadTimeBar 
Grid.Column="1"
x:Name="TimeBar"
PeriodStart="{Binding AppearanceSearchOverview.PeriodStart, Converter={StaticResource DateTimeToLocalTimeConverter}}"
PeriodEnd="{Binding AppearanceSearchOverview.PeriodEnd, Converter={StaticResource DateTimeToLocalTimeConverter}}"
VisiblePeriodStart="{Binding ElementName=TimeBar, Path=PeriodStart}"
VisiblePeriodEnd="{Binding ElementName=TimeBar, Path=PeriodEnd}"
Selection="{Binding Path=TimeRange, Converter={StaticResource TelerikTimeRangeConverter}, Mode=TwoWay}"
MinSelectionRange="00:01:00"
MaxSelectionRange="72:00:00"
MinZoomRange="00:15:00"
Background="{StaticResource PanelBackgroundBrush}"
SelectionTitleFormatString="{}{0:HH':'mm':'ss} - {1:HH':'mm':'ss}"
IsSnapToIntervalEnabled="False">
<telerik:RadTimeBar.Intervals>
<telerik:DayInterval />
<telerik:HourInterval />
<telerik:MinuteInterval IntervalSpans="5" />
</telerik:RadTimeBar.Intervals>
<Grid>
<telerik:RadColumnSparkline 
AutoRange="False"
ItemFill="#3D6F99"
MinYValue="{Binding AppearanceSearchOverview.MinValue}"
ItemsSource="{Binding AppearanceSearchOverview.Results}"
XValuePath="X"
MinXValue="{Binding ElementName=TimeBar, Path=PeriodStart}"
MaxXValue="{Binding ElementName=TimeBar, Path=PeriodEnd}"
YValuePath="Y"/>

</telerik:RadTimeBar>

Sia
Telerik team
 answered on 11 Sep 2017
1 answer
132 views
When the search request is completed, i get the response "The underlying connection was closed: A connection that was expected to be kept alive was closed by the server." it was working correctly more than years but in the recent few days, it is not working and i get the above error response. please let me know what i do to this issue
Petar Mladenov
Telerik team
 answered on 11 Sep 2017
3 answers
1.0K+ views

Hello Telerik Team,

I want to add a button on a gridview column header. For that I wrote a custom control that inherits from GridViewDataColumn. The custom control sets the GridViewHeaderCellStyle and implements a command.

Here the style:

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                    xmlns:controls="clr-namespace:MyControls">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.GridView.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="telerik:GridViewHeaderCell" BasedOn="{StaticResource GridViewHeaderCellStyle}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <StackPanel>
                        <TextBlock Text="myText"/>
                        <telerik:RadButton Content="myButton" Command="{Binding TestCommand, RelativeSource={RelativeSource FindAncestor, AncestorType=controls:hGridViewDataColumn}}"/>
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>

And the custom control:

namespace MyControls
{   
    public class hGridViewDataColumn : GridViewDataColumn
    {
        static hGridViewDataColumn()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(hGridViewDataColumn), new FrameworkPropertyMetadata(typeof(hGridViewDataColumn)));
        }

        public hGridViewDataColumn()
        {
            HeaderCellStyle = FindResource("hGridViewHeaderCellStyle") as Style;
        }

        private ICommand _testCommand;
        public ICommand TestCommand
        {
            get
            {
                return ...;
            }
        }
    }
}

Unfortunately the binding doesn't work. What's wrong?

 

Stefan
Telerik team
 answered on 09 Sep 2017
2 answers
496 views

Hello,
I'm using Telerik 2017.2.614.45.NoXaml but the Vertical and Horizontal scrollbars are not appearing for RadRichTextBox. See attached the XAML and the Telerik dlls that are referenced. What else is missing?

Also our application has Theme which applies to all other Telerik controls except RadRichTextBox. Any idea why?

Sri
Top achievements
Rank 1
 answered on 08 Sep 2017
1 answer
375 views

Hi Team, 

I am looking to read the content of a specific page from RADRichTextBox with  below features

1. Define Page Start ( from page number) and Read all Data(Text, Image, Symboles etc) up to a given document position. Identify lines, paragraph,  Image etc individually.

2. Track location changes of any content or image, for example, User inserted any image but later on changes the location of image in RichTextBox

3. How can we search lines, Images and get the location coordinates of same?

4. How to know the page properties like font, size, margins etc.

5. how to validate the content of the PDF page from another PDF stream.

6. Merge multiple PDF streams( generated by another source)

 

Kindly help me to know on this and let me know for any question.

 

 

Tanya
Telerik team
 answered on 08 Sep 2017
1 answer
274 views
How to add Expander button before items on Rad TreeView. Whart is event when click Expander button to expanding.
Dinko | Tech Support Engineer
Telerik team
 answered on 08 Sep 2017
4 answers
599 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
155 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
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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?