GridViewColumn Alignment?

eXistenC

Mitglied
Hi,

kann mir hier wer sagen warum die links-ausrichtung nicht geht:
Code:
<ListView Grid.Row="1" Grid.Column="0" Name="LvwToDoItemsCollections" ItemsSource="{Binding ToDoItemsCollection}">
            <ListView.View>
                <GridView>
                    <GridViewColumn TextBlock.TextAlignment="Left" Width="50" Header="Ident" DisplayMemberBinding="{Binding Ident}"  />
                    <GridViewColumn TextBlock.TextAlignment="Left" Width="75" Header="Name" DisplayMemberBinding="{Binding Creator}" />
                    <GridViewColumn TextBlock.TextAlignment="Left" Width="100" Header="Betreff" DisplayMemberBinding="{Binding Publisher}" />
                </GridView>
            </ListView.View>
        </ListView>

Oder Besser noch wie macht man das ListView im CodeBehind, die Formatierung aber im XAML?

LG eXi
 
Code:
<ListView Grid.Row="1" Grid.Column="0" Name="LvwToDoItemsCollections" ItemsSource="{Binding ToDoItemsCollection}">
            <ListView.View>
                <GridView>

                    <GridView.ColumnHeaderContainerStyle>
                        <Style TargetType="{x:Type GridViewColumnHeader}">
                            <Setter Property="HorizontalContentAlignment" Value="Left" />
                        </Style>
                    </GridView.ColumnHeaderContainerStyle>

                    <GridViewColumn TextBlock.TextAlignment="Left" Width="50" Header="Ident" DisplayMemberBinding="{Binding Ident}"  />
                    <GridViewColumn TextBlock.TextAlignment="Left" Width="75" Header="Name" DisplayMemberBinding="{Binding Creator}" />
                    <GridViewColumn TextBlock.TextAlignment="Left" Width="100" Header="Betreff" DisplayMemberBinding="{Binding Publisher}" />
                </GridView>
            </ListView.View>
        </ListView>


lg
 
Zuletzt bearbeitet:
Code:
<ListView Grid.Row="1" Grid.Column="0" Name="LvwToDoItemsCollections" ItemsSource="{Binding ToDoItemsCollection}">
            <ListView.View>
                <GridView>

                    <GridView.ColumnHeaderContainerStyle>
                        <Style TargetType="{x:Type GridViewColumnHeader}">
                            <Setter Property="HorizontalContentAlignment" Value="Left" />
                        </Style>
                    </GridView.ColumnHeaderContainerStyle>

                    <GridViewColumn TextBlock.TextAlignment="Left" Width="50" Header="Ident" DisplayMemberBinding="{Binding Ident}"  />
                    <GridViewColumn TextBlock.TextAlignment="Left" Width="75" Header="Name" DisplayMemberBinding="{Binding Creator}" />
                    <GridViewColumn TextBlock.TextAlignment="Left" Width="100" Header="Betreff" DisplayMemberBinding="{Binding Publisher}" />
                </GridView>
            </ListView.View>
        </ListView>


lg

Hi j3r0d,

das ist genial, da wär ich so schnell ned drauf gekommen. Danke Dir
 

Neue Beiträge

Zurück