Telerik Forums
UI for WPF Forum
1 answer
113 views
In Form1 I take the BackColor with RadColor Dialog and in the second Form I use a ConditionalFormattingObject. How do I pass the Cell.BackColor of the first Form to the Form2?
Nadya | Tech Support Engineer
Telerik team
 answered on 04 Oct 2019
1 answer
286 views

Hi Telerik,

 

I'mu using a base class with all proerties which are overridable :

Public Class SelectionDetailItemViewModel
        Inherits ViewModelBase
 
        Public Overridable Property Children As New ObservableCollection(Of SelectionDetailItemViewModel)
        Public Overridable Property Reference As String
        Public Overridable Property Name As String
 
        'Other properties .....

 

I have 2 classes A & B which inherit of SelectionDetailItemViewModelA class has children of type of A & B.

The ItemSource is bound to a ObservableCollection(Of SelectionDetailItemViewModel). For each column, the filter panel has all column values but select a value doesn't filter the RadTreeListView. There the following error :

System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=IsActive; DataItem='DistinctValueViewModel' (HashCode=63240628); target element is 'CheckBox' (Name=''); target property is 'IsChecked' (type 'Nullable`1') ArgumentException:'System.ArgumentException: La valeur "((Name IsEqualTo er 2d2 MC)) AND ((Name IsEqualTo <Unset>) AND (Name IsEqualTo <Unset>))" n'est pas de type "Telerik.Windows.Data.IFilterDescriptor" et ne peut pas être utilisée dans cette collection générique.
Nom du paramètre : value
   à System.ThrowHelper.ThrowWrongValueTypeArgumentException(Object value, Type targetType)
   à System.Collections.ObjectModel.Collection`1.System.Collections.IList.Insert(Int32 index, Object value)
   à Telerik.Windows.Data.CollectionHelper.Insert(IList target, IEnumerable newItems, Int32 startingIndex, IEqualityComparer itemComparer)
   à Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args)
   à Telerik.Windows.Data.ObservableCollectionManager.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args)
   à Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
   à System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   à System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   à Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   à Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   à System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   à Telerik.Windows.Data.RadObservableCollection`1.InsertItem(Int32 index, T item)
   à Telerik.Windows.Data.FilterDescriptorCollection.InsertItem(Int32 index, IFilterDescriptor item)
   à System.Collections.ObjectModel.Collection`1.Add(T item)
   à Telerik.Windows.Controls.GridViewColumn.OnColumnFilterDescriptorPropertyChanged(Object sender, PropertyChangedEventArgs e)
   à Telerik.Windows.Data.DescriptorBase.OnPropertyChanged(PropertyChangedEventArgs args)
   à Telerik.Windows.Data.DescriptorBase.OnPropertyChanged(String propertyName)
   à Telerik.Windows.Data.DescriptorBase.ResumeNotifications()
   à Telerik.Windows.Controls.GridView.FilteringViewModel.ApplyFilters()
   à Telerik.Windows.Controls.GridView.FilteringViewModel.OnDistinctValuesChanged()
   à Telerik.Windows.Controls.GridView.FilteringViewModel.OnDistinctValuesItemChanged(Object sender, ItemChangedEventArgs`1 e)
   à Telerik.Windows.Data.ObservableItemCollection`1.RaiseGenericItemChanged(ItemChangedEventArgs`1 e)
   à Telerik.Windows.Data.ObservableItemCollection`1.OnItemChanged(ItemChangedEventArgs`1 e)
   à Telerik.Windows.Data.ObservableItemCollection`1.Telerik.Windows.Data.IWeakEventListener<System.ComponentModel.PropertyChangedEventArgs>.ReceiveWeakEvent(Object sender, PropertyChangedEventArgs args)
   à Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
   à System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
   à Telerik.Windows.Controls.ViewModelBase.OnPropertyChanged(String propertyName)
   à Telerik.Windows.Controls.GridView.DistinctValueViewModel.set_IsActive(Boolean value)'

 

Have you got any idea ?

Thanky you.

Martin Ivanov
Telerik team
 answered on 04 Oct 2019
3 answers
1.4K+ views

The data binding of the RadRichTextBox does not work. What am I wrong about?

Document Class:

01.public class Document : INotifyPropertyChanged
02.{
03.   private Guid _id = Guid.NewGuid();
04.   private string _title = "New Document";
05.   private string _description
06.   ....
07.   public string Description
08.   {
09.     get { return _description; }
10.     set
11.     {
12.       _description = value;
13.       NotifyPropertyChanged("Description");
14.     }
15.   }
16.}

RadRichTextBox in XAML:

01.<telerik:WizardPage x:Name="DescriptionPage" HeaderTemplate="{StaticResource headerTemplate}" BorderThickness="0">
02.....
03.  <telerik:RadRichTextBox x:Name="DocumentDescriptionTextBox" Grid.Row="2" Grid.Column="1"  Margin="10" Height="200"                                       
04.              IsSpellCheckingEnabled="True"
05.              IsContextMenuEnabled="True"
06.              IsSelectionMiniToolBarEnabled="False"
07.              IsImageMiniToolBarEnabled="False"  
08.              AllowScaling="False"
09.              DocumentInheritsDefaultStyleSettings="True"
10.                          PreviewEditorKeyDown="RichTextBox_PreviewEditorKeyDown"/>
11.  <telerik:TxtDataProvider RichTextBox="{Binding ElementName=DocumentDescriptionTextBox}"
12.               Text="{Binding Path=Description, Mode=TwoWay}"/>
13.....
14.</telerik:WizardPage>

 

Assignment of the DataContext:

1.....
2.this.DescriptionPage.DataContext = _document;
3.....

 

Martin
Telerik team
 answered on 04 Oct 2019
13 answers
598 views
Hello Telerik,

Currently I'm evaluating RadChartView control for task of rendering huge data collections (millions of points) as line charts.
I need the following chart behavior:
- show brief charts when no Zoom
- show precise charts when Zoom is on (greater precise for greater zoom values)
- scrolling should work always on all data (no input data cut is possible though)
- everything should work relatively fast (especially on scrolling)

I know how to achieve part of requirements using ChartDataSource, but I can't understand if it's possible to implement such dynamic adaptive data sampling on zooming and with proper scrolling support.

Could you please advise if it's possible? Is this feature planned? Can it be done using RadChart instead of RadChartView (with good performance on millions of raw data objects)?

Thanks.
Martin Ivanov
Telerik team
 answered on 04 Oct 2019
1 answer
311 views

Hi,

I tacked this message onto an old thread and realized, 3 days later, that might not be the wisest course. Hi Martin,

Just updated my VS to the Net Core 3.0 release. Also updated Telerik. But I cannot get the Telerik Controls to show up in the toolbox when I create a Core project, despite following the installation instructions including manual installation. Note, everything works fine if I create a .NET Framework project

Any thoughts?

Wayne

Yana
Telerik team
 answered on 04 Oct 2019
3 answers
129 views

The undo stack for editing in the rich text box is way too high. Even when typing very quickly with no pauses whatsoever, it has a separate entry for nearly every single letter. Word (and even WordPad) does a much better job at this, only breaking up entries if you pause. Is there any way to adjust this?

 

Tanya
Telerik team
 answered on 03 Oct 2019
2 answers
247 views

Hi,

I am building a multi layered pie chart (by stacking charts).

I would like to remove the border - but I do not want to remove the border between individual pieces.

 

 

Code:

 

<Grid Grid.Column="1" x:Name="StackingChartsContainer">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="Auto"></ColumnDefinition>
</Grid.ColumnDefinitions>

<Grid x:Name="FirstChartGrid" Grid.Column="0">
<telerik:RadPieChart Palette="Windows8" x:Name="FirstChart">
<telerik:RadPieChart.Series>
<telerik:PieSeries>
<telerik:PieSeries.DataPoints>
<telerik:PieDataPoint Label="Operating Time" Value="30"/>
<telerik:PieDataPoint Label="Total Downtime" Value="70"/>
</telerik:PieSeries.DataPoints>
</telerik:PieSeries>
</telerik:RadPieChart.Series>
</telerik:RadPieChart>
</Grid>

<Grid Grid.Column="0"
Width="{Binding Path=ActualWidth, ElementName=StackingChartsContainer, Converter={local:PercentageConverter}, ConverterParameter='0.5'}"  
Height="{Binding Path=ActualHeight, ElementName=StackingChartsContainer, Converter={local:PercentageConverter}, ConverterParameter='0.5'}">

<telerik:RadPieChart Palette="Windows8" x:Name="SecondChart">
<telerik:RadPieChart.Series>
<telerik:PieSeries>
<telerik:PieSeries.DataPoints>
<telerik:PieDataPoint Label="Operating time" Value="30"/>
<telerik:PieDataPoint Label="Internal Downtime" Value="35"/>
<telerik:PieDataPoint Label="External Downtime" Value="35"/>
</telerik:PieSeries.DataPoints>
<telerik:PieSeries.LegendSettings>
<telerik:DataPointLegendSettings/>
</telerik:PieSeries.LegendSettings>
</telerik:PieSeries>

</telerik:RadPieChart.Series>
</telerik:RadPieChart>
</Grid>

<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
</Grid>

<StackPanel Grid.Column="1"
            Margin="0 14 0 0"
            HorizontalAlignment="Center"
            VerticalAlignment="Bottom">
<TextBlock Text="LEGEND:"
           Margin="0 0 0 5"
           HorizontalAlignment="Left"/>

<!--<telerik:RadLegend Grid.Column="1"
                   Items="{Binding LegendItems, ElementName=RadCartesianChart}"
                   Foreground="#FF767676"
                   FontFamily="Segoe UI"/>-->
<telerik:RadLegend x:Name="PieLegend"
                   Items="{Binding LegendItems, ElementName=FirstChart}"/>
<telerik:RadLegend x:Name="PieLegend2"
                   Items="{Binding LegendItems, ElementName=SecondChart}"/>
</StackPanel>


</Grid>

Dion
Top achievements
Rank 1
 answered on 02 Oct 2019
1 answer
131 views

Hello,

In our application, when we set the "AlternationCount", the alternate rows stopped dragging. If I remove the AlternationCount then all the rows start dragging.

I have demo project showcasing the behavior, but I can not upload that here.

Kindly let me know if you able to reproduce this issue at your end ?

Thanks,

Parthiv

Ivan Ivanov
Telerik team
 answered on 02 Oct 2019
1 answer
806 views

Hi, my original issue is as following: I have a collection of Objects to be shown in a Grid; each Object has many individual properties that are editable by user. If I show each property as individual column (straight forward solution) then I end up with tens of columns and a very long horizontal scroll bar – very cumbersome view to inspect and work with data.

I am experimenting with custom row layout as an alternative solution. I declared a few columns (only fields I expect user to sort over) then the rest of the properties will be shown below in the custom layout. Here is a simplified example:

<telerik:RadGridView ItemsSource="{Binding Items}"
                     CanUserSelect="True" ShowGroupPanel="False" AutoGenerateColumns="False" CanUserFreezeColumns="False"
                     CanUserInsertRows="False" CanUserDeleteRows="False" RowIndicatorVisibility="Collapsed" IsFilteringAllowed="False"
                     SelectionMode="Extended"
                     RowStyle="{StaticResource MyRowStyle}">
 
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name}" Width="75" IsReadOnly="True">
        <telerik:GridViewDataColumn Header="Quantity" DataMemberBinding="{Binding Quantity}" Width="50">
        <telerik:GridViewDataColumn Header="Price" DataMemberBinding="{Binding Price}" Width="55">
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

 

<Style x:Key="MyRowStyle" TargetType="telerik:GridViewRow">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="telerik:GridViewRow">
                <Border x:Name="rowsContainer"
                        Background="{TemplateBinding Background}"
                        Padding="0,0,0,3">
             
                    <StackPanel Orientation="Vertical">
                        <telerik:DataCellsPresenter x:Name="PART_DataCellsPresenter" IsTabStop="False" BorderThickness="0"/>
             
                        <Grid Margin="15,3,0,0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="8"/>
                                <ColumnDefinition Width="Auto" MinWidth="100"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="1"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="1"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                         
                            <TextBlock Grid.Row="0" Grid.Column="0" Text="Title"/>
                            <TextBlock Grid.Row="2" Grid.Column="0" Text="Event Name"/>
                            <TextBlock Grid.Row="4" Grid.Column="0" Text="Weight"/>
                         
                            <TextBox Grid.Row="0" Grid.Column="2"
                                             Text="{Binding Title, UpdateSourceTrigger=PropertyChanged}"
                                             MaxLength="30"/>
                            <TextBox Grid.Row="2" Grid.Column="2"
                                             Text="{Binding EventName, UpdateSourceTrigger=PropertyChanged}"
                                             MaxLength="30"/>
                            <TextBox Grid.Row="4" Grid.Column="2"
                                             Text="{Binding Weight, UpdateSourceTrigger=PropertyChanged}"
                                             MaxLength="20"/>
                        </Grid>
                    </StackPanel>
                </Border>
                <ControlTemplate.Triggers>
                    <Trigger Property="IsMouseOver" Value="True">
                        <Setter Property="Background" TargetName="rowsContainer" Value="{StaticResource GridRowHighlightBrush}"/>
                    </Trigger>
                    <Trigger Property="IsSelected" Value="True">
                        <Setter Property="Background" TargetName="rowsContainer" Value="{StaticResource SelectedItemBrush}"/>
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

 

I used DataCellsPresenter to show properties defined as columns properly aligned with respective column headers. The rest of the properties are show through individual editors laid out below.

All works well except for two issues:

Scenario: User starts editing value in “Quantity” column of the grid and then clicks mouse over “Title” textbox.

  • Issue #1 Keyboard focus shifts over to “Title” textbox but the cell in “Quantiy” column still stays in edit more.
  • Issue #2 If user click over “Title” textbox in a different row then that row doesn’t become selected.

Any suggestions?

Dinko | Tech Support Engineer
Telerik team
 answered on 02 Oct 2019
4 answers
164 views

Hi Telerik,

 

I'mu using a RadCarousel with a style applied to all Carousel Items. Sometimes, and randomly, the picture in the Carousel Item disappears (the border or the overlay are still present).

 

My Carousel :

<telerik:RadCarousel Grid.Column="1" x:Name="InspectionCarousel" ItemsSource="{Binding TabDiagramsForActiveInspection}" AutoGenerateDataPresenters="False"
                     Background="Transparent" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden" SelectedItem="{Binding SelectedItem}">
    <telerik:RadCarousel.ItemsPanel>
        <ItemsPanelTemplate>
            <telerik:RadCarouselPanel Path="{StaticResource horizontalPath}"/>
        </ItemsPanelTemplate>
    </telerik:RadCarousel.ItemsPanel>
</telerik:RadCarousel>

 

My Carousel Item Style :

<Style TargetType="telerik:CarouselItem">
    <Setter Property="HorizontalAlignment" Value="Stretch"/>
    <Setter Property="VerticalAlignment" Value="Stretch"/>
    <Setter Property="Height" Value="{Binding Path=ActualHeight, ElementName=InspectionCarousel, Converter={conv:PercentageConverter}, ConverterParameter='0,9'}"/>
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="telerik:CarouselItem">
                <Grid>
                    <Border BorderThickness="5" CornerRadius="4" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                        <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                            <Image Source="{Binding TabDiagram.DiagramAsImage.SerializedImage, Converter={StaticResource ImageConverter}}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
 
                            <Grid>
                                <Grid.Style>
                                    <Style TargetType="Grid">
                                        <Setter Property="Visibility" Value="Collapsed"/>
 
                                        <Style.Triggers>
                                            <DataTrigger Binding="{Binding State}" Value="{x:Static vm:InspectionState.NA}">
                                                <Setter Property="Visibility" Value="Visible"/>
                                            </DataTrigger>
                                        </Style.Triggers>
                                    </Style>
                                </Grid.Style>
 
                                <Grid Background="LightGray" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Opacity="0.6"/>
                                <TextBlock Text="N/A" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="68" FontWeight="SemiBold"/>
                            </Grid>
                        </Grid>
 
                        <Border.Style>
                            <Style TargetType="Border">
                                <Setter Property="BorderBrush" Value="Black"/>
 
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding State}" Value="{x:Static vm:InspectionState.ToBeDone}">
                                        <Setter Property="BorderBrush" Value="Black"/>
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding State}" Value="{x:Static vm:InspectionState.OK}">
                                        <Setter Property="BorderBrush" Value="Green"/>
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding State}" Value="{x:Static vm:InspectionState.KO}">
                                        <Setter Property="BorderBrush" Value="Red"/>
                                    </DataTrigger>
                                    <DataTrigger Binding="{Binding State}" Value="{x:Static vm:InspectionState.NA}">
                                        <Setter Property="BorderBrush" Value="Transparent"/>
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </Border.Style>
                    </Border>
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

 

Details :

- TabDiagram.DiagramAsImage.SerializedImage is an screenshot of a RadDiagram (as bytes)

Converter={StaticResource ImageConverter} is <telerik:BinaryImageConverter x:Key="ImageConverter"/>

- when works.png is a screenshot when the style is correctly applied.

- when doesnt works.png is a screenshot of the behavior of the bug

- context.png is a global screen to show you how i'm using the RadCarousel and RadDiagram

 

=> Do you know why sometimes and randomly the picture disappears ?

 

Thank you

 

Valentin
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 02 Oct 2019
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
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?