Error with the new Windows update to new version 1809
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. ".
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" />
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));
}
}
}
{
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.
SIGN IN To post a reply.
3 Replies
MK
Muneesh Kumar G
Syncfusion Team
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.
FA
Fabio
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.
Until yesterday I used my app with that xaml and Windows SDK 1803.
Regards
MK
Muneesh Kumar G
Syncfusion Team
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.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
FA Fabio
- Feb 5, 2019 10:35 AM UTC
- Feb 6, 2019 06:52 AM UTC