Alex141 / CalcBinding

Advanced WPF Binding which supports expressions in Path property and other features
Apache License 2.0
632 stars 79 forks source link

Calc expressions do not work for `UInt64` #77

Open lostmsu opened 3 years ago

lostmsu commented 3 years ago

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.

netwww1 commented 1 year ago

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}