Telerik Forums
UI for WPF Forum
1 answer
113 views
I have two radtimelines in a single WPF view can i add horizontal scrollbars for each of the timeline separately. Both the Timelines are inside the RadSplitContainer and inside a RadPaneGroup.
Martin Ivanov
Telerik team
 answered on 11 Oct 2022
1 answer
105 views
Hi, I'm using a VirtualGrid with a CustomDataProvider. I want disable the filtering capabilities for certain columns removing also de funnel symbol in the header. How can I do that?
Dilyan Traykov
Telerik team
 answered on 11 Oct 2022
1 answer
146 views

Hi

Do you have an example on how to integrate the SyntaxEditor and the Roslyn toll:

Using C#

Want to:

- Compile and display errors

- Get list of functions and be able to navigate to functions

- etc.

/Brian

 


 

 

Martin Ivanov
Telerik team
 answered on 11 Oct 2022
1 answer
134 views

The default design time theme is `office black`, is there any approaches to change default theme?

Set `telerik:StyleManager.Theme="xxx"` for each control is very troublesome.

Stenly
Telerik team
 answered on 04 Oct 2022
1 answer
258 views

Hi All,

I am trying to explore RadAutoSuggestBox (R2 2022 SP1 version) in my WPF MVVM application however I didn't find any support, how to purely bind (TextChanged event and few others) it with my ViewModel. My requirement is: Whenever user type, I have to make API call and then bind response with control's itemsource.

Any help will be appreciated.

Stenly
Telerik team
 answered on 04 Oct 2022
6 answers
118 views
Hello,
with the Office 2013 theme the column headers are in uppercase, but not the column group headers.
That doesn't look very pretty.
Patrick
Vicky
Telerik team
 answered on 04 Oct 2022
1 answer
221 views

I have a RadGridView with one of its columns being a GridViewToggleRowDetailsColumn to allow the operator to expand or collapse the selected row details.

Next to the grid I have a checkbox that I want to use to expand/collapse all rows details in a single click if needed.

I’ve managed to partially do it by using the following code, but the collapse doesn’t work unless I disable row virtualization which I cannot.

Does anyone have a solution to this problem?


        private void ToggleAllRowsDetails(object sender, RoutedEventArgs e)
        {
            if(DataContext is MyViewModel vm)
            {
                using (MyGrid.DeferRefresh())
                {
                    if (MyRowDetails.IsChecked.Value)
                    {                       
                        MyGrid.RowDetailsVisibilityMode = GridViewRowDetailsVisibilityMode.Visible;
                    }
                    else
                    {
                        MyGrid.RowDetailsVisibilityMode = GridViewRowDetailsVisibilityMode.Collapsed;                      
                    }
                }
            }
        }

Martin Ivanov
Telerik team
 answered on 03 Oct 2022
0 answers
105 views

Hi.

I have the following RadPropertyGrid:

XAML:

<Grid
        behaviors:CalloutTagBehavior.CalloutTag="F6C90D8E-9F1C-4372-87D0-17B40EE1E462"
        IsEnabled="{Binding StateDispatcher.EnvironmentState,
                            Converter={converters:ComparisonConverter},
                            ConverterParameter={x:Static runtime:EnvironmentState.Design}}">
        <telerik:RadPropertyGrid
            x:Name="RadPropertyGrid"
            telerik:PropertySet.ShouldAddNullForNonMatchingValues="True"
            AutoGeneratingPropertyDefinition="RadPropertyGrid_OnAutoGeneratingPropertyDefinition"
            EditEnded="RadPropertyGrid_OnEditEnded"
            EditMode="Single"
            FieldIndicatorVisibility="Collapsed"
            IsGrouped="False"
            Item="{Binding SelectedObject}"
            LabelColumnWidth="0.8*"
            Loaded="RadPropertyGrid_OnLoaded"
            PropertySetMode="None"
            RenderMode="Flat">
            <telerik:RadPropertyGrid.GroupStyle>
                <Style TargetType="telerik:RadToggleButton">
                    <Setter Property="Margin" Value="0,0,15,0" />
                </Style>
            </telerik:RadPropertyGrid.GroupStyle>
        </telerik:RadPropertyGrid>
    </Grid>

CodeBehinde:

public partial class PropertyGridPaneUserControl : UserControl
{
    public PropertyGridPaneUserControl(IEventAggregator eventAggregator)
    {
        if (eventAggregator == null) throw new ArgumentNullException(nameof(eventAggregator));
        InitializeComponent();
        eventAggregator.Register<RefreshPropertyGridMessage>(this, RefreshPropertyGridMessageHandler);
    }

    private void RefreshPropertyGridMessageHandler(RefreshPropertyGridMessage message)
    {
        RadPropertyGrid.ReloadData();
    }

    private void RadPropertyGrid_OnAutoGeneratingPropertyDefinition(object? sender, AutoGeneratingPropertyDefinitionEventArgs e)
    {
        ((Binding)e.PropertyDefinition.Binding).ValidatesOnExceptions = true;
    }

    private void RadPropertyGrid_OnLoaded(object sender, RoutedEventArgs e)
    {
        var virtualizingStackPanel = RadPropertyGrid
            .ChildrenOfType<VirtualizingStackPanel>().FirstOrDefault();
        if (virtualizingStackPanel != null)
        {
            virtualizingStackPanel.ScrollOwner.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled;
        }
    }

    private void RadPropertyGrid_OnEditEnded(object? sender, PropertyGridEditEndedEventArgs e)
    {
        if (e.EditAction != PropertyGridEditEndedAction.Commit ||
            Equals(e.NewValue, e.OldValue) ||
            DataContext is not PropertyGridViewModel {SelectedObjects: { }} propertyGridViewModel) return;

        ItemPropertyInfo sourceProperty = e.EditedPropertyDefinition.SourceProperty;

        foreach (var selectedObject in propertyGridViewModel.SelectedObjects)
        {
            if (selectedObject == e.EditedPropertyDefinition.Instance) continue;

            PropertyInfo? property = selectedObject.GetType()
                .GetProperty(sourceProperty.Name, sourceProperty.PropertyType);

            if (property != null)
            {
                property.SetValue(selectedObject, e.NewValue);
            }
        }
    }
}

And it worked fine up to a certain point. The problem occurs when processing an object with the ObservableCollection property of the following type:

public class A
{
    public ObservableCollection<object> Collection { get; }
}

My task is to perform asynchronous addition of elements to a nested collection. If I didn't open the CollectionEditor in the UI, then the addition happens without problems. But if you open CollectionEditor in UI at least once, InvalidOperationnException is generated when adding asynchronously: The calling thread cannot access this object because a different thread owns it.  Stack trace part:

 at System.Windows.Threading.Dispatcher.VerifyAccess()
  at System.Windows.DependencyObject.GetValue(DependencyProperty dp)
  at System.Windows.Controls.Panel.get_IsItemsHost()
  at System.Windows.Controls.ItemsControl.GetItemsOwnerInternal(DependencyObject element, ItemsControl& itemsControl)
  at System.Windows.Controls.Panel.VerifyBoundState()
  at System.Windows.Controls.Panel.OnItemsChanged(Object sender, ItemsChangedEventArgs args)
  at System.Windows.Controls.ItemContainerGenerator.OnItemAdded(Object item, Int32 index)
  at System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
  at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
  at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
  at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
  at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
  at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
  at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
  at MS.Internal.Data.CollectionViewProxy._OnViewChanged(Object sender, NotifyCollectionChangedEventArgs args)
  at Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
  at Telerik.Windows.Data.QueryableCollectionView.ProcessSynchronousCollectionChangedWithAdjustedArgs(NotifyCollectionChangedEventArgs originalArguments, Int32 adjustedOldIndex, Int32 adjustedNewIndex)
  at Telerik.Windows.Data.QueryableCollectionView.ProcessSynchronousCollectionChanged(NotifyCollectionChangedEventArgs args)
  at Telerik.Windows.Data.QueryableCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
  at Telerik.Windows.Data.QueryableCollectionView.OnSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
  at Telerik.Windows.Data.QueryableCollectionView.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args)
  at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)

At the same time, an exception occurs even if in Rad PropertyGrid.Item set another instance of the object or null. I would like to know how to correct this misunderstanding

Mikola
Top achievements
Rank 1
 asked on 29 Sep 2022
0 answers
97 views

How dynamically change with of column in RowDetails

Hello. I have a TreeListView with three columns. Also some rows have details. There is a GridView in Details. I would like that width of the first column in Details is equals width of the first column in TreeListView, and so on for each columns. And when I change size of TreeListView the columns in Details dynamically change itself width.
Telerik SDK Samples Browser has demo "Binding RowDetails Element Width". But it's not working when I change size of window. Details does not change it's width.

Thanks.

Alexander
Top achievements
Rank 1
 asked on 29 Sep 2022
0 answers
480 views

I'm converting my application to use the Windows 11 theme and I noticed an issue that sometimes pops up with the RadGridView control.
When closing a details section of a row (click on the minus button to close the row again) the lines suddenly jump down and show a bit white space.

I didn't have the issue before I switched to the new theme. (before we were using the Office 2016 theme)
Currently I have no clue why it's happening or where I should start looking. When I scroll or click on the plus button to open row details it goes back to normal.

Anybody experienced something similar before?

Ict
Top achievements
Rank 1
Iron
 asked on 26 Sep 2022
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?