This value:
{Binding Source={x:Static shell:SystemParameters2.Current}, Path=WindowNonClientFrameThickness}
Is usually something like 8,24,8,8 depending on your OS settings. Now, I need to retrieve the “top” value (i.e. 24 in this example) and negate that into -24 and use it for a margin:
<TabControl Margin="0,-24,0,0" />
But how do I retrieve that value, negate it, and place it for the tab’s top margin value?
If it matters, I’m using the https://nuget.org/packages/Microsoft.Windows.Shell
I would probably just create a value converter which contructs the
Margin. (Thicknessis a struct, so you cannot just bind theTopproperty only)