Telerik Forums
UI for WPF Forum
5 answers
160 views

Hi,

In the documentation of Shape Tool https://docs.telerik.com/devtools/wpf/controls/radimageeditor/tools/shape-tool it says that: "The Shape Tool provides an options to easily customize your shape – you can choose if the shape will be filled with some color or it will consist only of borders, which color and thickness also depends on your preferences. You could take advantage of the LockRatio property, which will ensure that the proportions of the shape will be always the same when resizing.".

But I don't have these options in my ShapeTool() or in my RectangleShape() object (I execute tool commands by code).

Where can I set a border color and a thickness in rectangle shapes and the same for a custom shape tool by code? (I don't use the option panel displayed on right).

Version of my telerik controls: 2019.2.510.45

 

Thanks in advance for your reply.

Fabien
Top achievements
Rank 1
 answered on 23 Oct 2020
4 answers
662 views

In our project we have updated Telerik UI for WPF to version 2020.2.617.

So, the existing Telerik dlls (NoXaml version) were updated via Nuget Package manager to 2020.2.617 version

However when I have updated the theme xaml files, I got the following errors:

Inner Exception 1:<br>XamlObjectWriterException: 'Provide value on 'System.Windows.StaticResourceExtension' threw an exception.' Line number '100' and line position '12'.<br><br>Inner Exception 2:<br>Exception: Cannot find resource named 'ThemeType'. Resource names are case sensitive.

 

As from the error I can see that `ThemeType` resource is missing and that is why application is crashing at runtime.

After investigating a bit I wasn't able to find this resource inside xaml files, which means that it is probably in some dll which is missing from the project.

 

Will much appreciate for any support!

Dilyan Traykov
Telerik team
 answered on 22 Oct 2020
2 answers
228 views
I'm having problems binding my MVVM ViewModel to the ChartSeriesProvider. It's like it's not a part of the Visual Tree.

<telerik:RadCartesianChart>
             
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:CategoricalAxis/>
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:RadCartesianChart.SeriesProvider>
                 
                <telerik:ChartSeriesProvider Source="{Binding Path=CollectionView}">
                    <telerik:ChartSeriesProvider.SeriesDescriptors>
 
                        <telerik:CategoricalSeriesDescriptor ItemsSourcePath="Items"
                                                             ValuePath="Value"
                                                             CategoryPath="Month">
                            <telerik:CategoricalSeriesDescriptor.Style>
                                <Style  TargetType="telerik:LineSeries">
                                </Style>
                            </telerik:CategoricalSeriesDescriptor.Style>
                        </telerik:CategoricalSeriesDescriptor>
                    </telerik:ChartSeriesProvider.SeriesDescriptors>
                     
                </telerik:ChartSeriesProvider>
                 
            </telerik:RadCartesianChart.SeriesProvider>
        </telerik:RadCartesianChart>

and inside the ViewModel that is bound to this view (is its DataContext)

private ICollectionView _collectionView;
public ICollectionView CollectionView
{
    get
    {
        if (this._collectionView == null)
        {
            this._collectionView = CollectionViewSource.GetDefaultView(this.Items);
                using (this._collectionView.DeferRefresh())
                {
                    this._collectionView.SortDescriptions.Clear();
                    this._collectionView.SortDescriptions.Add(new SortDescription("Order", ListSortDirection.Ascending));
                }
        }
        return this._collectionView;
    }
}

Everything else in the View binds ok but I always get no series and according to Snoop

RadChartView Cannot find governing FrameworkElement or FrameworkContentElement for target element
Nitzan
Top achievements
Rank 1
 answered on 22 Oct 2020
2 answers
2.1K+ views

Hi,

How can set text wrapping for the the displayed text of the MultiColumnComboBox control in XAML ?

Regards,
Hans

 

Hans
Top achievements
Rank 1
Veteran
 answered on 21 Oct 2020
7 answers
367 views

Hello

I have a cartesian chart that includes a barchart, which range is fixed and unique, and I have dynamic line series, which are user defined at run time (see attached screenshot).

Each lineseries is bound to a business objects that contains three properties: Color, which will be the color of the series, Code, which is a string that identifies the series, and Coll which is a collactiion of dates + decimals that make the series.

When I add the trackball functionality, I can see the bound values, but I would like to add the Code identifier, as otherwise user cannot tell which is which.

Thanks

Herald

------------------------------------------------------------------

 

<telerik:RadCartesianChart Grid.Row="1" Height="500" VerticalAlignment="Top">
            <telerik:RadCartesianChart.Resources>
                <DataTemplate x:Key="trackBallInfoTemplate">
                    <StackPanel Background="Wheat" Margin="3" Width="100">
                        <StackPanel Orientation="Horizontal">
                            <!--<TextBlock Text="{Binding Code}" FontWeight="Bold" />-->
                            <TextBlock Text="??? - " FontWeight="Bold" />
                            <TextBlock Text="{Binding DataPoint.Value, StringFormat=P2}" />
                        </StackPanel>
                    </StackPanel>
                </DataTemplate>
            </telerik:RadCartesianChart.Resources>
            <telerik:RadCartesianChart.Behaviors>
                <telerik:ChartSelectionBehavior DataPointSelectionMode="None" />
                <!--<telerik:ChartTooltipBehavior/>-->
                <telerik:ChartTrackBallBehavior />
            </telerik:RadCartesianChart.Behaviors>
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:DateTimeContinuousAxis GapLength="0.9" Visibility="Collapsed" ShowLabels="False" TickThickness="0" PlotMode="OnTicks"/>
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis SmartLabelsMode="None" LabelFormat="P0" LabelStyle="{DynamicResource RagGridViewAxisLabel}"/>
            </telerik:RadCartesianChart.VerticalAxis>

            <telerik:RadCartesianChart.SeriesProvider>
                <telerik:ChartSeriesProvider Source="{Binding LineSeries}">
                    <telerik:ChartSeriesProvider.SeriesDescriptors>
                        <telerik:CategoricalSeriesDescriptor CategoryPath="Date" ValuePath="Value" ItemsSourcePath="Coll">
                            <telerik:CategoricalSeriesDescriptor.Style>
                                <Style TargetType="telerik:LineSeries">            
                                    <Setter Property="StrokeThickness" Value="2" />
                                    <Setter Property="Stroke" Value="{Binding Color, Converter={StaticResource colorToSolidColorBrushValueConverter}}"></Setter>
                                    <Setter Property="TrackBallInfoTemplate" Value="{StaticResource trackBallInfoTemplate}"></Setter>
                                </Style>
                            </telerik:CategoricalSeriesDescriptor.Style>
                        </telerik:CategoricalSeriesDescriptor>
                    </telerik:ChartSeriesProvider.SeriesDescriptors>
                </telerik:ChartSeriesProvider>
            </telerik:RadCartesianChart.SeriesProvider>


            <telerik:RadCartesianChart.Grid>
                <telerik:CartesianChartGrid MajorXLineDashArray="5 5" MajorYLineDashArray="5 5" MajorLinesVisibility="Y" />
            </telerik:RadCartesianChart.Grid>
            <telerik:RadCartesianChart.Series>
                <telerik:BarSeries CategoryBinding="Date" ValueBinding="Value" ItemsSource="{Binding MainFundChart}" TrackBallInfoTemplate="{StaticResource trackBallInfoTemplate}">
                    <telerik:BarSeries.PointTemplate>
                        <DataTemplate>
                            <Rectangle Width="10" Fill="Green" />
                        </DataTemplate>
                    </telerik:BarSeries.PointTemplate>
                </telerik:BarSeries>
            </telerik:RadCartesianChart.Series>
        </telerik:RadCartesianChart>

--------------------------------------------

 

public class LineSeriesItem
    {
        public string Code { get; set; }
        public ObservableCollection<ChartItem> Coll { get; set; }
        public System.Windows.Media.Color Color { get; set; }
    }

 

public class ChartItem
    {
        public DateTime Date { get; set; }
        public Decimal Value { get; set; }
    }

Herald
Top achievements
Rank 1
Veteran
Iron
 answered on 21 Oct 2020
3 answers
259 views

Hello.

 

I use RadGridView (2018.1.116.45).

I am create columns and set him binding in programm code as 

 

 

column = new GridViewDataColumn
                {
                    ColumnGroupName = args.ColumnDef.ColumnGroupName,
                 
                    DataMemberBinding = new Binding(args.ColumnDef.Member)
                    {
                        Mode = BindingMode.TwoWay,
                        UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged
                    },
                    IsReadOnlyBinding = new Binding(args.ColumnDef.IsReadOnlyMember)
                    {
                        Converter = new NullToBooleanConverter {IsInverted = true}
                    },
                   
                    Header = args.ColumnDef.Header,
                    IsVisible = true
                };

If i set cell value from UI all right, but if i set value from code UI not update, only after i select cell and try input value, value which i set erly will be placed in UI cell.

I try update view by programm code as

 var oldCellInfo = MainGrid.CurrentCellInfo;
            var gridViewCellInfo = new GridViewCellInfo(sender, gridViewColumn);
            MainGrid.CurrentCellInfo = gridViewCellInfo;

            MainGrid.CurrentCell?.BeginEdit();
            MainGrid.CurrentCell?.CommitEdit();
            
            MainGrid.CurrentCellInfo = oldCellInfo;
            MainGrid.CurrentCell?.BeginEdit();

            MainGrid.UpdateLayout();

 

But this is not working...

How i can update UI?

 

Dinko | Tech Support Engineer
Telerik team
 answered on 20 Oct 2020
1 answer
203 views

Hi community,

 

I am using the current trial version of Telerik UI for Wpf.

I can not find getters to get a cell value of a calculated column, programmatically. Is there a way to find a simple cell value.

- Documentation of the RadGridView :

 

if ((decimal)radGridView1.Rows[0].Cells["UnitPrice"].Value > 10)

     radGridView1.Rows[0].Cells["UnitPrice"].Value = 10;

 

But when I try radGridView1.Rows... I have the message "No definition for Rows..."

So i can not use the documentation code

 

Thank you

 

Matthieu Meunier

 

Dinko | Tech Support Engineer
Telerik team
 answered on 20 Oct 2020
5 answers
195 views

I've been searching here and any other websites that show up in a search online for anything that seemed answer my question but haven't seen anything yet.

I'm looking for a way to prevent appointments from being automatically selected when they have been updated. My appointments are removed and re-added to their collection, which appears to be the only way to successfully update the UI per this forum. I think it was this post I found, for those who are curious - https://www.telerik.com/forums/update-ui-after-collection-of-appointment-change

My problem is this: background logic is updating appointments and when using the schedule the appointment selection is constantly changed to the last updated appointment. This makes selecting and interacting with other appointments difficult. I won't rule out that my implementation may be incorrect, but I believe I have done well so far thanks to this forum.

 

Clifford
Top achievements
Rank 1
 answered on 19 Oct 2020
5 answers
338 views

Hi

Nice work with the new Callout-control, exactly what I needed!

 

1)

Im looking at the documentation, and I have a hard time figuring out how to popup a button on a button clicked for MVVM approach 

(I have a (i)-symbol on a button for each row in my grid that should show a popup/callout with more information for that row)

2) 

Are there example on formatted callout content (newline and bold, mostly needed)

 

 

/Thanks in advance, Robert

Dinko | Tech Support Engineer
Telerik team
 answered on 19 Oct 2020
22 answers
4.8K+ views
Hi everyone !
I want to change item background color when select or mouse hover , help me please !
Martin Ivanov
Telerik team
 answered on 16 Oct 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?