Alex141 / CalcBinding

Advanced WPF Binding which supports expressions in Path property and other features

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Calc expressions do not work for `UInt64`

lostmsu opened this issue · comments

This outputs raw value in bytes:
{calc:Binding MemoryUsage.UsedBytes, Mode=OneWay}

However, this just outputs empty string (should output kilobytes):
{calc:Binding MemoryUsage.UsedBytes/1024, Mode=OneWay}

UsedBytes if of type UInt64.

DynamicExpresso.Interpreter used by CalcBinding to process expression has not implemented implicit convertion between ulong and int and CalcBinding doesn't support explicit convertion.
To make your code working , just add 'UL' suffix to the constant:
{calc:Binding MemoryUsage.UsedBytes/1024UL, Mode=OneWay}