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

  • SEARCH
  • Home
  • 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 3603556
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:53:12+00:00 2026-05-18T20:53:12+00:00

In a previous question I had asked, I wanted to be able to move

  • 0

In a previous question I had asked, I wanted to be able to move the gridsplitter to expand the expander which contains a list box of images so that when it expands, the images resize based on the amout of space available. With help i was able to get the resizing feature to work but the problem now is that when the program initially starts up, the images are full sized instead of thumbnail size. Is there a way to set an initial width of the expander so the images initially show up as thumbnails of about 175 pixels?

ColumnDefinitions:

<Grid.ColumnDefinitions>
    <ColumnDefinition MinWidth="25" Width="*" />
    <ColumnDefinition MinWidth="5" Width="5" />
    <ColumnDefinition Width="2*" />
    <ColumnDefinition MinWidth="5" Width="5" />
    <ColumnDefinition MinWidth="25" Width="*" />
</Grid.ColumnDefinitions>

0: Expander
1: gridsplitter
2: Text box
3: gridsplitter
4: Expander (Text box with images.)

XAML:

<GridSplitter 
    Name="gridSplitter2"
    Width="10" 
    Margin="0,0,0,0" 
    Grid.Column="3"
    IsEnabled="True" 
    HorizontalAlignment="Center"/>
    <Expander
        Style="{DynamicResource ExpanderStyle}"
        Name="pictureExpander"
        IsExpanded="True"
        Grid.Column="4"
        ExpandDirection="Left"
        Collapsed="pictureExpander_Collapsed"
        Expanded="pictureExpander_Expanded" >
        <ListBox 
            Name="photoList" 
            ItemsSource="{Binding Source={StaticResource PhotoBin}}"
            IsSynchronizedWithCurrentItem="True"
            ScrollViewer.CanContentScroll="False"
            ScrollViewer.HorizontalScrollBarVisibility="Disabled">
            <ListBox.ItemContainerStyle>
                <Style TargetType="{x:Type ListBoxItem}">
                    <Style.Resources>
                        <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Yellow" />
                    </Style.Resources>
                    <Style.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="BorderBrush" Value="Black"/>
                            <Setter Property="BorderThickness" Value="5"/>
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </ListBox.ItemContainerStyle>
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Image 
                        Name="thumbnailImage"
                        Source="{Binding FileLocation}"
                        Margin="5"
                        Stretch="UniformToFill"
                        StretchDirection="Both"
                        HorizontalAlignment="Stretch"
                        />
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Expander>
  • 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-18T20:53:13+00:00Added an answer on May 18, 2026 at 8:53 pm

    I think you can play around with your ColumnDefinitions. Setting a Width on your fifth ColumnDefinition will give you a starting Width for it

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition Width="175"/>
        </Grid.ColumnDefinitions>
        <!-- Your other Controls.. -->
        <GridSplitter Grid.Column="3" ... />
        <Expander Grid.Column="4" ... />
    </Grid>
    

    Update

    I’m unable to reproduce your problem. When I set Width=”175″ on the fifth ColumnDefinition it starts up with this width. Uploaded my sample app here: http://www.mediafire.com/?kjc9yqgmkq6dbiq

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

Sidebar

Related Questions

In my previous question on this portal, I had asked about some insight about
In a previous question I posted (which contains all the code) Unable to substantiate
I had asked in my previous question for a package that lets me draw
Here's a link to the previous question I had, which led me to this
In a previous question, I had asked Why can't I simply negate the source
In my previous question I had a problem with sending parameters over the command
This is a followup of a previous question I had. I got the very
I'm trying to implement this algorithm description from a previous question I had here
In previous question of mine, someone had meantioned that using Semaphores were expensive in
In a previous question on Stack Overflow , I had run into an issue

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.