Telerik Forums
UI for WPF Forum
1 answer
69 views

I'm trying to apply command from ViewModel to events like DragDrop.DragOver

<telerik:RadListBox>
 <telerik:EventToCommandBehavior.EventBindings>
     <telerik:EventBinding EventName="DragDrop.DragOver" Command="{Binding CommandCmd}"/>
 </telerik:EventToCommandBehavior.EventBindings>
</telerik:RadListBox>
But such code will not work. How to do this?
Dinko
Telerik team
 answered on 16 Nov 2023
1 answer
154 views

Hi

I attached a simple program that import a html file (with format and images) and export it.
The exported file is very different from the original, without format and without images.

Thank you 

Luigi

Vladislav
Telerik team
 updated answer on 16 Nov 2023
1 answer
109 views
I am using filtering with a custom DataProvider for my Virtual Grid.   Users use the popup dialog to set filter conditions.  It works well. 

I understand how to retrieve the filter descriptors from one grid and to apply them to another.  But how may I persist them?

I want to save to a text file a set of filters from VirtualGrid A.   Then, later on, I wan to  set VirtualGrid B columns to to use those same filters purely from that persisted text? 


I can see that ColumnFilterDescriptor.ToString() will give me what looks like a full  persistable filter expression.  At least it looks like a meaningful expression.  But I canntot see a method to go the other way
Dimitar
Telerik team
 answered on 14 Nov 2023
0 answers
82 views

We are trying to add the translation for the QuickAccessToolBar ribbon, but altough I have added the Identifier in our Resources. The entries remains in english.

if I select Show below the Ribbon, then some translation are applied others not:

What are we missing?

We using Telerik Version: 2022.2.815.45

We have added the identifier defined in this link in our resources:

WPF RibbonView - Localization - Telerik UI for WPF

 

Alessandro
Top achievements
Rank 1
 updated question on 13 Nov 2023
1 answer
234 views

Hello,

 

we have a RadGridView which we define in a .xaml file. To this grid we add a few dynamic columns via a Behavior. Our Problem now is, that the columns we defined in the .xaml-file can be filtered normaly, but the dynamicaly added columns are missing the filter icon in the column header. We tried adding a new Instance of the FilterControl which shows the filter icon, but the FilterControl does not do anything and is missing the Search Textboxes.

 

Can you guide us advice on what we need to do to get the filter working for those columns?

 

Here is the code of the Behavior we use to add the dynamic columns:

 


public class RadGridViewAddCustomFieldDefinitionColumnsBehavior : RadGridViewAddFieldDefinitionColumnsBehavior<CustomFieldDefinition>
{
    protected override void AddFieldsColumns(
        IEnumerable<CustomFieldDefinition> fieldDefinitions,
        GridViewDataControl radGridView,
        RadGridViewAddFieldDefinitionColumnsBehavior<CustomFieldDefinition> radGridViewAddFieldColumnsBehavior)
    {
        var corporationIDToNameConverter = new CorporationIDToNameConverter();
        var contactIDToNameConverter = new ContactIDToNameConverter();

        foreach (var customFieldDefinition in fieldDefinitions)
        {
            var column = new GridViewDataColumn
                         {
                             Header = customFieldDefinition.PropertyName,
                             UniqueName = customFieldDefinition.PropertyName,
                             DataMemberBinding = new Binding("CustomFields")
                                                 {
                                                     Converter = new ValueConverterChain
                                                                 {
                                                                     optionalDictionaryValueConverter,
                                                                 },
                                                     ConverterParameter = new ValueConverterChainParameters
                                                                          {
                                                                              customFieldDefinition.ID,
                                                                          },
                                                 },
                         };

            switch (customFieldDefinition.FieldType)
            {
                case FieldType.Corporation:
                    SetColumnValueConverter(column, customFieldDefinition, corporationIDToNameConverter);
                    break;
                case FieldType.Contact:
                    SetColumnValueConverter(column, customFieldDefinition, contactIDToNameConverter);
                    break;
            }

            CurrentFieldDefinitionColumns.Add(column);
            radGridView.Columns.Add(column);
        }
    }

    protected override void SetColumnValueConverter(
        GridViewDataColumn column,
        CustomFieldDefinition fieldDefinition,
        IValueConverter valueConverter)
    {
        var converterChain = (ValueConverterChain)column.DataMemberBinding.Converter;
        var valueConverterChainParameters = (ValueConverterChainParameters)column.DataMemberBinding.ConverterParameter;

        converterChain.Add(valueConverter);
        valueConverterChainParameters.Add(fieldDefinition.Values);
    }
}

 

Kind regards

 

Benny

Martin Ivanov
Telerik team
 answered on 13 Nov 2023
0 answers
77 views
I have a class (ItemTree Parent) bound to a RadPropertyGrid. The class also contains a List of it's own type (List<ItemTree> Children). Is it possible to apply the same PropertyDefinitions for both the parent and children?
Will
Top achievements
Rank 1
Iron
 asked on 10 Nov 2023
1 answer
75 views

Hello,
please I need help to display the data of this type List<List<string>> in the component RadGridView.
Attached is a work in progress that I've started and I'm stuck.

Thanks for your help 

Dinko
Telerik team
 answered on 10 Nov 2023
2 answers
108 views

I have the following code:

<telerik:GridViewDataColumn DataMemberBinding="{Binding CreatedBy.Name}" Header="Name"/>
<telerik:GridViewDataColumn DataMemberBinding="{Binding EventObject.TextData}" Header="User Text"/>

public UserType CreatedBy { get; set; }

public object EventObject { get; set; }

in another class:

public string TextData { get; set; }

 

In the first column, there is a filter icon, and it filters correctly. However, in the second column, there is no filter icon. Could you explain why this might be and how to resolve the issue?

 

Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
 answered on 09 Nov 2023
1 answer
105 views

Hi,
We have an issue with tab control and the drop down menu items. Users can create multiple instances of the same tab, that's being displayed fine but when the drop down menu is shown, I can see the names of the tabs, i.e. multiple instances of say "Customer" tab. Now if I select first repeating tab then click on drop down, I can see multiple tabs being highlighted as selected. My question is how can I make those tab items unique so the tab control recognises them as such.

TIA

P.S. please find attached xaml for styling of drop down items
    <Style TargetType="Telerik_Windows_Controls_TabControl:DropDownMenu" x:Key="DropDownMenuStyle">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="{StaticResource MainScreen.DropDownMenu.BorderBrush}"/>
        <Setter Property="Background" Value="{StaticResource {x:Static root:TabResources.Tab_Active_Background_Brush}}"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="IconColumnWidth" Value="0"/>
        <Setter Property="MaxHeight" Value="500"/>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <telerik:RadWrapPanel Orientation="Vertical"/>
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemContainerStyle">
            <Setter.Value>
                <Style TargetType="Telerik_Windows_Controls_TabControl:DropDownMenuItem">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="Telerik_Windows_Controls_TabControl:DropDownMenuItem">
                                <ControlTemplate.Triggers>
                                    <Trigger Property="IsChecked" Value="True">
                                        <Setter Property="TextBlock.FontWeight" Value="Bold"/>
                                        <Setter Property="Border.Visibility" Value="Visible"/>
                                    </Trigger>
                                    <Trigger Property="IsMouseOver" Value="True">
                                        <Setter Property="TextBlock.FontWeight" Value="SemiBold"/>
                                    </Trigger>
                                </ControlTemplate.Triggers>
                                <Grid MaxWidth="250" MaxHeight="100"
                                      ScrollViewer.VerticalScrollBarVisibility="Disabled" 
                                      DataContext="{Binding ., Converter={StaticResource String2ComplexObjectConverter}}" 
                                      ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="2"/><!--padding left-->
                                        <ColumnDefinition Width="3"/><!--selected item border-->
                                        <ColumnDefinition/><!--content-->
                                        <ColumnDefinition Width="5"/><!--padding right-->
                                    </Grid.ColumnDefinitions>
                                    <!--Let's try to put something that can be hit detected when mousing over-->
                                    <TextBlock Text="" Grid.ColumnSpan="4" HorizontalAlignment="Stretch"/>
                                    <Border Background="{StaticResource ResourceKey={x:Static root:TabResources.Tab_Selected_Indicator_Brush}}"
                                            Visibility="{Binding RelativeSource={RelativeSource AncestorType=Telerik_Windows_Controls_TabControl:DropDownMenuItem}, Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}}" 
                                            Grid.Column="1"/>
                                    <TextBlock Text="{Binding Title}"
                                               Foreground="{StaticResource {x:Static ColourResources.MenubarRibbonText}}"
                                               Margin="3,0"
                                               FontFamily="Segoe UI"
                                               Grid.Column="2"/>
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Telerik_Windows_Controls_TabControl:DropDownMenu">
                    <Border Background="{TemplateBinding Background}"
                            Margin="{TemplateBinding Padding}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <ItemsPresenter Margin="2,5,3,10" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

Dinko
Telerik team
 answered on 08 Nov 2023
1 answer
109 views

Hi

I set the PaneStateChange event in RadDocking, but the argument of method is of type RadRoutedEventArgs that is useless  because it not contains information about the pane and the state. In https://docs.telerik.com/devtools/wpf/controls/raddocking/events/overview is written that the argument should be ActivePangeChangedEventArgs (that inherits from RadRoutedEventArgs but the cast give me null).

Telerik is 2023.02

Thank you

Luigi

 

Dinko
Telerik team
 answered on 07 Nov 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?