Telerik Forums
UI for WPF Forum
1 answer
167 views

   Hello,

I have project where I need to create a table with 2 Rows

The first row has to be filled with Comboboxes with Options to choose , the second Row I get from a Database.

The ammount of Columns will change every time so i have to do it dynamically

What would be my best approach? i attached a screenshot thats shows what I want


Martin Ivanov
Telerik team
 answered on 09 Apr 2020
6 answers
120 views

Hi,

I'm having trouble getting list item ("li") element properties ignored using the HtmlFormatProvider export settings.  In the following example "h1" properties are ignored correctly, but the "li" ones still come through in the output.

settings.PropertiesToIgnore["h1"].AddRange(new List<string>()
{
    "margin-top", "margin-bottom"
});
settings.PropertiesToIgnore["li"].AddRange(new List<string>()
{
    "margin-right", "font-family", "font-size", "color"
});

I notice, looking at HtmlDocumentExporter.ExportBlockContainer, that the call to HtmlHelper.IsPropertyForbiddenForExport passes in "value" as the propertykey rather than a css property name (see below).  Is that correct or am I doing something wrong here?

this.writer.StartTag("li");
if (!HtmlHelper.IsPropertyForbiddenForExport(this.Settings, "li", "value"))
{
    HtmlWriter htmlWriter = this.writer;
    int listItemIndex = this.GetDocumentListForParagraph(paragraph).GetListItemIndex(paragraph);
    htmlWriter.AddAttribute("value", listItemIndex.ToString());

}

Many thanks

John

 

John
Top achievements
Rank 1
 answered on 09 Apr 2020
3 answers
1.0K+ views

I've long been showing a ScatterLineSeries on my RadCartesianChart that uses a MultiBinding in the ItemsSource.  I needed this multibinding because the underlying points are expressed in millimeters but the display can be in any units the user chooses and which the user can change. So I have to convert on the fly.  So I wrote a converter that takes 5 elements 

  1. An array of points to be converted
  2. The source X unit
  3. The source Y unit
  4. The destination X unit
  5. The destination Y unit.

It then returns an array of points converted to the appropriate units.  This works fine.  It looks like this:

 

 

<tk:RadCartesianChart.Series>
    <tk:ScatterLineSeries XValueBinding="X" YValueBinding="Y">
        <tk:ScatterLineSeries.ItemsSource>
            <MultiBinding Converter="{core:PointsLengthConverter}">
                <Binding Path="ProfilePoints" />
                <Binding Path="SystemService.Millimeter" />          <!-- Source X Unit  -->
                <Binding Path="SystemService.Millimeter" />          <!-- Source Y Unit  -->
                <Binding ElementName="Root" Path="LengthAxisUnit" /> <!-- Dest X Unit  -->
                <Binding ElementName="Root" Path="HeightAxisUnit" /> <!-- Dest Y Unit  -->
            </MultiBinding>
        </tk:ScatterLineSeries.ItemsSource>
    </tk:ScatterLineSeries>
</tk:RadCartesianChart.Series>


However now I need to show several plots on this graph, not just one.  But the number varies.  So I need to use a ChartSeriesProvider.  So I did, with a ScatterSeriesDescriptor.  At first it seemed to work -- I got my points -- but then I realized that it iis not converting my points anymore.  It is completely ignoring my "ItemsSource" binding in favor the of the "ItemsSourcePath" property in the descriptor.   

Here's what it looks like:  First I defined a style for each ScatterLineSeries

<Style x:Key="SeriesStyle" TargetType="{x:Type tk:ScatterLineSeries}">

    <d:Style.DataContext>
        <x:Type Type="core:IProfile" />
    </d:Style.DataContext>
 
    <Setter Property="ItemsSource">
        <Setter.Value>
            <MultiBinding Converter="{core:PointsLengthConverter DebugMode=True}">
                <Binding Path="ProfilePoints" />
                <Binding Source="{x:Static sdk:LengthUnit.Millimeter}" />  <!-- Source X Unit  -->
                <Binding Source="{x:Static sdk:LengthUnit.Millimeter}" />  <!-- Source Y Unit  -->
                <Binding ElementName="Root" Path="LengthAxisUnit" />       <!--  Dest X Unit   -->
                <Binding ElementName="Root" Path="HeightAxisUnit" />       <!--  Dest Y Unit   -->
            </MultiBinding>
 
        </Setter.Value>
    </Setter>
</Style>

 

Then, inside chart, I defined the seriesprovider and descriptor and used that style in it:

<tk:RadCartesianChart.SeriesProvider>
    <tk:ChartSeriesProvider Source="{Binding Profiles}">
        <tk:ChartSeriesProvider.SeriesDescriptors>
            <tk:ScatterSeriesDescriptor XValuePath="X" YValuePath="Y"
                                        ItemsSourcePath="Points"
                                        Style="{StaticResource SeriesStyle}">
            </tk:ScatterSeriesDescriptor>
        </tk:ChartSeriesProvider.SeriesDescriptors>
    </tk:ChartSeriesProvider>
</tk:RadCartesianChart.SeriesProvider>

 

Again, this mostly works.  My points get plotted.  My "SeriesStyle" even gets applied to the ScatterLineSeries (e.g. If I set the stroke to "Yellow" in that style, I see a yellow plotline).  But the final element of that style -- ItemsSource -- does NOT get applied.  I've tried putting a breakpoint inside the converter.  It never gets invoked.  So my points all remain in millimeters.

I took a closer look at ScatterSeriesDescriptor, hoping I could find a property that would let me achieve my MultiBinding.  I see XValuePath, YValuePath and ItemsSourcePath, and a few other properties ("TypeConverter", "TypePath", etc) but I cannot see any way to apply a MultiBinding to the series of points.

Can you suggest a way I can work around this?

 

 

 

 

Joe
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 08 Apr 2020
3 answers
120 views

Hi.

I set an style with to change stroke thickness of a shape but I want something like aureole or corona(not corona virus). I attached an image to see what I want.

My style that I set Is

<Style TargetType="telerik:RadDiagramShape">
    <Style.Triggers>
        <Trigger Property="IsMouseOver" Value="true">
            <Setter Property="StrokeThickness" Value="5"></Setter>
        </Trigger>
    </Style.Triggers>
</Style>

 

Davoud
Top achievements
Rank 1
 answered on 08 Apr 2020
0 answers
115 views

Hi,

Firstly I removed the delete button from Schedule view Appointments and I am trying to delete the Appointments using a button added in the UserControl to do the same.

 

From the code behind  I invoked the RecurrenceChoiceDialog as this below.

    Telerik.Windows.Controls.RadScheduleViewCommands.DeleteAppointment.Execute(ScheduleView, ScheduleView);

 

1) Actually I noticed that Whenever we selected the "DELETE THE SERIES"  -> AppointmentDeleting event of the schedule view is firing (Here I set a Boolean isSeriesSelectedForDelete as true).

2) Whenever I select "DELETE OCCURENCE" there is no event firing I noticed. But I have managed it by adding like this

            Telerik.Windows.Controls.RadScheduleViewCommands.DeleteAppointment.Execute(ScheduleView, ScheduleView);
            if (!isSeriesSelectedForDelete)
            {
                var check = vm.Appointments.First().RecurrenceRule.Exceptions.Any(x => x.ExceptionDate == vm.SelectedAppointment.Start);
                if (check)
                    vm.DeleteOccurenceOrSeries(false);
            }

 

I could have reduced a lot of codes like this. if I get a result from the dialog which includes whether the user is clicked OK or CANCEL which one is selected Series or Occurrence . I think my scenario is clear and you can help me out. 

 

Thanks.

Mohammed
Top achievements
Rank 1
 asked on 08 Apr 2020
1 answer
720 views

Hello I encountered a bug or odd behaviour in the RadNumericUpDown control. I use caliburn micro as a MVVM framework to bind a simple property to the Value of the control. On KeyDown I check the value and if a condition fails, I reset the value to the last valid state.

The Problem is that the Value is not updated despite the PropertyChanged event firing correctly. The value is updated after the focus is lost.

 

class ShellViewModel : Screen
{
    /// <summary>
    /// Value before change
    /// </summary>
    protected double ValueBeforeChange;
 
    private double value;
 
    /// <summary>
    /// Gets or sets the value
    /// </summary>
    public new double Value
    {
        get => value;
        set
        {
            if (!(Math.Abs(value - this.value) > double.Epsilon))
            {
                return;
            }
 
            Console.WriteLine($"Value changed to {value}");
            this.value = value;
            NotifyOfPropertyChange(() => Value);
        }
    }
 
    public ShellViewModel()
    {
        Value = 10;
        ValueBeforeChange = Value;
    }
 
    public new void KeyDown(object sender, KeyEventArgs e)
    {
        if (e.Key == Key.Return || e.Key == Key.Enter)
        {
            if (Value > 20)
            {
                Value = ValueBeforeChange;
            }
            else
            {
                ValueBeforeChange = Value;
            }
        }
    }
}

 

<UserControl x:Class="RadUpDownBug.Views.ShellView"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:cal="http://www.caliburnproject.org"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d"
             d:DesignHeight="450" d:DesignWidth="800">
    <StackPanel>
        <telerik:RadNumericUpDown x:Name="Numeric"
                                  FontSize="24"
                                  ValueFormat="Numeric"
                                  NumberDecimalDigits="2"
                                  Value="{Binding Value, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                  ShowButtons="False"
                                  UpdateValueEvent="PropertyChanged"
                                  cal:Message.Attach="[Event KeyDown] = [Action  KeyDown($this,$eventArgs)];" Margin="0" />
        <TextBox></TextBox>
    </StackPanel>
</UserControl>

 

So entering a value above 20 and pressing enter should result in the control displaying the last value (10 at the beginning) But it does not. If you click on the TextBox the control is correctly updated.

Why does this happen and how do I fix this?

Dinko | Tech Support Engineer
Telerik team
 answered on 08 Apr 2020
1 answer
90 views

Hi,

 

I have implemented RadScheduleView for WPF application. However I am experiencing some delay in loading the AppointmentDialog while trying to create an appointment. The same is noticed while trying to edit an appointment. I tried  attaching a sample project, but it shows not supported..

 

Please suggest what could be the reason for the delay.

 

Thanks,

Divya

Vladimir Stoyanov
Telerik team
 answered on 07 Apr 2020
4 answers
195 views

I have a RadChartView with a DateTimeContinuousAxis.  I want my first and last labels to display a particular format (such as YYYY-MM-dd HH:mm:ss), but I want all my inner labels to show a different format (such as simply HH).  I was going to do this with the LabelTemplateSelector based on the AxisLabelModel's CollectionIndex.  However, I don't see a way to tell when I'm at the last label. The documentation of CollectionIndex says

"An AxisLabelModel for example will have this property set to the index of the label within the Telerik.Charting.AxisModel.Labels collection."  However, AxisModel is an internal class, so I cannot access the Labels collection to tell how many labels are on the axis.

How do I get the number of axis labels in my LabelTemplateSelector?

Dinko | Tech Support Engineer
Telerik team
 answered on 07 Apr 2020
16 answers
1,000 views
Hello,
Can I use the telerik map contol, with one of the providers such as:
Bind, open source, google or any other you may know, while
the computer is not conected to the Internet?
I have a local server at the site which is conected to the web.
And maybe it can be used as the tiles provider, but I have no
Idea how to implement this.
Thank you,
Or.
Vladimir Stoyanov
Telerik team
 answered on 07 Apr 2020
1 answer
100 views

https://docs.telerik.com/devtools/wpf/controls/radchart/how-to/howto-filter-radchart-using-the-gridviews-compositefilterdescriptor

I was following the above post regarding using a GridView and CompositeFilterDescriptor to filter a chart, however, I noticed that the example only applies to RadChart, and not RadChartView. When I attempted to implement it on a RadChartView item, I was met with a missing reference error because CartesianChart (in my case) does not have a reference to FilterDescriptors.

Is there any way to achieve this same effect with the current RadChartView? I would really like to avoid having to use a RadChart in my application if possible.

Thanks!

Vladimir Stoyanov
Telerik team
 answered on 07 Apr 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
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?