Telerik Forums
UI for WPF Forum
1 answer
88 views

Is it possible to drag to All Day Events and drag from All Day Events?

As can be done in Outlook

Would appreciate help

Martin Ivanov
Telerik team
 answered on 30 Jan 2023
3 answers
313 views
Dear Telerik Team,
We've bumped into next issue. There is RadListBox which exposes CollectionViewSource with grouping.
When user scrolls the listbox up and down (with a mouse wheel or just dragging the thumb), vertical scrollbar changes it's length.
We've ensured that this bug is being reproduced with every Telerik theme set up. And everything is fine if we switch to default WPF ListBox control. 

Here's the code snippet :

<Window x:Class="ListBoxTest.MainWindow"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                Title="MainWindow" Width="1024" Height="768">
     
    <Window.Resources>
        <CollectionViewSource x:Key="Results" Source="{Binding}">
            <CollectionViewSource.GroupDescriptions>
                <PropertyGroupDescription PropertyName="Category" />
            </CollectionViewSource.GroupDescriptions>
        </CollectionViewSource>
    </Window.Resources>
     
    <DockPanel DataContext="{Binding}">
        <telerik:RadListBox Margin="0 0 10 10"
                ItemsSource="{Binding Source={StaticResource Results}}"
                SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
 
            <telerik:RadListBox.GroupStyle>
                <GroupStyle>
                    <GroupStyle.HeaderTemplate>
                        <DataTemplate>
                            <TextBlock Margin="10 10 0 10"
                                        FontWeight="Bold"
                                        Foreground="LightBlue"
                                        Visibility="{Binding Name}"
                                        Text="{Binding Path=Name}"/>
                        </DataTemplate>
                    </GroupStyle.HeaderTemplate>
                </GroupStyle>
            </telerik:RadListBox.GroupStyle>
 
            <telerik:RadListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <StackPanel Margin="5" VerticalAlignment="Center">
                            <TextBlock FontWeight="Bold"><Run Text="{Binding FirstName, Mode=OneWay}" /> <Run Text="{Binding LastName, Mode=OneWay}" /></TextBlock>
                            <TextBlock>Email: <Run Text="{Binding Email, Mode=OneWay}" /></TextBlock>
                            <TextBlock>Phone: <Run Text="{Binding PhoneNumber, Mode=OneWay}" /></TextBlock>
                        </StackPanel>
                    </StackPanel>
                </DataTemplate>
            </telerik:RadListBox.ItemTemplate>
        </telerik:RadListBox>
    </DockPanel>
</Window>


Is there any way to fix this behavior? Any help will be appreciated.

Best Regards, Stanislav


Kay
Top achievements
Rank 1
Iron
 answered on 30 Jan 2023
1 answer
334 views
I have the following class

Class My Class
Class MyClass()
{
   public int Var1 {get; set; }
   public int Var2 {get; set; }
}
i want the selected item to show {var1}/{var2}
for now im doing (for now) is
DisplayMemberPath = "Var1"
but because its a String and a Dependency property i cannot attach a MultiBinding
and RadMultiColumnComboBox  does not have itemTemplate property
how can i achieve it

P.S 
I want the same behavior for the tooltip

p.s 2
i also want to center the selected text but it seems HorizontalContentAlignment  is not working


Thanks in advance

Martin Ivanov
Telerik team
 answered on 30 Jan 2023
1 answer
105 views

Hello Im Working with the RadSlider in the RadScheduler.

 

I've used the RadSlider_OnDragDelta Method to change the view definition. Works as intended atm.

But I've got a problem. If somebody just klicks on the slider (left or right of the Darg-Bar) to make the Bar hop on that spot, the event doesn't get fired.

So I've found several events if somebody drags the silider. But what if somebody just klick on the Slider?

Is there a event i can catch this behaviour?

best regards

Dilyan Traykov
Telerik team
 answered on 30 Jan 2023
0 answers
100 views

Hy everyone,

I have a collection from DB:

var dynamicOutput = _sql.LoadData<dynamic, dynamic>(@"SELECT * FROM " + procedura.Trim() + "(@IdRamura, @DataRef)", p);

RaportRentabilitateGrid2.AddRange(dynamicOutput );

private ObservableRangeCollection<ExpandoObject> _raportRentabilitateGrid2 = new ObservableRangeCollection<ExpandoObject>();
public ObservableRangeCollection<ExpandoObject> RaportRentabilitateGrid2 {
            get { return _raportRentabilitateGrid2; }
            set {
                _raportRentabilitateGrid2 = value;
                OnPropertyChanged(nameof(RaportRentabilitateGrid2));
            }
}

So far everything works ok

I have the RadGridView:

<telerik:RadGridView x:Name="oRaportRentabilitateDet1" DockPanel.Dock="Top"
                                         Style="{StaticResource ContasGridviewStyle}"
                                         Background="White"
                                         AutoGenerateColumns="True"
                                         SelectionUnit="FullRow"
                                         SelectionMode="Single"
                                         HorizontalContentAlignment="Left"
                                         RowIndicatorVisibility="Collapsed"
                                         ShowGroupPanel="False"
                                         IsReadOnly="True"
                                         SelectedItem="{Binding SelectedRaportRentabilitateGrid2,Mode=TwoWay}"
                                         ItemsSource = "{Binding RaportRentabilitateGrid2, Mode=TwoWay}"
                                         VerticalAlignment="Stretch"
                                         Margin="5,0,5,10"
                                         IsSynchronizedWithCurrentItem="True"
                                         IsFilteringAllowed="False"
                                         ScrollViewer.VerticalScrollBarVisibility="Auto"
                                         ScrollViewer.HorizontalScrollBarVisibility="Auto">

And, for formatting the column in the RadGridView with the name DATA, i have the code:

            var delaColumn = oRaportRentabilitateGrid2.Columns["DATA"] as Telerik.Windows.Controls.GridViewDataColumn;
            delaColumn.DataFormatString = "dd.MM.yyyy";

But, it's not working...

I can't figure out why...

Thanks a lot.

Florin
Top achievements
Rank 2
 asked on 27 Jan 2023
0 answers
94 views

Our application uses Telerik.Windows.Controls.RadDiagram to arrange RadDiagramItem instances on the screen.  Our view model uses a higher resolution than 96x96.  When I set RadDiagramItem.Width, for example, to 94.464, I can see in the debugger the framework accepts that value.  However, when I execute the undo operation, I see RadDiagramItem.OnSizeChanged(Size newSize, Size oldSize) called, with oldSize = {94, ... }.  This results in a rounding error in our view model.

Is there any way to put RadDiagram into a fractional pixel mode?

Burl
Top achievements
Rank 1
 asked on 26 Jan 2023
1 answer
134 views
Hello Teleriks. We are currently working on an application that has Telerik chart with a horizontal DateTimeContinuousAxis that is updating every second using ChartPanAndZoomBehavior so we can pan through timeline. What we are trying to accomplish is to have a few buttons one that show the latest 4hrs of chart data, another one that can show the entire chart data, and one other that will move the pan up the front so you can see the latest chart update; on the first 2 ones we want to remove the ChartPanAndZoomBehavior programmatically, but when we tried to set the ActualVisibleRange of the chart,  were not able to find a way. Can you point us in the right direction. Thanks in advance.
Dilyan Traykov
Telerik team
 answered on 26 Jan 2023
1 answer
463 views

Dear Team,

I wanted to try the Radbarcodereader in WPF. I opened a new project with .Framework 4.7 

and i just pulled out a Radbarcodereader to an empty WPF window.

Simply started the app, and browsed some random images with barcodes, but every time i push the "decode image" i get IndexOutOfRangeException from the control.

All propertises of the control are on default, what do i have to set up to make it work?

I have tried without control, only by code:

    Private Sub Button_Click(sender As Object, e As RoutedEventArgs)
        Dim imageSource = img_Camera.Source
        Dim decoder As New BarcodeDecoder()
        decoder.ImageSource = imageSource
        AddHandler decoder.DecodingComplete, AddressOf OnDecodingComplete
        decoder.StartDecoding()
    End Sub
    Private Sub OnDecodingComplete(ByVal sender As Object, ByVal e As DecodingEventArgs)
        Dim decodeResult As String
        If String.IsNullOrEmpty(e.ErrorMessage) Then
            decodeResult = String.Format("Code Type: {0}" & ControlChars.Lf & "Result: {1}", e.CodeType, e.Result)
        Else
            decodeResult = e.ErrorMessage
        End If
        txt_RESULT.Text = decodeResult
    End Sub

 

At this line:     decoder.StartDecoding()

i also  get the IndexOutOfRangeException 

 

Please help :)

thanks

Peter B.

Dilyan Traykov
Telerik team
 answered on 26 Jan 2023
0 answers
68 views
Never mind. I figured out the issue 
Sudeshna
Top achievements
Rank 1
 updated question on 26 Jan 2023
1 answer
115 views

I have one parent type “Aa” inherit from “Telerik.Windows.Controls.ScheduleView.Appointment”, with two inherited types “Bb” and “Cc”. while each one has different properties implementation.

 

I have a RadScheduleView which it’s AppointmentsSource bounded to my ViewModel collection of parent type “Aa” (ObservableCollection<Aa>)

 

I also have two baskets, first one is a list of “Bb” items while the second one is a list of “Cc” items.

 

I can drag any item from each basket (“Aa” or “Bb”) and drop them on the ScheduleView so a new Appointment is created.

 

My problem is that the newly created appointment is always created from parent type “Aa” no matter which basket I selected to drag.

 

I want it to work according to the origin dragged item type so the new appointment will match the type “Bb” or “Cc”.

 

 

I Prepared a Sample code you can see here:

 

https://gist.github.com/EfiNadell/bcc10a8f93b210b7eaf626e67cf459a2

Dilyan Traykov
Telerik team
 answered on 25 Jan 2023
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?