I can’t confirm that this works right now because my preview generally doesn’t work correctly, but it works in general in WPF when trying to hide something only during development.
Include namespace for blend
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
Then in the element you want to hide, use d:IsHidden="True" . This will only affect the development time, which eliminates the problem of forgetting to change the selected index to the correct value before creating it.
Adam
source share