How to get collapsed a Column definition?
-
Monday, May 14, 2012 9:57 AM
Hi All,
I need a best and generic way to work with the Column definitions.
Here say DateTime controls as DT1 and DT2.
By load, i have set a min value for these controls and in the Clear button, am changing the visibility of DT2 as Collapsed. When it is Collapsed the DT1 is stays in the MinWidth position.
Like this.
Help me out any one....
Thanks,
- Edited by sankarann Monday, May 14, 2012 10:22 AM
All Replies
-
Monday, May 14, 2012 11:12 AM
hi,
have you set the width of columns to fixed number. when you will make it "Auto" then i think your problem will be solved
if not can you plz post your design code.
Thanks & Regards dhampall
- Edited by dhampall_79 Monday, May 14, 2012 11:13 AM
-
Monday, May 14, 2012 11:14 AM
Hi,
Its not a fixed one. it may be "Auto" or "Star".
I have tried this but still i cant get the solution.
sankar
-
Monday, May 14, 2012 11:15 AMcan you post your design code.
Thanks & Regards dhampall
-
Monday, May 14, 2012 11:38 AM
Hi this is my design,
<Grid>
<Grid.ColumnDefinitions>
<DatePicker x:Name="DT1"
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
Grid.Column="0"
Width="Auto"
MinWidth="120"
Margin="2,0,0,0"
/>
<DatePicker x:Name="DT2"
Grid.Column="1"
MinWidth="120"
Margin="2,0,0,0"
/></Grid> Thanks a lot for ur Help...
sankar
-
Monday, May 14, 2012 11:59 AM
hi,
can you plz try out this code.
<Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <DatePicker x:Name="DT1" Grid.Column="0" Width="Auto" MinWidth="120" Margin="2,0,0,0" HorizontalAlignment="Stretch" /> <DatePicker x:Name="DT2" Grid.Column="1" MinWidth="120" Height="22" Margin="2,0,0,0" /> </Grid>
Thanks & Regards dhampall
- Marked As Answer by Kee PoppyModerator Thursday, May 24, 2012 6:51 AM

