Good Morning:
Following the trail blazed by Artem Gilmanov,(artemgilmanov (Artem Gilmanov) · GitHub), and others, I have attempted to develop a WPF window with MahApps.Metro controls. My particular interest is RangeSlider control. Through a number of refinements, and reworking the OnRender() method for the upper TickBar. The control window, when compiled in VS2022, has this appearance:
The second image shows the range selection of a sub-domain of all the tick values.
When instancing the MainWindow, by using a CustomComponent in Grasshopper, …
the MainWindow does display but is deprived of the MahApps.Metro goodness.
It appears from the VS2022 output that Rhino is loading the MahApps.Metro and related .dlls as part of its opening process. However, numerous TypeNameParseExceptions appear at the opening process and also, when Grasshopper instances the MainWindow as shown below.
‘Rhino.exe’ (CLR v4.0.30319: DefaultDomain): Loaded ‘C:\Users\source\repos\VesselCam_Project\bin\Debug\net48\VC_Core.dll’. Symbols loaded.
Exception thrown: ‘System.FormatException’ in mscorlib.dll
Exception thrown: ‘Grasshopper.Kernel.Expressions.GH_SyntaxException’ in Grasshopper.dll
Exception thrown: ‘System.FormatException’ in mscorlib.dll
Exception thrown: ‘Grasshopper.Kernel.Expressions.GH_SyntaxException’ in Grasshopper.dll
Exception thrown: ‘System.FormatException’ in mscorlib.dll
Exception thrown: ‘Grasshopper.Kernel.Expressions.GH_SyntaxException’ in Grasshopper.dll
Exception thrown: ‘System.FormatException’ in mscorlib.dll
Exception thrown: ‘Grasshopper.Kernel.Expressions.GH_SyntaxException’ in Grasshopper.dll
‘Rhino.exe’ (CLR v4.0.30319: DefaultDomain): Loaded ‘C:\Users\source\repos\VesselCam_Project\bin\Debug\net48\Animate_Wnd.exe’. Symbols loaded.
‘Rhino.exe’ (CLR v4.0.30319: DefaultDomain): Loaded ‘C:\Users\source\repos\VesselCam_Project\bin\Debug\net48\MahApps.Metro.dll’.
‘Rhino.exe’ (CLR v4.0.30319: DefaultDomain): Loaded ‘C:\Users\source\repos\VesselCam_Project\bin\Debug\net48\ControlzEx.dll’.
‘Rhino.exe’ (CLR v4.0.30319: DefaultDomain): Loaded ‘C:\Users\source\repos\VesselCam_Project\bin\Debug\net48\Microsoft.Xaml.Behaviors.dll’.
Exception thrown: ‘MS.Internal.Xaml.Parser.GenericTypeNameParser.TypeNameParserException’ in System.Xaml.dll …
=> many Exceptions
Exception thrown: ‘MS.Internal.Xaml.Parser.GenericTypeNameParser.TypeNameParserException’ in System.Xaml.dll
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey=‘MahApps.Brushes.IdealForeground’
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey=‘MahApps.Brushes.ThemeForeground’
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey=‘MahApps.Brushes.IdealForeground’
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey=‘MahApps.Brushes.ThemeForeground’
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey=‘MahApps.Brushes.IdealForeground’
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey=‘MahApps.Brushes.ThemeForeground’
Exception thrown: ‘System.IO.FileNotFoundException’ in mscorlib.dll
‘Rhino.exe’ (CLR v4.0.30319: DefaultDomain): Loaded ‘Microsoft.GeneratedCode’.
Exception thrown: ‘System.FormatException’ in mscorlib.dll
Exception thrown: ‘Grasshopper.Kernel.Expressions.GH_SyntaxException’ in Grasshopper.dll
Exception thrown: ‘System.FormatException’ in mscorlib.dll
Exception thrown: ‘Grasshopper.Kernel.Expressions.GH_SyntaxException’ in Grasshopper.dll
Exception thrown: ‘Grasshopper.Kernel.Expressions.GH_SyntaxException’ in Grasshopper.dll
Exception thrown: ‘Grasshopper.Kernel.Expressions.GH_SyntaxException’ in Grasshopper.dll
The thread 0x2d84 has exited with code 0 (0x0).
The thread 0x7430 has exited with code 0 (0x0).
Exception thrown: ‘System.FormatException’ in mscorlib.dll
Exception thrown: ‘Grasshopper.Kernel.Expressions.GH_SyntaxException’ in Grasshopper.dll
Exception thrown: ‘System.FormatException’ in mscorlib.dll
Exception thrown: ‘Grasshopper.Kernel.Expressions.GH_SyntaxException’ in Grasshopper.dll
Splash thread 01 : Command Queue Execution complete
Splash thread 01 : SplashController.RhinoLoadComplete() called
… ^^^ Rhino Loading ^^^
… Grasshopper instancing MainWindow below
Exception thrown: ‘MS.Internal.Xaml.Parser.GenericTypeNameParser.TypeNameParserException’ in System.Xaml.dll…
=> many exceptions
Exception thrown: ‘MS.Internal.Xaml.Parser.GenericTypeNameParser.TypeNameParserException’ in System.Xaml.dll
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey=‘MahApps.Brushes.IdealForeground’
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey=‘MahApps.Brushes.ThemeForeground’
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey=‘MahApps.Brushes.IdealForeground’
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey=‘MahApps.Brushes.ThemeForeground’
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey=‘MahApps.Brushes.IdealForeground’
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey=‘MahApps.Brushes.ThemeForeground’
‘Rhino.exe’ (CLR v4.0.30319: DefaultDomain): Loaded
From this, can I conclude that the issue is not with Grasshopper but also with Rhino itself; the control .dlls load, but Rhino or MS.Internal.Xaml.Parser cannot ‘see’ the types within the .dlls?
Please advise.
Thanks in advance.
Dave