We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Error with the new Windows update to new version 1809

Thread ID:

Created:

Updated:

Platform:

Replies:

142458 Feb 5,2019 10:35 AM UTC Feb 6,2019 06:52 AM UTC UWP 3
loading
Tags: SfNumericTextBox
Fabio
Asked On February 5, 2019 10:35 AM UTC

Hi,
I get this error:
"Errore CS0266 Non è possibile convertire in modo implicito il tipo 'object' in 'decimal?'. È presente una conversione esplicita. Probabilmente manca un cast. ".
My xaml is:

            <sync:SfNumericTextBox Value="{x:Bind Main.Importo,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                   Grid.Row="7"
                                   Grid.Column="1"
                                   AllowNull="True"
                                   Margin="0,5,0,0"
                                   Width="150"
                                   HorizontalAlignment="Left"
                                   ParsingMode="Decimal" />

My csharp property is:

        public decimal? Importo
        {
            get => _movimento.Importo;
            set
            {
                if (_movimento.Importo != value)
                {
                    _movimento.Importo = value;
                    onChanged();
                    onChanged(nameof(CanSave));
                }
            }
        }

This issue came with the new WNuovo errore con il nuovo aggiornamento di Windows alla nuova versione 1809indows update to new version 1809.

Regards.

Muneesh Kumar G [Syncfusion]
Replied On February 5, 2019 01:02 PM UTC

Hi Fabio, 
 
Greetings, we have analyzed your query and we would like to inform you that this is a framework level problem. While using x:Bind with different type source and target, it will throw this exception. This problem occurs in all version of UWP not only in 1809.  
 
You can resolve this problem by using Binding instead of x:Bind in your application as per the below code snippet.  
 
Code snippet 
  <sync:SfNumericTextBox Value="{Binding Main.Importo,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                                   Grid.Row="7" 
                                   Grid.Column="1" 
                                   AllowNull="True" 
                                   Margin="0,5,0,0" 
                                   Width="150" 
                                   HorizontalAlignment="Left" 
                                   ParsingMode="Decimal" /> 
 
Hope this helps you.  
  
Thanks,  
Muneesh Kumar G.  
 


Fabio
Replied On February 5, 2019 03:45 PM UTC

Hi,
today I updated Windows to 1809 version and I updated the destination version of my app to Windows 1809.
Until yesterday I used my app with that xaml and Windows SDK 1803.

Regards

Muneesh Kumar G [Syncfusion]
Replied On February 6, 2019 06:52 AM UTC

Hi Fabio,  
 
Thanks for your update, however this binding problem occurs in all the msdn control like (ContentControl, TextBlock..etc), not only in SfNumericTextBox. Please check the behavior of x:Bind markup extension in below link.  
 
 
Thanks, 
Muneesh Kumar G. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;