scrollviewer

Canvas in ScrollViewer (Preview)MouseButtonDown event order

陌路散爱 提交于 2019-12-07 17:18:42
问题 If we have <ScrollViewer Name="scroll_viewer" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Canvas Name="canvas" Height="200" Width="200"> <Rectangle Fill="AliceBlue" Width="100" Height="100"/> </Canvas> </ScrollViewer> with handlers for: scroll_viewer.PreviewMouseLeftButtonDown scroll_viewer.MouseLeftButtonDown canvas.PreviewMouseLeftButtonDown Then if we click in the Rectangle we get scroll_viewer_PreviewMouseLeftButtonDown called first then canvas_PreviewMouseLeftButtonDown

Windows Phone 7 - ScrollViewer value changed

我怕爱的太早我们不能终老 提交于 2019-12-07 15:46:23
问题 I am searching all the time for solution and cant get correct one. I have grid that have width 960 and have ScrollViewer in it. Now i would like to know value (horizontal offset) of my scroll while scrolling. All solutions that i am finding is for wpf/silverlight and it wont works for me. Edit Ok, here is the example code, xaml: <ScrollViewer Name="Scroll" LayoutUpdated="ScrollViewer_LayoutUpdated" IsEnabled="True" Width="480" ScrollViewer.HorizontalScrollBarVisibility="Auto"> <Grid x:Name=

Mouse wheel not working when over ScrollViewer's child controls

送分小仙女□ 提交于 2019-12-06 23:49:32
问题 I was kind of expecting my ScrollViewer's child controls to hand the MouseWheel events back up the the ScrollViewer automatically, and that's not the case. I have a ScrollViewer with a ListBox in it. If I manually resize the width of the ListBox to be less than the ScrollViewer, the MouseWheel works on all of the ScrollViewer but has no effect when the mouse is positioned above the ListBox. What's the standard way to do this? Do I put an event trigger on the ListBox that fires the event on

Detect end of ScrollView programatically in Silverlight?

Deadly 提交于 2019-12-06 22:28:27
I am new to WPF and I am having some issues with this. I have a ScrollView and a RepeatButton. I want to disable the RepeatButton programatically when the ScrollView has moved all the way left or all the way right. Is there an easy way to do this in Silverlight? I found this page: http://msdn.microsoft.com/en-us/library/system.windows.controls.scrollviewer.scrollchanged.aspx and was thinking of adding an event listener for this, but I don't know if that is the best way to tackle the problem. Thanks guys! Please let me know if you need code samples or anything. Probably you want to look at the

Scrollviewer & SIP Issue (WP7.5 Mango)

吃可爱长大的小学妹 提交于 2019-12-06 19:54:53
问题 I am working on an application which includes a registration form. The form contains multiple text entry boxes, and so a ScrollViewer is used to allow them all to be displayed on one page. The following is a stripped down example of the XAML code I am using: <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28"> <TextBlock x

Silveright ScrollViewer with Image and ScaleTransform

北城余情 提交于 2019-12-06 14:51:35
I have the following xaml. <ScrollViewer HorizontalAlignment="Stretch" Margin="107,0,0,0" Name="scrollViewer1" VerticalAlignment="Stretch" HorizontalScrollBarVisibility="Visible"> <Image Name="image1" Stretch="None" MouseWheel="image1_MouseWheel" RenderTransformOrigin="0,0"> </Image> </ScrollViewer> An the following code behind. // initialise. private TransformGroup group = new TransformGroup(); private ScaleTransform st = new ScaleTransform(); group.Children.Add(st); image1.RenderTransform = group // mouse event. TransformGroup group = (TransformGroup)image1.RenderTransform; ScaleTransform

Changing the width of a vertical scrollbar

空扰寡人 提交于 2019-12-06 11:56:50
in my Silverlight 4 application, I have a ScrollViewer. I want to change the width of the vertical Scrollbar of the Scrollviewer, to make it a bit thinner. I have searched for a simple solution, but I do not need/want to restyle the whole Scrollbar. I was thinking about something like: MyScrollViewer.VerticalScrollbar.Width = 8; But there is no such Property. Any idea, how to make the scroll bar thinner? Thanks in advance, Frank There is no direct way of getting the vertical scrollbar of the scrollviewer. Below code will extract the vertical scroll bar from the visualtree and you can do the

Windows phone - Avoid scrolling of Web browser control placed inside scroll viewer

為{幸葍}努か 提交于 2019-12-06 06:53:38
I have to show a web browser inside a scroll viewer in windows phone application, with these requirements : Web browser height should be adjusted based on its content . Web browser scrolling should be disabled , ( when user scrolls within web browser, scrolling of scroll viewer should take place ) Web browser can do pinch-zoom and navigate to links inside its content. How can I implement that? Any links or samples is greatly appreciated. I'm using code like this. Attach events to the Border element in the Browser control tree (I'm using Linq to Visual Tree - http://www.scottlogic.co.uk/blog

Windows Phone 7 - ScrollViewer value changed

筅森魡賤 提交于 2019-12-06 03:40:42
I am searching all the time for solution and cant get correct one. I have grid that have width 960 and have ScrollViewer in it. Now i would like to know value (horizontal offset) of my scroll while scrolling. All solutions that i am finding is for wpf/silverlight and it wont works for me. Edit Ok, here is the example code, xaml: <ScrollViewer Name="Scroll" LayoutUpdated="ScrollViewer_LayoutUpdated" IsEnabled="True" Width="480" ScrollViewer.HorizontalScrollBarVisibility="Auto"> <Grid x:Name="ContentPanel" Background="Red" Margin="12,0,12,0" Width="960"> <Rectangle Name="GreenRectangle" Fill=

Silverlight Scrollviewer With Only Buttons

别来无恙 提交于 2019-12-06 03:01:21
问题 I am using a ScrollViewer as part of my Silverlight application. It has a horizontal orientation, and I would like it to appear such that only the scroll buttons appear, but not the scroll bar itself. Something like this crude ASCII rendering: ------------------------------------------------------ | | | | | < | Content Here | > | | | | | ------------------------------------------------------ I know I could use the templating functionality, but all the samples I've seen only change the look of