![]() |
|
Post Reply ![]() |
Author | |
arezoosaboori ![]() Newbie ![]() Joined: 27 December 2008 Location: United States Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() Posted: 27 December 2008 at 4:32am |
Hi,
I use this code to add items to a list box: ListBoxMarkup.AddItem "<Border BorderThickness='2' BorderBrush='DodgerBlue' Margin='0, 2, 0, 2' Padding='3'><StackPanel Orientation='Horizontal'>" & _ "<Image Source='100'/>" & _ "<Grid><Grid.ColumnDefinitions><ColumnDefinition Width='Auto'/><ColumnDefinition Width='*'/></Grid.ColumnDefinitions>" & _ "<Grid.RowDefinitions><RowDefinition/><RowDefinition/></Grid.RowDefinitions>" & _ "<TextBlock TextAlignment='Right' FontWeight='Bold' Foreground='Navy' Text='IP:'/>" & _ "<TextBlock TextAlignment='Right' Grid.Row='1' FontWeight='Bold' Foreground='Navy' Text='Country:'/>" & _ "<TextBlock Margin='6, 0, 0, 0' Grid.Column='1' Text='" & MyResult(0) & "'/>" & _ "<TextBlock Margin='6, 0, 0, 0' Grid.Column='1' Grid.Row='1' Text='" & "Loopback" & "'/>" & _ "</Grid></StackPanel></Border>" And result is like this: There are 4 items added to the list box, I just want the 2 inner items with flags to be changed : I want flags in the right . Is that possible to only move icons/flags to the right? Thank you for your help :) |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
So just change order of Image and Grid.
Move
"<Image Source='100'/>"
after
</Grid>
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
arezoosaboori ![]() Newbie ![]() Joined: 27 December 2008 Location: United States Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() |
Hello and thank you very much for your tip
![]() That works but still items are sticky and not having a good view! So can I send icons to the right corner? Where marked in this picture? Thank you a lot ![]() |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Try this
ListBoxMarkup.AddItem "<Border BorderThickness='2' BorderBrush='DodgerBlue' Margin='0, 2, 0, 2' Padding='3'><Grid>" & _
"<Grid><Grid.ColumnDefinitions><ColumnDefinition Width='Auto'/><ColumnDefinition Width='*'/></Grid.ColumnDefinitions>" & _ "<Grid.RowDefinitions><RowDefinition/><RowDefinition/></Grid.RowDefinitions>" & _ "<TextBlock TextAlignment='Right' FontWeight='Bold' Foreground='Navy' Text='IP:'/>" & _ "<TextBlock TextAlignment='Right' Grid.Row='1' FontWeight='Bold' Foreground='Navy' Text='Country:'/>" & _ "<TextBlock Margin='6, 0, 0, 0' Grid.Column='1' Text='Hi'/>" & _ "<TextBlock Margin='6, 0, 0, 0' Grid.Column='1' Grid.Row='1' Text='" & "Loopback" & "'/>" & _ "</Grid>" & _ "<Image HorizontalAlignment='Right' Source='100'/>" & _ "</Grid></Border>" |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |