anakic/Jot

Adding an Additional Tracker Breaks Jot for VB

Opened this issue · 0 comments

SezMe commented

This, I think, is a continuation of Issue #45
This code in the TrackerServices module works:

Sub New()
   Trackr.Configure(Of Window)().Id(Function(w) w.Name, SystemInformation.VirtualScreen.Size).Property(Function(w) w.Top).Property(Function(w) w.Left).Property(Function(w) w.Height).Property(Function(w) w.Width).PersistOn(NameOf(Window.Closing)).StopTrackingOn(NameOf(Window.Closing))
End Sub

I have a wpf window in my Project with x:Name = GeoElements and a grid column with x:Name = C0. When I add this line to the above code:

Trackr.Configure(Of GeoElements)().Property(Function(g) New With {Key g.C0.Width}).PersistOn(NameOf(GeoElements.Closing)).StopTrackingOn(NameOf(GeoElements.Closing))

Tracker breaks when opening the MainWindow (the first window to be opened) with this error:

Inner Exception 1:
ArgumentException: Expression must be writeable
Parameter name: left