Telerik Forums
UI for WPF Forum
1 answer
142 views

Hello, I've come to a scenario in my project that I need to dynamically create rules and evaluate it on the go.

I kind of need something very similar to what Devops have like in the attached picture.

is there any control that might achieve my needs or at at least a starting point.

 

any help would be appreciated.

 

 

 

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 13 May 2020
3 answers
705 views
Hi,

I am not getting background color changes by changing background property value.


Please helpme.

Martin
Top achievements
Rank 1
Veteran
 answered on 12 May 2020
2 answers
226 views

We are trying to use a ChartView with a LinearAxis for the vertical axis and a CategoricalAxis for the horizontal axis. Our issue is that we can't find a way to limit the number of category items in the horizontal view of the ChartView. We'd like to have a max of 14 items in the view before requiring the user to scroll to see more category items, but as it stands now, the more items that are added to the ChartView, the smaller and smaller the items get until their labels overlap.

Is there a way to limit the view of the ChartView to a max of 14 items so that the user can scroll to the right to see more items?

Thanks!

Pavel
Top achievements
Rank 1
 answered on 12 May 2020
5 answers
1.1K+ views

Hi!

I am trying to create a radar chart, which axis values would change after value update.

 

<telerik:CategoricalDataPoint Category="A" Value="{Binding Path=BoundNumber, Mode=TwoWay}"/>
<telerik:CategoricalDataPoint Category="B" Value="70"/>
<telerik:CategoricalDataPoint Category="C" Value="70"/>

 

I can't bind the value this way, because I get this error:

'Binding' cannot be set on the 'Value' property of type 'CategoricalDataPoint'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject.

 

What's the solution?

 

Thanks in advance for your help.

 

Best regard,

Grzegorz Kaczmarczyk


 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 12 May 2020
8 answers
427 views

I have defined a custom TimePickerColum. In my RadGridView I have Validation which when something is not valid shows the row as red and marks the cell which is invalid with a red marker which shows a tooltip when hoovered over.

 

01.public class TimePickerColumn: GridViewDataColumn
02.    {
03.        private Binding timePickerForeground;
04. 
05.        private readonly NullToBrushConverter nullToBrushConverter = new NullToBrushConverter();
06. 
07.        public TimePickerColumn()
08.        {
09.            base.IsReadOnly = true;
10.        }
11. 
12.        public Binding TimePickerBackground { get; set; }
13. 
14.        public Binding TimePickerForeground
15.        {
16.            get => this.timePickerForeground;
17.            set
18.            {
19.                value.Converter = this.nullToBrushConverter;
20.                this.timePickerForeground = value;
21.            }
22.        }
23. 
24.        public TextAlignment TimePickerTextAlinment { get; set; }
25. 
26.        public override FrameworkElement CreateCellElement(GridViewCell cell, object dataItem)
27.        {
28.            if (!(cell.Content is RadTimePicker timePicker))
29.            {
30.                timePicker = new RadTimePicker();
31.                timePicker.SetBinding(RadTimePicker.SelectedValueProperty, DataMemberBinding);
32.                timePicker.SetBinding(RadDatePicker.IsReadOnlyProperty, IsReadOnlyBinding);
33.                timePicker.SetBinding(RadTimePicker.BackgroundProperty, TimePickerBackground);
34.                timePicker.SetBinding(RadTimePicker.ForegroundProperty, TimePickerForeground);
35.                timePicker.TextAlignment = TimePickerTextAlinment;
36. 
37.                cell.Padding = new Thickness(0);
38.            }
39. 
40.            if (timePicker.DataContext != dataItem)
41.            {
42.                timePicker.DataContext = dataItem;
43.            }
44. 
45.            return timePicker;
46.        }
47.    }

The Problem is of visual nature. When a cell other then the time picker cell is invalid, the row turns red but only the TimePicker cell in the row does not turn red. How can I fix this problem ? What am I missing in my TimePickerColumn implementation ? 

If the time picker cell is invalid then it will turn red with the whole row (which is correct).

Vladimir Stoyanov
Telerik team
 answered on 12 May 2020
2 answers
450 views

I would like to find the cell from the name instead of the index. Is it possible?

<telerik:RadGridView ItemsSource="{Binding Tests}"
                                 AutoGenerateColumns="False"
                                 RowLoaded="RadGridView_RowLoaded">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewToggleRowDetailsColumn />
                    <telerik:GridViewDataColumn Header="Title" DataMemberBinding="{Binding Title}" Name="Title" />

                    <telerik:GridViewDataColumn Header="Skapad" DataMemberBinding="{Binding Created}" Name="Modified" />

                </telerik:RadGridView.Columns>

 

 

private void RadGridView_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
        {
            if (e.Row is Telerik.Windows.Controls.GridView.GridViewRow)
            {
                if (e.DataElement != null)
                {
                    ClearIfDefaultDate(e.Row.Cells[2].Content as TextBlock);
                }
            }
        }

Fredrik
Top achievements
Rank 1
Veteran
Iron
 answered on 12 May 2020
1 answer
116 views

Hello,

I have a window that contains a RadRibbonView. This RadRibbonView is composed of several RadRibbonBackstage.

 

I changed by code the property FlowDirection of the window to the value RightToLeft.

Because of property value inheritance, this property is supposed to be automatically changed for all child elements.

Here is the visual tree (see capture in attachment):
ATSShell_Mainwindow

    Border

        AdornerDecorator

            AdornerLayer

                BackstageAdorner

                    RadRibbonBackstage

The value of the property FlowDirection is correctly inherited up to the BackstageAdorner (RightToLeft).

But the value of the RadRibbonBackstage is still LeftToRight.

How can I fix that issue ?

 

Thanks,

Alexandre

Martin Ivanov
Telerik team
 answered on 11 May 2020
5 answers
420 views

Hi,

I am trying to add a image in a table cell so that the width of the image is equal to the width of the cell. The PreferredWidth of the cell is set in percentage. I use the following function to get the width of the cell in pixels:

private float GetTableCellwidthInPixels(Table parent, int index) {
            var section = parent.GetRootDocument().EnumerateChildrenOfType<Section>().Last();
            var pageWidth = section.PageSize.Width;
 
            return (float)parent.GetGridColumnWidth(index).Calculate((float)pageWidth);
        }

This works fine if the total preferred widths of all cells on a row is less or equal to 80. If they are larger than 80 the image gets larger than the cell. If I subtract the page margins from the width:

var pageWidth = section.PageSize.Width - section.PageMargin.Horizontal;

the image is always smaller than the cell.

I am doing all this processing before the document is added to the radRichTexBox, so the document is unmeasured.

 

Any idea why this happens?

 

Dimitar
Telerik team
 answered on 11 May 2020
0 answers
172 views

Hello

I'm using trial version 2020.1.218

I'm trying to migrate that example to .NET Core 3.1

https://github.com/telerik/xaml-sdk/tree/master/Docking/VisualStudioDocking

but I faced many issues.

Do you have any updated example (Docking + MVVM) for .NET COre 3.1?

Anton M.
Top achievements
Rank 1
 asked on 11 May 2020
3 answers
226 views

     What is the purpose of the property UniqueID? It's public, so it must be intended for use by the developer. I kind of expected it to be unique for the lifetime of the appointment instance, but the value changes between the Creating and Created events.

 

DateTime.Now.Ticks       UniqueId                                                         Event
637237601642743485    ed93e590-52ca-4101-adcd-4dddadf19a07    Creating
637237601642833259    5ad0d20c-1bea-4825-9006-0075e472680e   Created
637237601642933477    5ad0d20c-1bea-4825-9006-0075e472680e   Editing
637237602458312088    5ad0d20c-1bea-4825-9006-0075e472680e   Edited

 

 

public class Appointment : AppointmentBase
{
    public Appointment();
 
    public virtual string Body { get; set; }
    public string Location { get; set; }
    public string UniqueId { get; set; }
    public string Url { get; set; }
 
    public override IAppointment Copy();
    public override void CopyFrom(IAppointment other);
    public override string ToString();
}

 

Vladimir Stoyanov
Telerik team
 answered on 08 May 2020
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
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?