Dear Team,
I wanted to try the Radbarcodereader in WPF. I opened a new project with .Framework 4.7
and i just pulled out a Radbarcodereader to an empty WPF window.
Simply started the app, and browsed some random images with barcodes, but every time i push the "decode image" i get IndexOutOfRangeException from the control.
All propertises of the control are on default, what do i have to set up to make it work?
I have tried without control, only by code:
Private Sub Button_Click(sender As Object, e As RoutedEventArgs)
Dim imageSource = img_Camera.Source
Dim decoder As New BarcodeDecoder()
decoder.ImageSource = imageSource
AddHandler decoder.DecodingComplete, AddressOf OnDecodingComplete
decoder.StartDecoding()
End Sub
Private Sub OnDecodingComplete(ByVal sender As Object, ByVal e As DecodingEventArgs)
Dim decodeResult As String
If String.IsNullOrEmpty(e.ErrorMessage) Then
decodeResult = String.Format("Code Type: {0}" & ControlChars.Lf & "Result: {1}", e.CodeType, e.Result)
Else
decodeResult = e.ErrorMessage
End If
txt_RESULT.Text = decodeResult
End Sub
At this line: decoder.StartDecoding()
i also get the IndexOutOfRangeException
Please help :)
thanks
Peter B.