Telerik Forums
UI for WPF Forum
4 answers
446 views
Hi,

I have some RadListbox inside a ScrollViewer and I would like to be able to scroll with the mouse wheel anywhere inside the scrollviewer.
I'm aware that the RadListBox has a ScrollViewer in his template that capture the MouseWheelEvent so I changed the template by the following.

<Style x:Key="UnscrollableRadListBoxStyle" TargetType="telerik:RadListBox" BasedOn="{StaticResource RadListBoxStyle}">
        <Setter Property="telerik:ScrollingSettingsBehavior.IsEnabled" Value="False"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadListBox">
                    <Grid>
                        <Border Padding="{TemplateBinding Padding}"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                Margin="0"
                                BorderThickness="{TemplateBinding BorderThickness}">
                            <Border.InputBindings>
                                <KeyBinding Command="telerik:ListControl.SelectAllCommand" Key="A" Modifiers="Control"/>
                            </Border.InputBindings>
                            <ItemsPresenter/>
                        </Border>
                        <ContentPresenter x:Name="PART_DropVisualPlaceholder" Visibility="Collapsed" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

Now, the scroll works great, I can scroll with the mouse wheel everywhere. The problem is that when I drop an item inside one of the RadListBox, the DropVisualPlaceHolder appear at wrong place.

Do you have any idea of what I've done wrong ?

Thank you,

Etienne
Dilyan Traykov
Telerik team
 answered on 04 Jan 2021
6 answers
103 views

Hi All,

Any Idea to dig More information on RadCartesianChart control. I have attached a sample graph(sampleBarGraphs.jpeg) snap for reference. As you can see in the snap it is a bar graph which different Activities like planned-131,completed-45 etc. So when I click on Planned Activity in the bar I need to dig more information on it  like a pop up which displayed some rad list items the count of these list is the Planned activity count in the bar graph.

Any samples solutions or documentation for reference to implement the sample graph using telerik controls/behavior's.

Thanks in Advance.

 

Kishorekumar
Top achievements
Rank 1
Veteran
 answered on 04 Jan 2021
1 answer
1.3K+ views

Hello. 
We have a need to execute some command when the window is fully loaded. In order to do that we want to be able to bind event ContentRendered to the command in view model.

What would be the best way to achieve this? As I understood there are three approaches:

- resolving view model from the condebehind and invoking the command

- interactivity library (additional dependancy)

- a combination of attached property and attached behavior

 

What is a recommended way to bind to the window event in MVVM style? Is there a code sample somewhere to take a look at?

 

Thank you.

Martin Ivanov
Telerik team
 answered on 30 Dec 2020
1 answer
126 views

Hi All,

Is there any possible for changing the content of ChartTrackBallBehavior. I have attached a sample image(sample.jpg).I want to modify content of the track ball Behaviour.

Thanks in Advance!

Martin Ivanov
Telerik team
 answered on 30 Dec 2020
3 answers
321 views
I have a quickly updated interface with a lot of UI elements. When trying to drag and drop RadPane, users encounter difficulties, on a slow computer it can take 30 seconds or more. I recorded a small video to make it clear what it was about. In my opinion, when dragging, it is necessary to disable the redrawing of elements inside the container, but how to do this?
I've tried set DragDropMode = DockingDragDropMode.Deferred, it's very fast, but when moving the cursor outside the main window, the application crashes.
Can you advise anything?

https://youtu.be/yD69Nj1B_Bc
Martin Ivanov
Telerik team
 answered on 30 Dec 2020
3 answers
341 views
I tried both footer row styles and footer cells styles, but I can't seem to change the font size of the footer.  I don't really want to create my own footer template for this.
I tried this:
<Style x:Key="Bold10CellStyle" TargetType="telerik:GridViewFooterCell"  >
    <Setter Property="FontSize" Value="10" />
    <Setter Property="FontWeight" Value="Bold" />
</Style>
 
<Style x:Key="SmallBoldFooter" TargetType="telerik:GridViewFooterRow">
    <Setter Property="FontSize" Value="10" />
    <Setter Property="FontWeight" Value="Bold" />
</Style>

Both of these would make my footer bold, but it wouldn't change the fontsize

Martin Ivanov
Telerik team
 answered on 30 Dec 2020
2 answers
138 views
I have a sreadsheet I created to do an export to Excel, but it isn't visible, so the ActiveWorksheetEditor never gets created so I can't freeze panes. Is there any way around this?
Edward
Top achievements
Rank 1
Veteran
Iron
Iron
 answered on 29 Dec 2020
1 answer
124 views

Hello. 

It is an error with symptoms similar to the post below.

In addition to sorting, errors occur in search.

For more information, attach the following article and source code.

Source code only added properties in gridview. The rest are the sources in the GroupSelection SDK.

 

Source : https://drive.google.com/file/d/1f8MWpNmWY_RWF43IEyvnxOKouoi-B7-g/view?usp=sharing

 

Merry Christmas.

Thanks.

Dinko | Tech Support Engineer
Telerik team
 answered on 28 Dec 2020
1 answer
119 views

Hi All,

RadBusyIndicator is not working  when Telerik.Windows.DragDrop.DragDropManager.UseAdornerLayer is set to true during InitializeComponent()

<telerik:RadBusyIndicator BusyContent="Finialising you action..." IsBusy="{Binding IsBusy}">

Let me know were it went wrong.I f Possible attach sample solution for the Issue.

Thanks in Advance.

Regards,

Kishore Kumar 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 28 Dec 2020
5 answers
196 views

I found a sample in your SDK "SelectedItemsBinding" part of your ComboBox.

Trying to understand the logic on using the ComboBox. This code seems very what I need but  I would like to use "SelectedItem" not "SelectedItems". So I working on converting your sample code to signal selection. I have managed to adjust the MainWindows.xaml and kind of understand the List collection. But can't convert this to a signal selection. Yes there are other more simple ComboBox samples but this one interests me.

I changed all the references to "SelectedItems" to "SelectedItem" where I get these errors in VS: "Error CS1503 Argument 1: cannot convert from 'object' to 'System.Collections.IList'"

Can you help me make this work?

using System.Collections;
using System.Collections.Specialized;
using System.Windows;
using System.Windows.Interactivity;
using Telerik.Windows.Controls;
 
namespace SelectedItemBinding
{
    public class SelectedItemBehavior : Behavior<RadComboBox>
    {
        private RadComboBox ComboBox
        {
            get
            {
                return this.AssociatedObject as RadComboBox;
            }
        }
 
        public INotifyCollectionChanged SelectedItem
        {
            get { return (INotifyCollectionChanged)this.GetValue(SelectedItemProperty); }
            set { this.SetValue(SelectedItemProperty, value); }
        }
 
        // Using a DependencyProperty as the backing store for SelectedItemProperty.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty SelectedItemProperty =
            DependencyProperty.Register("SelectedItem", typeof(INotifyCollectionChanged), typeof(SelectedItemBehavior), new PropertyMetadata(OnSelectedItemPropertyChanged));
         
        private static void OnSelectedItemPropertyChanged(DependencyObject target, DependencyPropertyChangedEventArgs args)
        {
            var collection = args.NewValue as INotifyCollectionChanged;
            if (collection != null)
            {
                ((SelectedItemBehavior)target).UpdateTransfer(args.NewValue);
                collection.CollectionChanged += ((SelectedItemBehavior)target).ContextSelectedItem_CollectionChanged;
            }
        }
 
        private void UpdateTransfer(object items)
        {
            Transfer(items as IList, this.ComboBox.SelectedItem);
            this.ComboBox.SelectionChanged += this.ComboSelectionChanged;
        }
 
        private void ContextSelectedItem_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            this.UnsubscribeFromEvents();
            Transfer(SelectedItem as IList, this.ComboBox.SelectedItem);
            this.SubscribeToEvents();
        }
 
        private void ComboSelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
        {
            if (this.ComboBox.ItemsSource != null)
            {
                this.UnsubscribeFromEvents();
                Transfer(this.ComboBox.SelectedItem, SelectedItem as IList);
                this.SubscribeToEvents();
            }
        }
 
        private void SubscribeToEvents()
        {
            this.ComboBox.SelectionChanged += this.ComboSelectionChanged;
            if (this.SelectedItem != null)
            {
                this.SelectedItem.CollectionChanged += this.ContextSelectedItem_CollectionChanged;
            }
        }
 
        private void UnsubscribeFromEvents()
        {
            this.ComboBox.SelectionChanged -= this.ComboSelectionChanged;
            if (this.SelectedItem != null)
            {
                this.SelectedItem.CollectionChanged -= this.ContextSelectedItem_CollectionChanged;
            }
        }
 
        public static void Transfer(IList source, IList target)
        {
            if (source == null || target == null)
                return;
 
            target.Clear();
            foreach (var o in source)
            {
                target.Add(o);
            }
        }
    }
}     
herb
Top achievements
Rank 1
Veteran
Iron
 answered on 25 Dec 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?