Hello, I created a templated Column with templates:
<Grids:TemplateColumn.ItemTemplate> <DataTemplate> <Grid> <Grid.Resources> <BooleanToVisibilityConverter x:Key="BoolVisibilityConverter"/> <FilterSet:EmptyConverter x:Key="ValueConverter"/> </Grid.Resources> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="20"/> </Grid.ColumnDefinitions> <TextBlock Text="{Binding Name, Converter={StaticResource ValueConverter}, Mode=OneWay}" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Center" /> <Buttons:ImageButton Command="{Binding ParameterSettingsCommand}" Visibility="{Binding HasSettings, Converter={StaticResource BoolVisibilityConverter}}" Grid.Column="1" Style="{StaticResource ImageButtonStyle2}" NormalSource="/AQUA.ClientServices.Presentation;Component/Documents/Styling/GUI_Components/Butt_Edit.png"/> </Grid> </DataTemplate> </Grids:TemplateColumn.ItemTemplate> <Grids:TemplateColumn.EditorTemplate> <DataTemplate> <Grid> <Grid.Resources> <BooleanToVisibilityConverter x:Key="BoolVisibilityConverter"/> <FilterSet:EmptyConverter x:Key="ValueConverter"/> </Grid.Resources> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="20"/> </Grid.ColumnDefinitions> <TextBox Text="{Binding Name, Converter={StaticResource ValueConverter}, Mode=TwoWay}" Grid.Column="0" VerticalAlignment="Center" VerticalContentAlignment="Center" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch"/> <Buttons:ImageButton Command="{Binding ParameterSettingsCommand}" Visibility="{Binding HasSettings, Converter={StaticResource BoolVisibilityConverter}}" Grid.Column="1" Style="{StaticResource ImageButtonStyle2}" NormalSource="/AQUA.ClientServices.Presentation;Component/Documents/Styling/GUI_Components/Butt_Edit.png"/> </Grid> </DataTemplate> </Grids:TemplateColumn.EditorTemplate>
The problem is that when the cell in regular mode (not edit mode) , the TextBlock and Button doesn't fill all the cell. but when the cell is in edit , they fill the entire cell. What do i need to do in order the Cell Content to fill the entire cell?
Hello Michael,
I have logged this with development under ID: 124706 and I have also created a support ticket on your behalf: CAS-102645-Z0V2Q0 and have linked the development issue to it, so that you can get automatically updated, when a Service Release containing the fix is available for download. You can get the new version from our website’s “My IG”, “My Keys & Downloads” tags: https://ko.infragistics.com/Membership/Default.aspx?panel=Downloads#Downloads
You can also monitor the support ticket’s progress through the “My Support Activity” tag: https://ko.infragistics.com/Membership/MySupport.aspx
I solved this.
Just had to define :
HorizontalContentAlignment="Stretch" AddNewRowItemTemplateHorizontalContentAlignment="Stretch" AddNewRowEditorTemplateHorizontalContentAlignment="Stretch"
on the TemplatedColumn