Telerik Forums
UI for WPF Forum
1 answer
91 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
105 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
76 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
0 answers
88 views

So I've got an application that has been working for the last 2 years with no issue. All of a sudden on some machines the radPdfViewer will not load or display PDFs. I've updated the code to the most recent version of the Telerik WPF UI controls but nothing different. The application works fine on my dev machine and a handful of others, but there are 3 machines specifically that it fails to load on. No errors just does not load. Has anyone else encountered this issue?

Here is the relevant code snippet:
Uri documentSourceUri = new Uri("https://www.somedomain.com/printables/paview.php?get_permitNumber=" + permitNumber);
PdfDocumentSource documentSource = new PdfDocumentSource(documentSourceUri);
pdfViewer.DocumentSource = documentSource;

Clint
Top achievements
Rank 1
 asked on 02 Nov 2023
0 answers
89 views

I'm looking for a NuGet Package that contains the Telerik.Windows.Controls.DataServices library that is binded against the latest Microsoft.OData.Client library.

In your documentation (https://docs.telerik.com/devtools/wpf/controls/raddataservicedatasource/getting-started/getting-started) you write, that such a version can be found in the NetCore, WPF50 and WPF60 folders. But in none of the NuGet packages I'm able to find such a folder.

I would highly appreciate it if you can help out here.

Robin
Top achievements
Rank 1
 asked on 01 Nov 2023
1 answer
136 views

Dear Telerik Team,

I am using the RadNumericUpDown control for accepting the numeric value. I have made hidden the up and down tick button so it look like simple textbox. The purpose of using this control specific for Distance and Weight values so it can be in any unit of measurement. For example, meter, millimeter, feet, kg, ton etc.

For simple UOM like meter, I can simply set the CustomUnit as "m" and it works fine. But How can I represent the value of 99.11 feet to feet and inch e.g., 99 ft 1 in

So whenever user trying to edit the value, it will be in feet only and once it is edited value will be displayed in feet and inch. 

How can  I achieve this behavior using RadNumericUpDown control ?

Thanks & Regards,

Hiren Lad

Dinko
Telerik team
 answered on 01 Nov 2023
1 answer
84 views
The performance needs to be improved, it takes more than 15 seconds to open an xml file with more than 30,000 lines when using the First Look sample.
Dimitar
Telerik team
 answered on 01 Nov 2023
1 answer
107 views

Hi,

Would it be possible to have an editable RadMasked Part to mimic the RadWatermarkTextBox with floating Label?

Stenly
Telerik team
 answered on 31 Oct 2023
0 answers
97 views

Hello everyone,

 

in my application I have 2 different usercontrol. In first ine I have a RadTileView, In the other usercontrol I have a simple list of element present in the first usercontrol (with a dedicated button) and i want to open the radtile view element by click on the button.

Through this code


 var container = radTileElement.ItemContainerGenerator.ContainerFromItem(item) as RadTileViewItem;

 if (container != null)
 {
    container.TileState = TileViewItemState.Maximized;                 
 }

i can open the Tile view from the other usercontrol, but only if all element of RadTileView are in Minimized state. If a tile view element in the RaTileView is Maximized this call

 


radTileElement.ItemContainerGenerator.ContainerFromItem(item) as RadTileViewItem;

 return null.

 

Any suggestions?

 

Thank you

Marco
Top achievements
Rank 1
 asked on 31 Oct 2023
1 answer
84 views

Hello everyone,

I have a table in my RadDocument. I create the tabele with code and insert it at the end in my RadDocument.

Is there a way to keep the whole table together if the table reach a page break?

 

Best regards and thanks for your help :-)

Stenly
Telerik team
 answered on 30 Oct 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?