OK, I give up: what do I have to change to this StackPanel below so that it puts the:
alt text http://tanguay.info/web/external/stackPanelLeftRight.png
<UserControl x:Class="TestData333.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="400" Height="300">
<Grid x:Name="LayoutRoot" Background="White">
<Border CornerRadius="10" Background="Yellow" Padding="20">
<StackPanel VerticalAlignment="Top" HorizontalAlignment="Left">
<ScrollViewer Background="Beige"
Height="230"
Width="360">
<StackPanel>
<TextBlock x:Name="TheContent"
Foreground="Navy"
FontSize="14"
TextWrapping="Wrap"/>
</StackPanel>
</ScrollViewer>
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="ProgressIndicator" Text="Ready..."
HorizontalAlignment="Left"/>
<Button Content="Load Data"
Width="100"
HorizontalAlignment="Right"
Click="Button_Load"
Margin="0 5 0 0"/>
</StackPanel>
</StackPanel>
</Border>
</Grid>
</UserControl>
Downloaded Silverlight 3 toolkit which has DockPanel, installed, referenced System.Windows.Controls, then following XAML:
<UserControl x:Class="TestData333.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
Width="400" Height="300">
<Grid x:Name="LayoutRoot" Background="White">
<Border CornerRadius="10" Background="Yellow" Padding="20">
<StackPanel VerticalAlignment="Top" HorizontalAlignment="Left">
<ScrollViewer Background="Beige"
Height="230"
Width="360">
<StackPanel>
<TextBlock x:Name="TheContent"
Foreground="Navy"
FontSize="14"
TextWrapping="Wrap"/>
</StackPanel>
</ScrollViewer>
<toolkit:DockPanel Margin="0 5 0 0">
<TextBlock toolkit:DockPanel.Dock="Left" x:Name="ProgressIndicator" Text="Ready..."
FontSize="12"
HorizontalAlignment="Left"/>
<Button toolkit:DockPanel.Dock="Right" Content="Load Data"
Width="100"
HorizontalAlignment="Right"
Click="Button_Load"/>
</toolkit:DockPanel>
</StackPanel>
</Border>
</Grid>
</UserControl>
alt text http://tanguay.info/web/external/silverlightDockPanel.png
you could use dockpanel from toolkit or use grid with 2 columns. and have the content of the second column right aligned
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With