Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8762343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:30:20+00:00 2026-06-13T15:30:20+00:00

I defined some UserControl for ListBox <Grid x:Name=ContentPanel Grid.Row=1 Margin=12,0,12,0> <ListBox Height=Auto HorizontalAlignment=Stretch Name=deliveriesListBox

  • 0

I defined some UserControl for ListBox

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <ListBox Height="Auto" HorizontalAlignment="Stretch" Name="deliveriesListBox" VerticalAlignment="Stretch" Width="Auto" DataContext="{Binding}" SelectionChanged="deliveriesListBox_SelectionChanged">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Grid x:Name="LayoutRoot" xmlns:src="clr-namespace:App"  Margin="0,5">
                            <src:DItem />
                        </Grid>
                    </DataTemplate>    
                </ListBox.ItemTemplate>                    
            </ListBox>
        </Grid>

UserControl is

<UserControl x:Class="App.DItem"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480">

    <Grid x:Name="LayoutRoot" Margin="0,5">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>

        <TextBlock Grid.Row="0" Grid.Column="0" FontSize="42" HorizontalAlignment="Left"  Text="Hello" VerticalAlignment="Stretch" Margin="0" />
        <TextBlock Grid.Row="1" Grid.Column="1" FontSize="20" HorizontalAlignment="Right" TextAlignment="Right" Margin="0">
                                        <Run Text="OK" />

        </TextBlock>
        <TextBlock Grid.Row="1" Grid.Column="0" FontSize="20" Text="this is working only here.." HorizontalAlignment="Left"  />
    </Grid>
</UserControl>

“WYSIWYG” editor in VS2010 or Expression Blend 4 shows me space between “this is working only here” and “OK”. Picture here – http://xrep.eu/pic.jpg

and thats what i want but.. In emulator and the phone looks like http://xrep.eu/emu.jpg

so, between “this is working only here” and “OK”, there is no space.
Can somebody help and tell me how to define, the “OK” string will be at most in right side?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T15:30:22+00:00Added an answer on June 13, 2026 at 3:30 pm

    try this one

     <Grid x:Name="LayoutRoot" Grid.Row="1" Margin="0,5">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
    
            <TextBlock Grid.Row="0" FontSize="42" HorizontalAlignment="Left"  Text="Hello" VerticalAlignment="Stretch" Margin="0" />
    
            <DockPanel Grid.Row="1">
            <TextBlock  FontSize="20" HorizontalAlignment="Right" TextAlignment="Right" Margin="0" DockPanel.Dock="Right">
                                        <Run Text="OK" />
    
            </TextBlock>
            <TextBlock Grid.Row="1" Grid.Column="0" FontSize="20" Text="this is working only here.." HorizontalAlignment="Left"  />
            </DockPanel>
        </Grid>
    

    Cheers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a user control defined as follows: <UserControl ... ...... x:name=StartPage> <ToggleButton x:Name=FullScreenToggle
I have some command binding defined in my XAML: <UserControl.CommandBindings> <CommandBinding Command=commands:Commands.GrantAccessCommand Executed=HelpExecuted />
I have defined some Error Messages and my Question is, how to access them
In express, I have defined some routes app.post(/api/v1/client, Client.create); app.get(/api/v1/client, Client.get); ... I have
On my JSP page, I defined some javascript with a variable that get value
I have a problem with Focusable Buttons on Eclipse Rap. I have defined some
Often i like default android style defined for some widget. Often i like to
I have some CCS defined as following: .FW_Buttons { -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius:
Consider one has some user defined types, and containers of those types that are
I'm working on an application that contains some buttons defined via layout.xml like this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.