Telerik Forums
UI for WPF Forum
8 answers
369 views
Hi, I need to perform coded UI tests on a WPF application with Telerik controls. I installed Telerik.VisualStudio.TestTools.UITest.Extension.ExtensionsCore.dll following the instructions posted here.

However, I am not able to use the GetProperty method for control specific properties, i.e. "ItemState" on a RadTileViewItem. I am able to find the item and for example draw a highlight around it, but trying to get it's TileState results in a NotSupportedException:

GetProperty of "TileState" is not supported on control type: Custom

What seems strange: If I start the coded ui test builder and pull the crosshair over the TileViewItem, I can see it's TileState property and the correct value. Only the test playback is not able to retrieve it.

Am I missing something important to make the uitest extension working?

Ivan Ivanov
Telerik team
 answered on 14 Jun 2017
1 answer
152 views

I want a button on radribbon to have a dropdown content just like RadRibbonDropDownButton, but i also want to include this button into radiobuttons group. I mean this  dropdown  button should be toggleable and mutually exclusive with other buttons of the same group. 

How could i do this?

 

Dilyan Traykov
Telerik team
 answered on 14 Jun 2017
1 answer
142 views

Hi,

I would that SendBackward command set Z-Index to penultimate item and not last one.

Moreover SendToBack decreases Z-Index but until  to penultimate item.

I would this behavior because, I have ever a rectangle called "MainContainer" that "contains" other rectangles, but actually is only showed as last one under other ones, and it has to ever last one then it has to ever lowest Z-Index.

How can I do this?

Dario Concilio
Top achievements
Rank 2
 answered on 14 Jun 2017
1 answer
276 views
Which event triggers when the Z-index of a shape changes?
Dario Concilio
Top achievements
Rank 2
 answered on 14 Jun 2017
1 answer
216 views

Hello,

I have a problem with the horizontal axis of my RadCartesianChar when I change the period of my statistics:

<telerik:RadCartesianChart x:Name="Chart"
                           TrackBallInfoStyle="{StaticResource ResourceKey=TrackBallInfoStyle}"
                           TrackBallLineStyle="{StaticResource ResourceKey=TransparentTrackLineStyle}"
                           helpers:ChartViewUtilities.ChartAlignmentGroup="g1">
  
    <telerik:RadCartesianChart.Resources>
        <DataTemplate x:Key="NormalTemplate">
            <TextBlock Text="{Binding}"
                       Padding="2"/>
        </DataTemplate>
        <DataTemplate x:Key="TodayTemplate">
            <Border BorderThickness="1" BorderBrush="Black">
                <TextBlock Text="{Binding}"
                           Padding="2"/>
            </Border>
        </DataTemplate>
        <DataTemplate x:Key="HolidayTemplate">
            <TextBlock Text="{Binding}"
                       FontWeight="Bold"
                       Foreground="Red"
                       Padding="2"/>
        </DataTemplate>
        <DataTemplate x:Key="WeekendTemplate">
            <TextBlock Text="{Binding}"
                       FontWeight="Bold"
                       Foreground="Black"
                       Padding="2"/>
        </DataTemplate>
  
        <selectors:DateTypeTemplateSelector x:Key="Selector"
                                            NormalTemplate="{StaticResource NormalTemplate}"
                                            TodayTemplate="{StaticResource TodayTemplate}"
                                            HolidayTemplate="{StaticResource HolidayTemplate}"
                                            WeekendTemplate="{StaticResource WeekendTemplate}"/>
    </telerik:RadCartesianChart.Resources>
  
    <telerik:RadCartesianChart.Behaviors>
        <telerik:ChartTrackBallBehavior ShowTrackInfo="True"
                                        helpers:ChartViewUtilities.ShouldPositionTrackBallCloseToDataPoint="True"
                                        helpers:ChartViewUtilities.TrackedPointFill="{StaticResource IsMouseOverNeutralValueBrush}"
                                        helpers:ChartViewUtilities.TrackBallGroup="g1"
                                        TrackInfoUpdated="ChartTrackBallBehavior_TrackInfoUpdated"/>
    </telerik:RadCartesianChart.Behaviors>
  
    <telerik:RadCartesianChart.Grid>
        <telerik:CartesianChartGrid MajorLinesVisibility="Y" />
    </telerik:RadCartesianChart.Grid>
  
    <telerik:RadCartesianChart.HorizontalAxis>
        <telerik:DateTimeCategoricalAxis LabelFormat="dd"
                                         LabelTemplateSelector="{StaticResource Selector}"/>
    </telerik:RadCartesianChart.HorizontalAxis>
  
    <telerik:RadCartesianChart.VerticalAxis>
        <telerik:LinearAxis SmartLabelsMode="SmartStepAndRange" MajorStep="1" />
    </telerik:RadCartesianChart.VerticalAxis>
  
    <telerik:BarSeries ItemsSource="{Binding SeaDailyStats}"
                       CategoryBinding="DateAction"
                       ValueBinding="NbAction"
                       CombineMode="Stack"
                       helpers:ChartAnimationUtilities.CartesianAnimation="Rise">
  
        <telerik:BarSeries.TrackBallInfoTemplate>
            <DataTemplate>
                <Border>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding DisplayContent, StringFormat='Mise(s) en ligne : {0}'}" />
                    </StackPanel>
                </Border>
            </DataTemplate>
        </telerik:BarSeries.TrackBallInfoTemplate>
  
        <telerik:BarSeries.DefaultVisualStyle>
            <Style TargetType="{x:Type Border}">
                <Setter Property="Background" Value="{StaticResource NeutralValueBrush}"/>
            </Style>
        </telerik:BarSeries.DefaultVisualStyle>
    </telerik:BarSeries>
  
    <telerik:BarSeries ItemsSource="{Binding SeaDailyStats}"
                       CategoryBinding="DateAction"
                       ValueBinding="Target"
                       CombineMode="Stack"
                       helpers:ChartAnimationUtilities.CartesianAnimation="Rise">
  
        <telerik:BarSeries.TrackBallInfoTemplate>
            <DataTemplate />
        </telerik:BarSeries.TrackBallInfoTemplate>
  
        <telerik:BarSeries.DefaultVisualStyle>
            <Style TargetType="Border">
                <Setter Property="Background" Value="{StaticResource BadValueBrush}"/>
            </Style>
        </telerik:BarSeries.DefaultVisualStyle>
  
    </telerik:BarSeries>
</telerik:RadCartesianChart>

 

The period is a complete month but I display only the day (dd) on horizontal axis.

The template selector allow me to display differently the type of day (normal, today, week end, holiday).

The first month all is correct but when I change the month, the SelectTemplate method of DateTypeTemplateSelector is not call again. So the template don't change with the new axis value of the month.

But if I display not only the day (dd) but the complete day (dd/MM/yyyy) on LabelFormat all works fine.

So I think that the SelectTemplate method of DateTypeTemplateSelector is call only when the displayed value is different.
But me I need o display only the day (dd).

Can you help me please. Thank you in advance and sorry for my bad English.

Kind regards,

Jonathan

Dinko | Tech Support Engineer
Telerik team
 answered on 14 Jun 2017
2 answers
639 views

Hello,

I have a problem with the horizontal axis of my RadCartesianChar when I change the period of my statistics:

<telerik:RadCartesianChart x:Name="Chart"
                           TrackBallInfoStyle="{StaticResource ResourceKey=TrackBallInfoStyle}"
                           TrackBallLineStyle="{StaticResource ResourceKey=TransparentTrackLineStyle}"
                           helpers:ChartViewUtilities.ChartAlignmentGroup="g1">
 
    <telerik:RadCartesianChart.Resources>
        <DataTemplate x:Key="NormalTemplate">
            <TextBlock Text="{Binding}"
                       Padding="2"/>
        </DataTemplate>
        <DataTemplate x:Key="TodayTemplate">
            <Border BorderThickness="1" BorderBrush="Black">
                <TextBlock Text="{Binding}"
                           Padding="2"/>
            </Border>
        </DataTemplate>
        <DataTemplate x:Key="HolidayTemplate">
            <TextBlock Text="{Binding}"
                       FontWeight="Bold"
                       Foreground="Red"
                       Padding="2"/>
        </DataTemplate>
        <DataTemplate x:Key="WeekendTemplate">
            <TextBlock Text="{Binding}"
                       FontWeight="Bold"
                       Foreground="Black"
                       Padding="2"/>
        </DataTemplate>
 
        <selectors:DateTypeTemplateSelector x:Key="Selector"
                                            NormalTemplate="{StaticResource NormalTemplate}"
                                            TodayTemplate="{StaticResource TodayTemplate}"
                                            HolidayTemplate="{StaticResource HolidayTemplate}"
                                            WeekendTemplate="{StaticResource WeekendTemplate}"/>
    </telerik:RadCartesianChart.Resources>
 
    <telerik:RadCartesianChart.Behaviors>
        <telerik:ChartTrackBallBehavior ShowTrackInfo="True"
                                        helpers:ChartViewUtilities.ShouldPositionTrackBallCloseToDataPoint="True"
                                        helpers:ChartViewUtilities.TrackedPointFill="{StaticResource IsMouseOverNeutralValueBrush}"
                                        helpers:ChartViewUtilities.TrackBallGroup="g1"
                                        TrackInfoUpdated="ChartTrackBallBehavior_TrackInfoUpdated"/>
    </telerik:RadCartesianChart.Behaviors>
 
    <telerik:RadCartesianChart.Grid>
        <telerik:CartesianChartGrid MajorLinesVisibility="Y" />
    </telerik:RadCartesianChart.Grid>
 
    <telerik:RadCartesianChart.HorizontalAxis>
        <telerik:DateTimeCategoricalAxis LabelFormat="dd"
                                         LabelTemplateSelector="{StaticResource Selector}"/>
    </telerik:RadCartesianChart.HorizontalAxis>
 
    <telerik:RadCartesianChart.VerticalAxis>
        <telerik:LinearAxis SmartLabelsMode="SmartStepAndRange" MajorStep="1" />
    </telerik:RadCartesianChart.VerticalAxis>
 
    <telerik:BarSeries ItemsSource="{Binding SeaDailyStats}"
                       CategoryBinding="DateAction"
                       ValueBinding="NbAction"
                       CombineMode="Stack"
                       helpers:ChartAnimationUtilities.CartesianAnimation="Rise">
 
        <telerik:BarSeries.TrackBallInfoTemplate>
            <DataTemplate>
                <Border>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding DisplayContent, StringFormat='Mise(s) en ligne : {0}'}" />
                    </StackPanel>
                </Border>
            </DataTemplate>
        </telerik:BarSeries.TrackBallInfoTemplate>
 
        <telerik:BarSeries.DefaultVisualStyle>
            <Style TargetType="{x:Type Border}">
                <Setter Property="Background" Value="{StaticResource NeutralValueBrush}"/>
            </Style>
        </telerik:BarSeries.DefaultVisualStyle>
    </telerik:BarSeries>
 
    <telerik:BarSeries ItemsSource="{Binding SeaDailyStats}"
                       CategoryBinding="DateAction"
                       ValueBinding="Target"
                       CombineMode="Stack"
                       helpers:ChartAnimationUtilities.CartesianAnimation="Rise">
 
        <telerik:BarSeries.TrackBallInfoTemplate>
            <DataTemplate />
        </telerik:BarSeries.TrackBallInfoTemplate>
 
        <telerik:BarSeries.DefaultVisualStyle>
            <Style TargetType="Border">
                <Setter Property="Background" Value="{StaticResource BadValueBrush}"/>
            </Style>
        </telerik:BarSeries.DefaultVisualStyle>
 
    </telerik:BarSeries>
</telerik:RadCartesianChart>

 

The period is a complete month but I display only the day (dd) on horizontal axis.

The template selector allow me to display differently the type of day (normal, today, week end, holiday).

The first month all is correct but when I change the month, the SelectTemplate method of DateTypeTemplateSelector is not call again. So the template don't change with the new axis value of the month.

But if I display not only the day (dd) but the complete day (dd/MM/yyyy) on LabelFormat all works fine.

So I think that the SelectTemplate method of DateTypeTemplateSelector is call only when the displayed value is different.

But me I need o display only the day (dd).

Can you help me please. Thank you in advance and sorry for my bad English.

Kind regards,

Jonathan

Dinko | Tech Support Engineer
Telerik team
 answered on 14 Jun 2017
2 answers
154 views

Hello 

I have tried a RadDataFilter with RadComboBox as DataTemplate.

Is work's fine, but when i allow muliple Selection, the filter does not work as I expect (Only one value is filtered).

How do I have to make this work?

 

<Grid Margin="20">
        <Grid.Resources>
         
            <DataTemplate x:Key="ComboBoxEditor">
                <telerik:RadComboBox SelectedValue="{Binding Value, Mode=TwoWay, FallbackValue=null}" AllowMultipleSelection="True"/>
            </DataTemplate>
 
            <local:EditorTemplateSelector x:Key="EditorTemplateSelector">
                <local:EditorTemplateSelector.EditorTemplateRules>
                    <local:EditorTemplateRule PropertyName="MainCategory" DataTemplate="{StaticResource ComboBoxEditor}" />
                </local:EditorTemplateSelector.EditorTemplateRules>   
            </local:EditorTemplateSelector>
        </Grid.Resources>
 
    <telerik:RadDataFilter x:Name="radDataFilter"
                           Source="{Binding Items, ElementName=radGridView}"
                           EditorTemplateSelector="{StaticResource EditorTemplateSelector}">       
 
    <telerik:RadGridView x:Name="radGridView" Grid.Row="1" Grid.Column="0"
                         GroupRenderMode="Nested"
                         ItemsSource="{Binding M<View}"
                         IsFilteringAllowed="False"      
                         AutoGenerateColumns="False"
                         ShowGroupPanel="True"
                         IsReadOnly="True"
                         ShowSearchPanel="True">
        <telerik:RadGridView.Columns>
        ...
        </telerik:RadGridView.Columns>
    </telerik:RadGridView>
</Grid>

 

How to implement multi select RadComboBox with checkbox filter?

 

Thanks in advance for any help

Stefan
Telerik team
 answered on 14 Jun 2017
1 answer
357 views

Hi,

Given a RadTreeViewItem, I want to expand all if it's descendants. I receive the first RadTreeViewItem via an attached behavior:

 

private void OnLoaded(object sender, RoutedEventArgs e)
      {
          RadTreeViewItem tvi = AssociatedObject;

 

after doing some checks I call tvi.IsExpanded = True and tvi.IsSelected = True;

This gets my tree opened up to the desired node. Now I want to expand all of it's children so the user doesn't have to open up each branch by hand.

 

01.private void ExpandChildren(RadTreeViewItem tvItem)
02.{
03.     
04.    //var container = tvItem.ItemContainerGenerator.IndexFromContainer();
05.    var tvi = tvItem;
06.    foreach (RadTreeViewItem item in tvi.Items)
07.    {
08.        var kid = tvi.ParentTreeView.ContainerFromItemRecursive(item);
09.        kid.IsExpanded = true;
10.        if (kid.HasItems)
11.            ExpandChildren(kid);
12.    }
13.}

 

However, this function blows up on line 6 complaining that the item cannot be converted from the value (in my case an app specific class) type to a RadTreeViewItem. I tried using ContainerFromItemRecursive, but it always seems to return null. How to convert a tvi.Items[n] to a RadTreeViewItem that I can mark IsExpanded = true?

This seems like this shouldn't be that hard.

Can someone please point me in the right direction?

Thanks ... Ed

 

Martin Ivanov
Telerik team
 answered on 14 Jun 2017
2 answers
377 views

Hi, 

I am trying to implement a button in RadGridView column but when clicking the cutton, nothing happens. Here is the actual code:

 

 <telerik:GridViewColumn                             
                            Width="Auto">
                            <telerik:GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <telerik:RadButton Content="Content" 
                                                       Command="{Binding myCommand}">                                                                                                                  
                                        <telerik:RadButton.Style>
                                            <Style TargetType="{x:Type telerik:RadButton}">
                                                <Style.Setters>
                                                    <Setter Property="Visibility" Value="Hidden"/>                                                    
                                                </Style.Setters>                                                
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding Flag_ID}" Value="FlagStatus">
                                                        <Setter Property="Visibility" Value="Visible"/>
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                        </telerik:RadButton.Style>
                                    </telerik:RadButton>
                                </DataTemplate>
                            </telerik:GridViewColumn.CellTemplate>
                        </telerik:GridViewColumn>

Scuttle
Top achievements
Rank 1
 answered on 14 Jun 2017
1 answer
158 views
How to create wpf control looks like this? 
Martin Ivanov
Telerik team
 answered on 14 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
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?