I have two controls in a Grid,and need to make one to fill all the Grid space after the another one get Collapseded,i don’t know what Container can i use,i tried StackPanel and DockPanel too,but i couldn’t find a good solution.here’s my code:
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<TextBox Grid.Column="0" Visibility="{Binding Istxt1Visible}"/>
<TextBox Grid.Column="1" Visibility="{Binding Istxt2Visible}"/>
</Grid>
what about using a converter? Such as
in Window resources
…..
Finally the code of the converter is