Hallo liebe Vb-Paradise Community,
ich habe ein kleines Problem und zwar will der ComboBox Item Inhalt das Grid nicht annehmen.
Was zur falschen positionierung der Textkörper führt.
Hier mein Code:
Vielleicht habt ihr eine Lösung für mein Problem??
Ich wäre echt sehr Dankbar.
Beste Grüße,
Fabien
ich habe ein kleines Problem und zwar will der ComboBox Item Inhalt das Grid nicht annehmen.
Was zur falschen positionierung der Textkörper führt.
Hier mein Code:
XML-Quellcode
- <ComboBox x:Name="History" Style="{DynamicResource CustomComboBox}" IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding Path=ProgressHistoryItems, Mode=TwoWay}" SelectedIndex="{Binding Path=SelectedItemIndex, Mode=TwoWay}" Grid.Column="2" Grid.Row="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="80*"/>
- <ColumnDefinition Width="20*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Column="0" Text="{Binding Path=Name}" VerticalAlignment="Stretch" HorizontalAlignment="Left" Width="Auto"/>
- <TextBlock Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Center" Width="Auto">
- <TextBlock.Text>
- <MultiBinding StringFormat="{}{0}:{1:D2}">
- <Binding Path="ElapsedTime.Minutes" />
- <Binding Path="ElapsedTime.Seconds" />
- </MultiBinding>
- </TextBlock.Text>
- </TextBlock>
- </Grid>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
Vielleicht habt ihr eine Lösung für mein Problem??
Ich wäre echt sehr Dankbar.
Beste Grüße,
Fabien