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 3281036
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:46:17+00:00 2026-05-17T19:46:17+00:00

I need to place objects 40% 40% 20% and that there were no scroll

  • 0

I need to place objects 40% 40% 20% and that there were no scroll

 <Grid Grid.Row="1">
 <Grid.RowDefinitions>
  <RowDefinition Height="40*"  />
  <RowDefinition Height="40*"  />
  <RowDefinition Height="20*"/>
 </Grid.RowDefinitions>
 <Grid.ColumnDefinitions>
  <ColumnDefinition/>
  <ColumnDefinition/>
  <ColumnDefinition/>
  <ColumnDefinition/>
 </Grid.ColumnDefinitions>
 <DockPanel x:Name="stack_d"  Grid.Row="0" Grid.ColumnSpan="4"  VerticalAlignment="Stretch"  >
  <l:CategoryView HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
 </DockPanel>
 <DockPanel x:Name="stack_trainer" Grid.Row="1" Grid.ColumnSpan="4"   DockPanel.Dock="Bottom" >
  <loc:TrainerView />
 </DockPanel>

 <Button Content="Почта" x:Name="mails" Grid.Row="2" Grid.Column="0"  Width="100" HorizontalAlignment="Center" VerticalAlignment="Stretch"  Click="mails_Click"/>
 <Button Content="Оплатить" Width="100" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Stretch"  Click="Button_Click_Payment"/>
 <Button Content="Тех помощь" Width="100" Grid.Row="2" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Stretch"  x:Name="support" Click="support_Click"/>
 <Button Content="Настройки" x:Name="settings" Grid.Row="2" Grid.Column="3"   Width="100" HorizontalAlignment="Center" VerticalAlignment="Stretch" Click="settings_Click"/>
</Grid>

but i have problem. see images

alt text

alt text

UserControl Top:

<ScrollViewer VerticalScrollBarVisibility="Auto" >
    <Border>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <TextBlock Text="Категории" Grid.Row="0" HorizontalAlignment="Center" Style="{StaticResource TextBlockTitle}"/>
            <ListBox Grid.Row="1" x:Name="list_category"  ItemsSource="{Binding Tables[0]}">
                <ListBox.Resources>
                    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"/>
                    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black"/>
                    <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="#00FFFFFF"/>
                </ListBox.Resources>
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <GroupBox Header="Категория" Width="300" HorizontalAlignment="Stretch" x:Name="GroupBox">
                            <DockPanel Tag="{Binding id}">
                                <Button Click="Button_Click" DockPanel.Dock="Top" >
                                    <Button.Content>
                                        <DockPanel>
                                            <TextBlock Text="{Binding title}" TextWrapping="Wrap" DockPanel.Dock="Top" Padding="5"  HorizontalAlignment="Center"  Foreground="#FFB51414" />
                                            <l:ScrollViewerEx  VerticalScrollBarVisibility="Auto" >
                                                <TextBlock Text="{Binding description}" DockPanel.Dock="Top" TextWrapping="Wrap" Padding="5" IsHitTestVisible="False" />
                                            </l:ScrollViewerEx>
                                        </DockPanel>
                                    </Button.Content>
                                </Button>
                            </DockPanel>
                        </GroupBox>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
    </Border>
</ScrollViewer>

next UserControl

<ScrollViewer VerticalScrollBarVisibility="Auto" Background="Transparent">
 <Border Background="Transparent">
  <Grid>
   <Grid.RowDefinitions>
    <RowDefinition Height="Auto" />
    <RowDefinition Height="Auto" />
    <RowDefinition />
   </Grid.RowDefinitions>
   <TextBlock Text="Сопровождающие" Grid.Row="1" HorizontalAlignment="Center" Style="{StaticResource TextBlockTitle}"/>
   <ListBox Grid.Row="2" x:Name="list_category" Background="Transparent"  ItemsSource="{Binding Tables[0]}"  VerticalContentAlignment="Stretch"  >
    <ListBox.Resources>
     <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"/>
     <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black"/>
     <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="#00FFFFFF"/>
    </ListBox.Resources>
    <ListBox.ItemTemplate>
     <DataTemplate>
      <GroupBox Header="Сопровождающие" Width="300"  VerticalAlignment="Stretch" VerticalContentAlignment="Stretch"  HorizontalAlignment="Stretch" x:Name="GroupBox" Background="Transparent">
       <DockPanel Tag="{Binding id_Person}"  VerticalAlignment="Stretch" Background="Transparent">
        <Button Click="Button_Click" DockPanel.Dock="Top">
         <Button.Content>
          <DockPanel VerticalAlignment="Stretch">
           <StackPanel DockPanel.Dock="Top" Orientation="Horizontal" HorizontalAlignment="Center">
            <TextBlock Text="{Binding surname}" Padding="5"  HorizontalAlignment="Center"  Foreground="#FFB51414" />
            <TextBlock Text="{Binding name}" Padding="5"  HorizontalAlignment="Center"  Foreground="#FFB51414" />
            <TextBlock Text="{Binding lastname}" Padding="5"  HorizontalAlignment="Center"  Foreground="#FFB51414" />
           </StackPanel>
           <Grid DockPanel.Dock="Bottom">
            <Grid.RowDefinitions>
             <RowDefinition />
             <RowDefinition />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
             <ColumnDefinition />
             <ColumnDefinition />
             <ColumnDefinition />
             <ColumnDefinition />
             <ColumnDefinition />
            </Grid.ColumnDefinitions>

            <TextBlock Text="{Binding quarter}" x:Name="quarter" Padding="5" Grid.Column="2"  Grid.Row="1" HorizontalAlignment="Center"  Foreground="#FFB51414" />
            <TextBlock Text="{Binding halfyear}" x:Name="halfyear" Padding="5" Grid.Column="3" Grid.Row="1"  HorizontalAlignment="Center"  Foreground="#FFB51414" />
            <TextBlock Text="{Binding year}" x:Name="year" Padding="5" Grid.Column="4"  Grid.Row="1" HorizontalAlignment="Center"  Foreground="#FFB51414" />

            <TextBlock Text="Период: " Padding="5" Grid.Column="1"    HorizontalAlignment="Center"  Foreground="#FFB51414" />

            <TextBlock Text="Квартал" Padding="5" Grid.Column="2"   HorizontalAlignment="Center"  Foreground="#FFB51414" />
            <TextBlock Text="Полгода" Padding="5" Grid.Column="3"   HorizontalAlignment="Center"  Foreground="#FFB51414" />
            <TextBlock Text="Год" Padding="5" Grid.Column="4"  HorizontalAlignment="Center"  Foreground="#FFB51414" />
            <TextBlock Text="Цена: " Padding="5" Grid.Row="1"  Grid.Column="1"  HorizontalAlignment="Center"  Foreground="#FFB51414" />
           </Grid>
           <Grid DockPanel.Dock="Top"  >
            <Image Source="{Binding photo}"/>
           </Grid>
          </DockPanel>
         </Button.Content>
        </Button>
        <Button DockPanel.Dock="Bottom" x:Name="send_mess" Tag="{Binding id_Person}" Click="send_mess_Click" Content="Написать сопровождающему"/>
        <DockPanel DockPanel.Dock="Bottom" HorizontalAlignment="Center" Tag="{Binding id_Person}" >
         <ComboBox VerticalAlignment="Top" x:Name="combobox_term">
          <ComboBoxItem Content="Квартал" Tag="1"/>
          <ComboBoxItem Content="Полгода" Tag="2"/>
          <ComboBoxItem Content="Год" Tag="3" IsSelected="True"/>
         </ComboBox>
         <CheckBox Checked="CheckBox_Checked" Unchecked="CheckBox_Unchecked" IsChecked="{Binding id_Person, Converter={StaticResource CheckBoxToCheked}}" Content="Выбрать" />
        </DockPanel>

       </DockPanel>
      </GroupBox>
     </DataTemplate>
    </ListBox.ItemTemplate>
   </ListBox>
  </Grid>
 </Border>
</ScrollViewer>

this is all happening because of the pictures, how to fight it?

listbox and groupbox – I have their styles if they are needed I can provide them

EDIT:

parent Grid

<ScrollViewer VerticalScrollBarVisibility="Auto" >
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid Grid.Row="0" x:Name="gridrtfbox" Visibility="Collapsed">
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                </Grid>
                <Grid Grid.Row="1">...
  • 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-05-17T19:46:17+00:00Added an answer on May 17, 2026 at 7:46 pm

    I use convert

    <GroupBox Header="Сопровождающие" Width="300" HorizontalAlignment="Stretch" x:Name="GroupBox" Background="Transparent" Height="{Binding ElementName=list_category, Converter={StaticResource ConSetHeigthKey}}">
    

    converter:

    public class ConSetHeigthTrainer : IValueConverter
            {
                public object Convert(object value, Type targetType, object parameter,
                                      CultureInfo culture)
                {
                    try
                    {
                        return (value as System.Windows.Controls.ListBox).ActualHeight-20;
                    }
                    catch (Exception Exception) { return (value as System.Windows.Controls.ListBox).ActualHeight - 20; }
                }
    
                public object ConvertBack(object value, Type targetType, object parameter,
                                          CultureInfo culture)
                {
                    throw new NotImplementedException();
                }
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As a programmer I need a place to store my stuff. I've been running
For an embedded system I need to place a few data structures at fixed
I have a few models that need to have custom find conditions placed on
Need a function that takes a character as a parameter and returns true if
Need to an expression that returns only things with an I followed by either
I need to compare two lists where each list contains about 60,000 objects. what
I need to round decimal numbers to six places using JavaScript, but I need
I continuously find places where I need to use the <br /> tag because
I have a few places in the code where I need to use the
Need a way to allow sorting except for last item with in a list.

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.