Disable Scrolling for touch input - windows-store-apps

I have this xaml in my page:
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
<TextBlock Name="Content" IsTextSelectionEnabled="True"
FontSize="20"
TextWrapping="Wrap"
HorizontalAlignment="Right"/>
</ScrollViewer>
There is no option to horizontally scroll with the mouse. However, if I use touch mode (I use the simulator) I can drag the text from left to right with my 'finger'.
If I comment out the ScrollViewer this behaviour stops. I can only assume that Disabled HorizontalScrollBarVisibility is not preventing the touch user from scrolling horizontally. This is a minor annoyance, but how can I prevent this horizontal scrolling?

You'll also want to disable HorizontalScrollMode. HorizontalScrollBarVisibility is a separate property from the one that handles the actual behavior, which I get is a bit strange because 95% of the times you either Disable both or set both to Auto, bit I guess it is just an API design choice that gives you a bit more power.

Related

Can we edit chrome devtools layout?

I wanna know if it's possible to edit chrome/chromium devtools layout.
The reason is with a x Width > actualWidth, the layout is the left one (this is what i want as full time layout) and over the x Width < actualWidth, the layout change with the right one and I got square monitor so I can put the width too much if I want to see my render and the code javascript side-by-side.
So does it have a way to edit the devtools layout? If there is a way, how I can change the devtools layout?
Layout sample
Note: I'm using the right layout (dock to right)
Thanks for the answer
In the tab area for the content you are editing. On each side there is an icon that looks like a triangle towards a sidebar. Click that and it will hide the sidebar it is beside to give you more space.
Beyond that, you can click the overflow menu in the primary panel menu (the three icons beside the close button) and then select "Dock to Bottom" from the top layout choices.
Finally, the latest method available is to go into the Settings. Then under "Appearance" find Panel layout and change that to horizontal. This will then force the panels in elements and sources at least to be at the bottom always.
Each of these methods should provide you more area to work.

How to set Column freeze in Grid?

How can I set Column Freeze inside Grid in XAML? I know that DataGrid have FrozenColumnCount, but I must to use Grid (DataGrid is not an option). I had idea that scroll viewer don't effect first (i.e. my "frozen" column), but I dont know how to do that. Some ideas? Please help :-)
As a Grid is just a means of providing layout (i.e it isn't something that directly displays data in the way a DataGrid goes) you will have to roll-your-own version of frozen columns. You should be able to do this easily by placing a ScrollViewer (or layout control of choice) within the section you want to scroll. Then place your content within the ScrollViewer (like another Grid, say)
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="3*"/>
</Grid.ColumnDefinitions>
<ScrollViewer Grid.Column="1"/>
</Grid>

Need to scroll LongListSelector horizontally inside a pivotItem?

I want to scroll the LongListSelector Horizontally. This LongListSelector is inside a PivotItem.
I tried to put LongListSelector inside a scrollviewer, but not worked.
<ScrollViewer Width="800" HorizontalAlignment="Stretch" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Auto">
<Grid x:Name="ContentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Top">
<phone:LongListSelector Name="AllImagesList" LayoutMode="Grid" GridCellSize="220,230"
ItemsSource="{Binding PhotoCollection}"
DataContext="{StaticResource viewModel}"
ItemTemplate="{StaticResource ImagesItemTemplate}"
SelectionChanged="onImageListSelectionChanged" />
</Grid>
</ScrollViewer>
</controls:PivotItem>
Is it possible to scroll a LongListSelector Horizontally?
If yes, Please help me , How?
Putting something that scrolls horizontally inside a Pivot control is a bad idea.
The Pivot control will be trying to detect horizontal swipe gestures and so these would be competing with your ScrollViewer. How would the framework know which item you wanted to react to the swipe? How would the person using the app know if their swipe gesture would scroll the list or change the selected pivot item?
There is a reason this doesn't work.
As an alternative, if appropriate, you may want to consider using a Panorama control instead as this can have items that are wider than the screen and so support some level of horizontal scrolling. This can't be combined with a vertically scrolling list well though.
A better approach would probably be to reconsider the design of this page.

can't make ScrollViewer vertical scrollbar appear

In a Windows Phone 8 app, I have a simple example of a ScrollViewer with an ItemsControl inside
<ScrollViewer>
<ItemsControl ItemsSource="{Binding Items}"/>
</ScrollViewer>
I can swipe up and down and the ItemsControl scrolls accordingly but I am not able to see the vertical scroll-bar.
I do not have any Style applied for ScrollViewers, this is a simple app.
Since the default of VerticalScrollBarVisibility is set to auto shouldn't the scroll-bar be visible?
I am confused, I tried to set it explicitly and it still doesn't work.
How to make it visible?
Is the ItemsControl height actually bigger than the ScrollViewer (thus hiding some items)?
The scrollbars only show up if there are actually hidden items that can only be reached by scrolling.

Move Button into grid space of a TabNavigator's tabs in Flex Builder

I have a layout question for Tab Navigators in Adobe Flex 3.
Is it possible to insert a button that invades the grid space of the tabs?
I have a tab navigator component and I am dynamically adding sub components to tab navigator and I want squeeze a button inside the tab space. I don't want the button to be another tab. And I don't want to use a TabBar for the tabs.
This graphic illustrates the problem.
This is the current layout I have
This is a mockup (photoshopped) of the layout I want. I basically want to shave some pixels off the layout.
Is there a way to push the button down or manually override its layout position in MXXML or actionscript?
I would think if you put the elements in a Canvas (which allows you to lay out elements absolutely) rather than a VBox as it appears you are using now, you could force the Home button to display the way you want it to, ie:
<mx:Canvas>
<mx:Button top="5" right="5" />
<mx:TabNavigator top="5" left="5" right="5" />
</mx:Canvas>