add images to list box at the runtime

Hi.
I have a problem that I couldn't resolve last few hours. Maybe you can help me/
My application generate a few images files, but only one of them will be showing in the big image control , all others have to be showing as a small images on the side of the big one. Not exactly on the side but separately. If user click on the of the  small images then this image take a place of the big one , the one was a big from the beginning will be showing as a small .
LVL 1
mastiSoftAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chinmay PatelChief Technical NinjaCommented:
Hi mastiSoft,

 A couple of years back I developed a software for a certain organization in Europe. There requirement was huge but I will highlight some of the stuff they wanted me to do.

On a left panel, PDFs pages are displayed in a vertical scrolling pane and on right hand side we had a content control when user clicks on the left panel pdf page, it will be shown in the right hand side panel.

Are you trying to achieve something like this?


Regards,
Chinmay.
0
mastiSoftAuthor Commented:
I accepted your suggestion last time and develop my software in SDI not MDI as the previews version of this software. To be able open a few files in the SDI application I see the only one way . Open them all (the software create bitmap of the file) and show only one as the main image (big one with all scales and cursors) others like the pdf pages you told about will be on the left (or right) panel . So the idea is the same.
0
Chinmay PatelChief Technical NinjaCommented:
Here is a rough solution, it can be improved 100 times. Let's go step by step.

WPF
<Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"></RowDefinition>
                        <RowDefinition Height="30"></RowDefinition>
                        <RowDefinition Height="*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="150"></ColumnDefinition>
                        <ColumnDefinition Width="*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <ListView x:Name="ImageList" Grid.Column="0" Grid.Row="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="AliceBlue" Margin="-30,0,0,0" SelectionChanged="ImageList_SelectionChanged">
                        <ListView.ItemTemplate>
                            <DataTemplate>
                                <Image Source="{Binding}" Height="100" Width="250"/>
                            </DataTemplate>
                        </ListView.ItemTemplate>

                    </ListView>
                    <Image x:Name="TargetImage" Grid.Column="1" Grid.Row="2" Source="Assets/SplashScreen.png"/>
                </Grid>

Open in new window



Code Behind
using System.Windows.Media.Imaging;

Open in new window


   private void ImageList_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
        {
            this.TargetImage.Source = new BitmapImage(new Uri(this.ImageList.SelectedItem.ToString(), UriKind.Relative));
        }

Open in new window


Result looks like this
Result looks like this
Regards,
Chinmay.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mastiSoftAuthor Commented:
thank you very much )
0
Chinmay PatelChief Technical NinjaCommented:
Any time. 🙂
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
WPF

From novice to tech pro — start learning today.