Telerik Forums
UI for WPF Forum
0 answers
73 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
203 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
65 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
69 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
101 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
93 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
95 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
1 answer
87 views

Hi,

I'm trying to add a barcode inside a FlowDocumentEditor.

 


public static ImageInline InsertQRCode(this RadFlowDocumentEditor editor, string code, double width = 96)
{

    // Barcode
    const double imgWidth = 1000;
    var barcode = new RadBarcode
    {
        Width = imgWidth,
        Height = imgWidth,
        Symbology = new QRCode()
        {
            ErrorCorrectionLevel = ErrorCorrectionLevel.H,
            CodeMode = CodeMode.Alphanumeric
        },
        Value = code
    };
    
    barcode.BeginInit();
    barcode.Measure(new Size(imgWidth, imgWidth));
    barcode.Arrange(new Rect(new Size(imgWidth, imgWidth)));
    barcode.UpdateLayout();
    barcode.EndInit();

    using (var stream = new MemoryStream())
    {
        Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(barcode, stream, new PngBitmapEncoder());
        stream.Position = 0;

        return editor.InsertImageInline(new Telerik.Windows.Documents.Media.ImageSource(stream, "png"),
            new Size(96, 96));

    }

At barcode.Measure, I've got an NullException. This didn't happen with old RadBarCodeQR component.

Any ideas?

Martin Ivanov
Telerik team
 answered on 07 Nov 2023
0 answers
98 views
hello
I am Korean, so please understand that I wrote this in translation.

[inquiry]
As the title suggests, there is a problem with my source code and it cannot be resolved.

I am coding in MVVM method.

1. Enter TEXT in “ChangeDetails” [Cell] of [Grid View]
2. When executing the event of “PgmUpCommand”
3. “ChangeDetails” does not lose focus, and the bound “ChangeDetails” value cannot be retrieved.
4. After doing number 1, click another [Cell] in the [Grid] and execute number 2 to get the “ChangeDetails” value normally.

I would appreciate it if you could tell me the solution.

Below is the source

<telerik:RadGridView x:Name="dataGrid1" Grid.Column="1" IsReadOnly="False"
ItemsSource="{Binding PgmInfoList}"
SelectedItem="{Binding SelectedPgmInfoItem, Mode=TwoWay}" Margin="239,27,-0.2,-0.4" Grid.RowSpan="2" Grid.ColumnSpan="3" >
<i:Interaction.Behaviors>
<behaviors:GridViewBehavior UseSummaryInfo="False" ShowFooterInfo="False"/>
</i:Interaction.Behaviors>
<i:Interaction.Triggers>
<i:EventTrigger EventName="Loaded">
   <prism:InvokeCommandAction Command="{Binding GroupDetailLoadedCommand}" />
</i:EventTrigger>
<i:EventTrigger EventName="CellEditEnded">
   <prism:InvokeCommandAction Command="{Binding CellEditEndedCommand}" />
</i:EventTrigger>
<i:EventTrigger EventName="SelectedCellsChanged">
   <prism:InvokeCommandAction Command="{Binding PgmInfoSelectedCellChangedCommand}"/>
</i:EventTrigger>
<i:EventTrigger EventName="RowEditEnded">
   <prism:InvokeCommandAction Command="{Binding RowEditEndedCommand}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
<telerik:RadGridView.ColumnGroups>
<telerik:GridViewColumnGroup Name="Division" Header="" />
<telerik:GridViewColumnGroup Name="Regist" Header="{Binding [WRD_RegistChangeHistory], Source={StaticResource DRes}}" />
<telerik:GridViewColumnGroup Name="Upload" Header="{Binding [WRD_UploadPGMfile], Source={StaticResource DRes}}" />
</telerik:RadGridView.ColumnGroups>
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding ChangeDetails, Mode=TwoWay}" IsReadOnlyBinding="{Binding Path=IsEnableReadOnly, Mode=TwoWay}"
                                    Header="{Binding [WRD_ChangeHistory1], Source={StaticResource DRes}}"
                                HeaderCellStyle="{StaticResource GridViewHeaderRowStyleBV}"
                                ColumnGroupName="Regist"/>
        <telerik:GridViewDataColumn Header="{Binding [WRD_UP], Source={StaticResource DRes}}" ColumnGroupName="Upload" HeaderCellStyle="{StaticResource GridViewHeaderRowStyleB}">
            <telerik:GridViewDataColumn.CellTemplate>
                <DataTemplate>
                    <Button
                                Command="{Binding DataContext.PgmUpCommand,  RelativeSource={RelativeSource Mode=FindAncestor, AncestorLevel=1, AncestorType={x:Type telerik:RadGridView}}}"
                                CommandParameter="{Binding}"
                                Content="..." IsEnabled="{Binding PgmUpisEnabled}"/>
                </DataTemplate>
            </telerik:GridViewDataColumn.CellTemplate>
        </telerik:GridViewDataColumn>
    </telerik:RadGridView.Columns>
</telerik:RadGridView>


son
Top achievements
Rank 1
 asked on 07 Nov 2023
0 answers
67 views

Hi

I have a RadDocking with tabbed documenthost.
If I have only one tab in DocumentHost and I dragged it, the content of the floating window is empty, when I dock again the tab the content is correctly restored.
If I have many tabs in DocumentHost and I dragged one, the content is correctly displayed.

I attached two images that explain the two cases

With 2 or more tabs (correct):

With only one tab (empty) (the content of the second panel should be the same of first image)

 

Furthermore, in both cases the header is missing.

 

Thank you
Luigi

Luigi
Top achievements
Rank 3
Bronze
Iron
Iron
 updated question on 02 Nov 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?