Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8518557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:00:43+00:00 2026-06-11T06:00:43+00:00

Hello i have the following function in my IMultiValueConverter Public Function Convert(ByVal values() As

  • 0

Hello i have the following function in my IMultiValueConverter

Public Function Convert(ByVal values() As Object, _
                     ByVal targetType As System.Type, _
                     ByVal parameter As Object, _
                     ByVal culture As System.Globalization.CultureInfo) As Object Implements IMultiValueConverter.Convert
    If Not IsDBNull(values(0).ToString) And AndAlso Not IsDBNull(values(1).ToString) Then 
        If CDbl((values(1))) > 0 Then

            Select Case CInt(Fix(values(0)))
                Case 1
                    Return New LinearGradientBrush(Color.FromArgb(My.Settings.r1rowcolor.A, My.Settings.r1rowcolor.R, My.Settings.r1rowcolor.G, My.Settings.r1rowcolor.B), Color.FromArgb(My.Settings.r1rowendcolor.A, My.Settings.r1rowendcolor.R, My.Settings.r1rowendcolor.G, My.Settings.r1rowendcolor.B), My.Settings.r1angle)
                Case 2
                    Return New LinearGradientBrush(Color.FromArgb(My.Settings.r2rowcolor.A, My.Settings.r2rowcolor.R, My.Settings.r2rowcolor.G, My.Settings.r2rowcolor.B), Color.FromArgb(My.Settings.r2rowendcolor.A, My.Settings.r2rowendcolor.R, My.Settings.r2rowendcolor.G, My.Settings.r2rowendcolor.B), My.Settings.r2angle)
                Case 3
                    Return New LinearGradientBrush(Color.FromArgb(My.Settings.r3rowcolor.A, My.Settings.r3rowcolor.R, My.Settings.r3rowcolor.G, My.Settings.r3rowcolor.B), Color.FromArgb(My.Settings.r3rowendcolor.A, My.Settings.r3rowendcolor.R, My.Settings.r3rowendcolor.G, My.Settings.r3rowendcolor.B), My.Settings.r3angle)
                Case Is > 3
                    Return New LinearGradientBrush(Color.FromArgb(My.Settings.rm3rowcolor.A, My.Settings.rm3rowcolor.R, My.Settings.rm3rowcolor.G, My.Settings.rm3rowcolor.B), Color.FromArgb(My.Settings.rm3rowendcolor.A, My.Settings.rm3rowendcolor.R, My.Settings.rm3rowendcolor.G, My.Settings.rm3rowendcolor.B), My.Settings.r4angle)
            End Select

        ElseIf CDbl((values(1))) < 0 Then
            Return New LinearGradientBrush(Color.FromArgb(My.Settings.minpricesprice.A, My.Settings.minpricesprice.R, My.Settings.minpricesprice.G, My.Settings.minpricesprice.B), Color.FromArgb(My.Settings.minpricesprice.A, My.Settings.minpricesprice.R, My.Settings.minpricesprice.G, My.Settings.rm3rowendcolor.B), My.Settings.minpricespriceangle)
        End If
    End If
End Function

in the following line i get an exception “Conversion from type ‘NamedObject’ to type Double’ is not valid”

If CDbl((values(1))) > 0 Then

so i wonder what might cause this exception, could it be failing to check for DBNULLS?
note that the converter is working without the multi binding

or can it be that i am passing 2 values one is integer and one is double?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:00:45+00:00Added an answer on June 11, 2026 at 6:00 am

    The NewItemPlaceholder in a CollectionView is a NamedObject, so maybe the ItemPlaceholder ends up being passed into your converter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a following code which works fine MsgBox(AddSomething(Of String)(Hello, World)) Public Function AddSomething(Of
Let us presume I have the following object defined: var myObj = function(){ this.hello
I have following code snippet: class ABC{ public: int a; void print(){cout<<hello<<endl;} }; int
Hello i have this following function: ... var model = $(#carModel); .... model.change(validModel); function
Hello I have a following formvalidatior function in my document. function formValidator(formid) { var
I have the following array: var example = [ function() { /* hello */
I have the following code jQuery.getJSON(encodeURI(strUrl), {address:address,state:state, zip:zip},function(data){ alert('HELLO World!'); }); If for some
I have the following problem. I need to pass the hello function to name
So I have the following code: <script type=text/javascript> $(document).ready( function () { $(#txt).click(function ()
Fellow JQuery hackers, hello :-) Suppose you have the following code: $('.links').click(function(){ //Do something

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.