Telerik Forums
UI for WPF Forum
4 answers
222 views

I'm trying to enable or disable the whole menu based on a value of a variable (i.e., SomeVariable). However, when using Style (in the following xaml) with telerik:RadMenu, the whole menu disappears?

<telerik:RadMenu.Style>
    <Style TargetType="telerik:RadMenu">
        <Setter Property="IsEnabled"  Value="False" />                                                    
        <Style.Triggers>                                                        
           <DataTrigger Binding="{Binding SomeVariable}"  Value="Draft"> 
                 <Setter Property="IsEnabled"  Value="True" />                                                        
           </DataTrigger>                                                    
        </Style.Triggers>                      
     </Style>                                                                                            
</telerik:RadMenu.Style>

Thank you

Abdulkarim
Top achievements
Rank 1
 answered on 14 Aug 2018
2 answers
329 views

If the map background is bound to a property that has no initial value, the map will ignore the mouse unless using a child control. I only found one mention of anything simliar to this: https://arstechnica.com/civis/viewtopic.php?t=83073

<Window x:Class="MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <telerik:RadMap Background="{Binding MapBackground}">
        <telerik:RadMap.Provider>
            <telerik:OpenStreetMapProvider />
        </telerik:RadMap.Provider>
    </telerik:RadMap>
</Window>

 

Class MainWindow
    Public Sub New()
        ' This call is required by the designer.
        InitializeComponent()
 
        ' Add any initialization after the InitializeComponent() call.
        DataContext = Me
    End Sub
 
    Public Property MapBackground As Media.Brush
End Class

 

 

Jason D
Top achievements
Rank 1
Veteran
 answered on 13 Aug 2018
3 answers
145 views

I have many columns in the GridView. It works fine. But when I apply the filters in each column, the headers are not showing.

The header cells seem to be wrapped(Vertical height becomes big)

I tried to set the column's width as star or a fixed value. The filter icons are showing. By the way I set the header text wrapping. It seems no space to place the headers unless I remove some columns.

Any idea?

Stefan
Telerik team
 answered on 13 Aug 2018
1 answer
246 views

Hi,

I've an error on a gridview when I try to filter column. This is my code:

        private void SetFilter()
        {
            log.Debug("Start function SetFilter()");
            rgvMain.FilterDescriptors.Clear();

            CompositeFilterDescriptor compositeDescriptor = new CompositeFilterDescriptor();
            compositeDescriptor.LogicalOperator = FilterCompositionLogicalOperator.And;

            if (!string.IsNullOrEmpty(txtfilterCode.Text))
            {
                compositeDescriptor.FilterDescriptors.Add(new Telerik.Windows.Data.FilterDescriptor("LAB_CODE", Telerik.Windows.Data.FilterOperator.Contains, txtfilterCode.Text));
            }
            if (!string.IsNullOrEmpty(txtfilterDescr.Text))
            {
                compositeDescriptor.FilterDescriptors.Add(new Telerik.Windows.Data.FilterDescriptor("LAB_DESCR", Telerik.Windows.Data.FilterOperator.Contains, txtfilterDescr.Text));
            }

            //add all filter to radgrid
            rgvMain.FilterDescriptors.Add(compositeDescriptor);
            log.Debug("End function SetFilter()");
        }

 

This is the StackTrace:

   at Telerik.Windows.Data.Expressions.EnumerableFilterOperatorExpressionBuilder.GenerateContainsMethodCall(Expression source, Expression value, Boolean shouldNegate)
   at Telerik.Windows.Data.Expressions.EnumerableFilterOperatorExpressionBuilder.GenerateContains(Expression left, Expression right)
   at Telerik.Windows.Data.Expressions.FilterOperatorExpressionBuilderBase.CreateExpression(Expression left, Expression right)
   at Telerik.Windows.Data.Expressions.OperatorValueFilterDescriptorExpressionBuilderBase.CreateBodyExpressionThreadSafe()
   at Telerik.Windows.Data.Expressions.OperatorValueFilterDescriptorExpressionBuilderBase.CreateBodyExpression()
   at Telerik.Windows.Data.FilterDescriptor.CreateFilterExpression(ParameterExpression parameterExpression)
   at Telerik.Windows.Data.FilterDescriptorBase.CreateFilterExpression(Expression instance)
   at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpressionThreadSafe()
   at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpression()
   at Telerik.Windows.Data.CompositeFilterDescriptor.CreateFilterExpression(ParameterExpression parameterExpression)
   at Telerik.Windows.Data.FilterDescriptorBase.CreateFilterExpression(Expression instance)
   at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpressionThreadSafe()
   at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpression()
   at Telerik.Windows.Data.Expressions.FilterExpressionBuilder.CreateFilterExpression()
   at Telerik.Windows.Data.QueryableExtensions.Where(IQueryable source, CompositeFilterDescriptorCollection filterDescriptors)
   at Telerik.Windows.Data.QueryableCollectionView.CreateView()
   at Telerik.Windows.Data.QueryableCollectionView.CreateInternalList()
   at Telerik.Windows.Data.QueryableCollectionView.get_InternalList()
   at Telerik.Windows.Data.QueryableCollectionView.get_InternalCount()
   at Telerik.Windows.Data.QueryableCollectionView.get_IsEmpty()
   at Telerik.Windows.Data.DataItemCollection.get_IsEmpty()
   at Telerik.Windows.Controls.GridView.BaseItemsControl.OnItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Controls.DataControl.OnItemsCollectionChangedDispatch(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.OnCollectionViewCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.Listener`2.ReceiveWeakEvent(Object sender, TArgs args)
   at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
   at Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Data.QueryableCollectionView.RefreshOverride()
   at Telerik.Windows.Data.QueryableCollectionView.RefreshOrDefer()
   at Telerik.Windows.Data.QueryableCollectionView.InvalidatePagingAndRefresh()
   at Telerik.Windows.Data.QueryableCollectionView.OnFilterDescriptorsChanged()
   at Telerik.Windows.Data.QueryableCollectionView.OnFilterDescriptorsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   at Telerik.Windows.Data.RadObservableCollection`1.InsertItem(Int32 index, T item)
   at Telerik.Windows.Data.FilterDescriptorCollection.InsertItem(Int32 index, IFilterDescriptor item)
   at System.Collections.ObjectModel.Collection`1.Insert(Int32 index, T item)
   at System.Collections.ObjectModel.Collection`1.System.Collections.IList.Insert(Int32 index, Object value)
   at Telerik.Windows.Data.CollectionHelper.Insert(IList target, IEnumerable newItems, Int32 startingIndex, IEqualityComparer itemComparer)
   at Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Data.ObservableCollectionManager.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   at Telerik.Windows.Data.RadObservableCollection`1.InsertItem(Int32 index, T item)
   at Telerik.Windows.Data.FilterDescriptorCollection.InsertItem(Int32 index, IFilterDescriptor item)
   at System.Collections.ObjectModel.Collection`1.Add(T item)
   at FOX.Module.CommonSearchModules.SupplierPopup.SetFilter() in D:\FOX\Amplifon Fox\New Zealand\Releases\0.16.0\FOX.Module.CommonSearchModules\PopUp\SupplierPopup.xaml.cs:line 274
   at FOX.Module.CommonSearchModules.SupplierPopup.btnSearch_Click(Object sender, RoutedEventArgs e) in D:\FOX\Amplifon Fox\New Zealand\Releases\0.16.0\FOX.Module.CommonSearchModules\PopUp\SupplierPopup.xaml.cs:line 101

Dinko | Tech Support Engineer
Telerik team
 answered on 13 Aug 2018
1 answer
203 views
Is it possible to bind to a collection of providers or something simliar? Binding the Map's Provider property works, but I don't see how to bind other providers.
Dinko | Tech Support Engineer
Telerik team
 answered on 13 Aug 2018
8 answers
384 views
Recently I contacted Telerik regarding the ability of End2End tests over the WPF app which uses Telerik controls.
I used to work with TestStack.White framework previously but encountered some issues while trying to automate
Telerik controls.
After that I asked Telerik about support for TestStack.White and Telerik replied that this framework is not guaranteed to be supported.
And recommended me to use either CodedUI or your own framework claiming that both are supported by your controls.
That’s why I switched to CodedUI.

I've been struggling to automate controls inside the diagrams on canvas (all being Telerik controls)
Our app contains RadDiagram and controls that inherit from RadDiagramShape.

I succeed to get the shapes and test them in the code, but can’t access to the nested items, under the shapes.






Itried to implement control automation both in code using WpfCustom API and via CodedUI Test Builder.
In both case Igot the same error of being unable to find the control by its automation id.
Peshito
Telerik team
 answered on 13 Aug 2018
10 answers
219 views

Hello,

is it possible to set different VerticalAlignment-Properties for RadPanelItems in a RadPanelBar?

I want to vertical align the first item to top (fixed height) and then the second item to stretch with the User Control.

 

I tried this solution, but it won't work:

<telerik:RadPanelBar ExpandMode="Multiple" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
    <telerik:RadPanelBarItem Header="Liveliste" IsExpanded="True" VerticalAlignment="Top">
     <views:StationsLiveView />
           </telerik:RadPanelBarItem>
           <telerik:RadPanelBarItem Header="Teilnehmerliste" IsExpanded="True" VerticalAlignment="Stretch">
               <views:StationsUserView />
           </telerik:RadPanelBarItem>
       </telerik:RadPanelBar>
Dinko | Tech Support Engineer
Telerik team
 answered on 09 Aug 2018
2 answers
99 views

Greetings. 

I have just downloaded and installed the trial for Telerik WPF.  I require a Linear Gauge control.  I have read the documentation and my understanding is that the Linear Gauge control is a container/wrapper of the Linear Scale control.  Should there be a Linear Scale control in the toolbox, because if so, I am not seeing it in the toolbox (VS 2017)??  I was able to manually write some XML code per the example in the documentation for the Scale for my linear gauge, but I'm hoping that is not what is required and that the Linear Scale is a control where I can simply set some properties, etc.  Outside of manually writing code to create the scale, how do I implement a linear scale for a linear gauge control?

Thank you,

Don

 

Dinko | Tech Support Engineer
Telerik team
 answered on 09 Aug 2018
1 answer
195 views

Hi,

I'm following the example provided by telerik in order to develop an application with a radtileview. However, i need to make the items dynamically form the code behind, so my question is how do i define the row and column for each item in the code behind, i.e., similar to what is done in the following example:

     <telerik:RadTileView x:Name="Form" MinimizedItemsPosition="Bottom"
                             MaximizeMode="Zero"
                             DragMode="Swap" PreservePositionWhenMaximized="True" Width="700"
                             RowsCount="{Binding Rows,Mode=TwoWay}"
                             ColumnsCount="{Binding Columns,Mode=TwoWay}">
                <telerik:RadTileView.ItemsPanel>
                    <ItemsPanelTemplate>
                        <local:TemplateForm RowsCount="10" ColumnsCount="4" />
                    </ItemsPanelTemplate>
                </telerik:RadTileView.ItemsPanel>
               <telerik:RadTileViewItem MinWidth="175" MinHeight="45"
                                         local:TileViewProperties.Row="0"
                                         local:TileViewProperties.Column="0"/>

</telerik:RadTileViewItem>

</telerik:RadTileView>

 

Can anyone help me?

 

Thanks

Dinko | Tech Support Engineer
Telerik team
 answered on 09 Aug 2018
1 answer
174 views

hello,

I was recently tasked with adding UI Automation testing to a WPF MVVM application developed by my team.
The application is using RadControls 2018.1 extensively, and I'm struggling to automate actions around RadTreeView.

I've added the steps needed to add Telerik control support to Coded UI, as described this page.
Please note we're using Visual Studio 2017 Enterprise. 

Then, I created a new Coded UI Test Project to my existing solution, and tried to record a simple test using CUIT builder:

  1. Launch the application.
  2. Expand the root of a tree view in the main window.
  3. Expand a RadTreeViewItem (directory).
  4. Double click an item in sub-tree.

When trying to run the recorder test, sometimes it fails to find the RadTreeView, and when it does find it, it fails to navigate the tree correctly (see below).

The main window contains two RadTreeViews, both supplied with a unique AutomationId, both use data-binding, and marked with IsVirtualized. Sometimes the test fails to navigate the first tree (on which we recorded the actions), but succeeds in opening the desired item from the second tree. This is probably due to the both trees being bound to related collections (containing shared items).

Later, I guessed that the issues I'm experiencing might be related to the fact that RadControls doesn't fully implement all levels of CodedUI support. After reading a bit about Progress Test Studio and it's extensive Telerik UI support, I downloaded it's trial version and tried to record the same test.

I used translators and control highlighting context menu, to specifically choose the left-click action on the TreeViewItem's ExpandButton. This way, navigation through the tree actually works, but on the final step, the wrong TreeVIewItem is being double-clicked...

I'm starting to lose fate that our application can actually be automated, and I haven't event started with assertion, or more complex use-cases in our application. Your support will be very welcomed.

Petar Mladenov
Telerik team
 answered on 08 Aug 2018
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
PersistenceFramework
DataPager
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?