Telerik Forums
UI for WPF Forum
1 answer
653 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
81 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
174 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
923 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
87 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
2 answers
272 views
Hello there,

we are using the RadDiagram to create a kind of hierarchical view, where the connections should show some information about the connection itself.

I've tried to use the Horizontal-/VerticalContentAlignment for this, but since the different directions of the connections I haven't found a solution that worked for all connections yet.

I've attached a picture of our momentary existing diagram. The text for the connections is correctly placed on connections to the left, but not to the right.

Here is the style we are currently using:
<Style x:Key="EdgeStyle" TargetType="telerik:RadDiagramConnection">
                        <Setter Property="SourceCapType" Value="Arrow1" />
                        <Setter Property="VerticalContentAlignment" Value="Center"/>
                        <Setter Property="HorizontalContentAlignment" Value="Left"/>
                        <Setter Property="ContentTemplate">
                            <Setter.Value>
                                <DataTemplate DataType="diagramStuff:DiagramEdge">
                                    <TextBlock HorizontalAlignment="Left" Margin="-20,10,0,0" Background="#F3FFFFFF" Text="{Binding Description}" />
                                </DataTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>

It would be perfect, if the text could be positioned right beneath where the connection "meets" the Shape (I've marked the spot on the screenshot in yellow), but I have no idea how to accomplish this.

Could you please help me out how we could accomplish this?


Petar Mladenov
Telerik team
 answered on 07 Apr 2020
1 answer
110 views

Hello,

I'm having an issue that so far seems to affect only one out of about eight users that have tested so far. When the user drags a pane to the main docking compass and hovers, the highlighted section indicating where the pane will dock to is incorrect. But the pane does end up docking correctly.  The real problem is when the user tries to dock to the left root compass. The section does not highlight and letting go of he mouse does not dock to the left.  This only happens for one user. The user is on a laptop and remotes into the test server via RDP.  The user seems the same results when RDPing into 3 other test servers.  The other seven users are also using an RDP session but everything works correctly for them.  I've attached an example of the misplaced arrows (you can see that the right root compass arrow is moved in a bit) and hover as well as an example of what it looks like for everyone else.

I have not overridden any behaviors for the docking drag and drop or any styling for the compass.  I'm curious if anyone knows of why this would only be happening to one user. My first thought was screen resolution but I do not see anything out of the ordinary for that user.

Thank you,

Tara

Kalin
Telerik team
 answered on 07 Apr 2020
3 answers
100 views

We've got a custom control which inherits RadTabbedWindow. I.e:

 

<telerik:RadTabbedWindow x:Class="MyCustomTabbedWindow">...</telerik:RadTabbedWindow>

 

MyCustomTabbedWindow binds to a viewmodel and so on, and works fine. However, when it creates a new window by dragging a tab out of it, the new window (event.NewWindow) is of the base type (RadTabbedWindow), not MyCustomTabbedWindow...

 

Is it possible to fix this somehow so that the newly created window is of the correct type? At the moment we've done a workaround which creates the new window in the event handler and cancels the original event, but that feels... like a workaround :)

 

Any suggestions on how to go about doing this?

Mattias
Top achievements
Rank 1
 answered on 07 Apr 2020
2 answers
221 views

Hi, can someone show me a simple way how to set "mat:ThemeEffectsHelper.IsAcrylic" to false? I was not able to create a new style based on DialogWindowStyle without getting errors.

Thanks!

Regards
Heiko

Heiko
Top achievements
Rank 1
Iron
Veteran
 answered on 06 Apr 2020
5 answers
123 views

Is there a way to add a header row to the DropDownItemTemplate in the RadAutoCompleteBox?

Dinko | Tech Support Engineer
Telerik team
 answered on 06 Apr 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?