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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:38:24+00:00 2026-05-16T21:38:24+00:00

Why does this throw an error and how can I fix… I need to

  • 0

Why does this throw an error and how can I fix… I need to set the clipping rect to be dynamic.

    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="42"/>
        <ColumnDefinition x:Name="ListBoxContainer" Width="*"/>
        <ColumnDefinition Width="42"/>
    </Grid.ColumnDefinitions>


    <Canvas>
        <Button x:Name="btnGalleryLeft" 
                Click="btnGalleryLeftClick" 
                Style="{StaticResource GalleryNavigationLeft}"
                Canvas.Left="7"
                Canvas.Top="50" />
    </Canvas>
    <Canvas Grid.Column="1" x:Name="ListboxWrapper">
        <Canvas.Clip>
            <RectangleGeometry>
                <RectangleGeometry.Rect>
                    <Rect X="0" Y="0" 
                          Width="{Binding ElementName=ListBoxContainer, Path=Width}"
                          Height="{Binding ElementName=ListBoxContainer, Path=Height}"/>
                </RectangleGeometry.Rect>
            </RectangleGeometry>
        </Canvas.Clip>
        <ListBox x:Name="ListBox1" 
                 Margin="15, 18, 15, 0"  
                 Style="{StaticResource GalleryListBoxStyle}" 
                 ItemsSource="{Binding DocItemCollection}" 
                 SelectionChanged="ListBox_SelectionChanged" 
                 MouseLeftButtonUp="ListBox_MouseLeftButtonUp" 
                 Canvas.Top="0"
                 Canvas.Left="0"
               />
    </Canvas>
    <Canvas Grid.Column="2">
        <Button x:Name="btnGalleryRight"                     
                Click="btnGalleryRightClick" 
                Style="{StaticResource GalleryNavigationRight}"
                Margin="0, 0, 7, 0"
                Canvas.Top="50" />         
  • 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-16T21:38:25+00:00Added an answer on May 16, 2026 at 9:38 pm

    Solution finally…. after much cursin and swearing. If only everything was as stright fwd as in CSS (overflow bloody hidden property).

    Front-end:

    <Canvas Grid.Column="1" x:Name="ListboxWrapper" Background="Black">
                <ScrollViewer Background="Red" 
                              FlowDirection="LeftToRight" 
                              HorizontalScrollBarVisibility="Hidden" 
                              VerticalScrollBarVisibility="Hidden"
                              x:Name="ScrollViewerClipper">                
                    <Canvas x:Name="CarouselContainer">
                        <gallery:ImageCarousel x:Name="carousel" />
                    </Canvas>
                </ScrollViewer>
    

    Back-end:

    public GalleryPanel()
            {
                InitializeComponent();
    
                LayoutRoot.SizeChanged +=new SizeChangedEventHandler(LayoutRoot_SizeChanged);
            }
    
            private void LayoutRoot_SizeChanged(object s, SizeChangedEventArgs e)
            {
                ScrollViewerClipper.Width = ListboxWrapper.ActualWidth;
                ScrollViewerClipper.Height = ListboxWrapper.ActualHeight;
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This code does not throw an error but the query fails, that is, the
Why does this code throw an Invalid Operation Exception? private SqlCommand cmd; // initialized
* Simple question : Why does this function throw an exception when evaluated ?
I'm using Selenium 2.20 . Why does WebDriver InternetExplorerDriver throw this warning when launching
Why does Convert.ToBoolean(1) throw a System.FormatException ? How should I proceed with this conversion?
Does this mean I can't update another table from a trigger if I'm using
Please can you help -- why does this JSON not work the head of
I keep getting thrown an error: This widget's parent does not implement HasWidgets. Of
Does this code always evaluate to false? Both variables are two's complement signed ints.
Does this function has the same behavior that memset ? inline void SetZeroArray( void

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.