locked
Trennlinie zwischen mehrere TextBlocks RRS feed

  • Frage

  • Hallo,

    wollte fragen, wie ich im unteren Code einen Trennlinie zwischen die TextBlocks bekommen kann?

    <StackPanel Grid.Column="1" Orientation="Horizontal">
    	<TextBlock Width="48" Text="{Binding Owner.Tag.Spalte_1, Mode=TwoWay}" />
            <TextBlock Width="48" Text="{Binding Owner.Tag.Spalte_2, Mode=TwoWay}" />
            <TextBlock Width="48" Text="{Binding Owner.Tag.Spalte_3, Mode=TwoWay}" />
            <TextBlock Width="48" Text="{Binding Owner.Tag.Spalte_4, Mode=TwoWay}" />
            <TextBlock Width="48" Text="{Binding Owner.Tag.Spalte_5, Mode=TwoWay}" />
    </StackPanel>



    Gruesse, NUNUI

    Donnerstag, 6. Februar 2014 17:37

Antworten

  • Hallo,
    das Einfachste wäre es, wenn du ein Rectangle/Border dazwischen setzt:
    <StackPanel Grid.Column="1" Orientation="Horizontal">
        <TextBlock Width="48" Text="Test" />
        <Rectangle Width="1" Margin="0,0,4,0" Fill="Gray"/>
        <TextBlock Width="48" Text="Test" />
        <Rectangle Width="1" Margin="0,0,4,0" Fill="Gray"/>
        <TextBlock Width="48" Text="Test" />
        <Rectangle Width="1" Margin="0,0,4,0" Fill="Gray"/>
        <TextBlock Width="48" Text="Test" />
    </StackPanel>
    Das Design kannst du dabei frei anpassen.

    Koopakiller [kuːpakɪllɐ] (Tom Lambert)
    Webseite | Code Beispiele | Facebook | Twitter | Snippets   C# ↔ VB.NET Konverter
    Markiert bitte beantwortende Posts als Antwort und bewertet Beiträge. Danke.

    • Als Antwort markiert Nunui Donnerstag, 6. Februar 2014 17:45
    Donnerstag, 6. Februar 2014 17:43

Alle Antworten

  • Hallo,
    das Einfachste wäre es, wenn du ein Rectangle/Border dazwischen setzt:
    <StackPanel Grid.Column="1" Orientation="Horizontal">
        <TextBlock Width="48" Text="Test" />
        <Rectangle Width="1" Margin="0,0,4,0" Fill="Gray"/>
        <TextBlock Width="48" Text="Test" />
        <Rectangle Width="1" Margin="0,0,4,0" Fill="Gray"/>
        <TextBlock Width="48" Text="Test" />
        <Rectangle Width="1" Margin="0,0,4,0" Fill="Gray"/>
        <TextBlock Width="48" Text="Test" />
    </StackPanel>
    Das Design kannst du dabei frei anpassen.

    Koopakiller [kuːpakɪllɐ] (Tom Lambert)
    Webseite | Code Beispiele | Facebook | Twitter | Snippets   C# ↔ VB.NET Konverter
    Markiert bitte beantwortende Posts als Antwort und bewertet Beiträge. Danke.

    • Als Antwort markiert Nunui Donnerstag, 6. Februar 2014 17:45
    Donnerstag, 6. Februar 2014 17:43
  • Super, DANKE!!!

    Gruesse, NUNUI

    Donnerstag, 6. Februar 2014 17:45
  • Eine Frage habe ich noch.

    Ich habe folgende Farbe ctrls:DynamicResource.BackgroundKey="RulerLine" und wollte fragen, ob ich irgendwie diese Farbe als Fill-Wert eingeben kann?


    Gruesse, NUNUI

    Donnerstag, 6. Februar 2014 18:36