Quantcast
Viewing all articles
Browse latest Browse all 18858

Properties of a TextBlock not working when the Xaml is loaded in during runtime.

I need the textblock to have the TextAlignment as "Right".

Xaml:

<StackPanel
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"><TextBlock FontSize="50" Background="White"/><ListView  Grid.Row="2" BorderBrush="White"
Name="ListView1"
ItemsSource="{Binding Path=Line}"
                   HorizontalAlignment="Stretch"
FontSize="23"><ListView.ItemTemplate><DataTemplate><StackPanel><TextBlock TextAlignment="Right" Text= "{Binding Path = aline}"/></StackPanel> </DataTemplate></ListView.ItemTemplate></ListView ></StackPanel>
It seems like the xaml is being loaded in correctly, but the text inside the textblock is still aligned to the left.


Viewing all articles
Browse latest Browse all 18858

Trending Articles