Hi @BitSmithy ,
Welcome to Microsoft Q&A!
According to the document FrameworkElement.Margin,
Property Value Thickness Provides margin values for the object. The default value is a default Thickness with all properties (dimensions) equal to 0.
You need to use Thickness to set the value of MarginProperty.
Setter marginSetter = new Setter();
marginSetter.Property = GridViewItem.MarginProperty;
marginSetter.Value = new Thickness(0);
Thank you.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.