You can add crumpled (hidden buttons that do not take up space) to the cells and make them visible if necessary.
This behavior can also be tied to some condition with an IValueConverter by visibility property.
UPDATE tx . , , :
<Window.Resources>
<BooleanToVisibilityConverter x:Key="myConverter"/>
</Windos.Resources>
<Button Visibility="{Binding Path=myCondtion,Converter={StaticResource myConverter}}"/>
myContition - , . , , , false, , .