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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:21:19+00:00 2026-06-16T21:21:19+00:00

Acutally i’m doing a WPF application where user can select Image from a panel.

  • 0

Acutally i’m doing a WPF application where user can select Image from a panel. There are two Button inside the panel (right arrow and left arrow). I’m not sure what is the name of the panel but i attach an image in my question. So, i want to ask how do i create the panel? Using a canvas and put the image inside the canvas? hm… and the buttons, I totally don’t have any ideal how to do it.

p/s: i’m wpf newbie

Image:

enter image description here

  • 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-16T21:21:20+00:00Added an answer on June 16, 2026 at 9:21 pm

    Here is one way to do it, using the standard ListBox control:

    First, we need a pair of Previous/Next buttons and a ListBox. We make the ListBox lay out its items horizontally by changing its ItemsPanel:

    <DockPanel Width="200" >
        <Button x:Name="_prev" Content="&lt;&lt;" />
        <Button x:Name="_next" Content="&gt;&gt;" DockPanel.Dock="Right" />
    
        <ListBox x:Name="_myList" Loaded="OnMyListLoaded" >
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <VirtualizingStackPanel Orientation="Horizontal" />
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
    
            <TextBlock Text="Image1  " />
            <TextBlock Text="Image2  " />
            <TextBlock Text="Image3  " />
            <TextBlock Text="Image4  " />
            <TextBlock Text="Image5  " />
            <TextBlock Text="Image6  " />
            <TextBlock Text="Image7  " />
        </ListBox>
    </DockPanel>
    

    In the ListBox’ Loaded event, we use VisualTreeHelper to search through its Template and find its built-in ScrollViewer. Once we find it, we hook it up to the two buttons we created:

    private void OnMyListLoaded(object sender, RoutedEventArgs e)
    {
        var scroller = VisualTreeHelper.GetChild(VisualTreeHelper.GetChild(_myList, 0), 0) as ScrollViewer;
        if (scroller != null)
        {
            _prev.Command = ScrollBar.LineLeftCommand;
            _prev.CommandTarget = scroller;
    
            _next.Command = ScrollBar.LineRightCommand;
            _next.CommandTarget = scroller;
    
            scroller.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

actually i am displaying a pop up with ok cancel button when user clicks
In .Net is there a class in .Net where you can get the DB
I have a question. Is there a way that I can show an animated
SELECT updateDate, id,cSsn,cLname,cFname,cDOB,cDOD,cCity,cState,cHospital,cCurstatus,cMmrcashworker,cTelephone FROM med_patient WHERE cCurstatus!='completed' AND cMmrcashworker = '2' AND cHospital =
We have an application containing a lot of user controls that update frequently based
I need an ANTI-JOIN (not exists SELECT something from table.../ left join table WHERE
Assume following scenario: There is a WPF window, within a MVVM implementation. Having following
My CSS file is acutally a PHP file which is served with content-type text/css
Actually I am developing one application in that when application run first time it
Actually I wish to do the Image Crop or Resize, etc with my picture

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.