Windows 8 ListView with horizontal item flow

You can use a ListView this way: <ListView Height=”500″ VerticalAlignment=”Center” ScrollViewer.HorizontalScrollBarVisibility=”Auto” ScrollViewer.VerticalScrollBarVisibility=”Disabled” ScrollViewer.HorizontalScrollMode=”Enabled” ScrollViewer.VerticalScrollMode=”Disabled” ScrollViewer.ZoomMode=”Disabled” SelectionMode=”None”> <ListView.ItemsPanel> <ItemsPanelTemplate> <ItemsStackPanel Orientation=”Horizontal” /> </ItemsPanelTemplate> </ListView.ItemsPanel> — that gives it a horizontal panel and the right ScrollBars for horizontal scrolling. Both ListView and GridView can cause problems when you get larger items. I think by default the items … Read more

XAML/C#: What event fires after reordering a gridview?

You cannot reorder a GridView unless the ItemsSource is bound to an ObservableCollection and CanReorderItems, CanDragItems, and AllowDrop are set to true. It is not necessary to use a CollectionViewSource to enable reordering in your gridview. In fact, a collectionviewsource is often used for grouping a gridview and reordering is not possible when data is … Read more

Are Click, Tapped, and PointerPressed synonymous in WinRT-XAML?

Click is there for backwards compatibility, and is essentially the same as Tapped. Tapped is a “high level gesture” that will translate automatically to a click, tap, pen press, etc. and is what I would recommend to use. PointerPressed is not what you want. Here’s why: if I press and hold, the PointerPressed event will … Read more

How do I print WebView content in a Windows Store App?

Sure, here you go. First, you can resize the WebView to the actual content. Then, you scale the WebView back to the original size. It would require a script invoke and a ScaleTransform. Pretty simple, really. Like this: <Grid Background=”{StaticResource ApplicationPageBackgroundThemeBrush}”> <WebView x:Name=”MyWebView” Source=”http://www.stackoverflow.com” /> </Grid> void MyWebView_LoadCompleted(object sender, NavigationEventArgs e) { var _Original = … Read more

MessageDialog ShowAsync throws accessdenied exception on second dialog

Okay I found a quick solution, define a IAsyncOperation class varialble IAsyncOperation<IUICommand> asyncCommand = null; and set it to the ShowAsync method of MessageDialog asyncCommand = msg.ShowAsync(); In the command handler for retry/try again check if asyncCommand is not null and cancel the last operation if necessary if(asyncCommand != null) { asyncCommand.Cancel(); } Please let … Read more