winrt-xaml

WinRT/Metro Animation in code-behind

梦想与她 提交于 2019-12-08 15:55:31
问题 The following code works fine in Silverlight: private void Button_Click_1(object sender, RoutedEventArgs e) { Storyboard storyboard = new Storyboard(); DoubleAnimation doubleAnimation = new DoubleAnimation(); doubleAnimation.From = 50; doubleAnimation.To = 100; doubleAnimation.RepeatBehavior = RepeatBehavior.Forever; doubleAnimation.AutoReverse = true; doubleAnimation.Duration = new Duration(TimeSpan.FromMilliseconds(200)); storyboard.Children.Add(doubleAnimation); Storyboard.SetTarget

Win RT Xaml GridView: Drag select multiple items

ⅰ亾dé卋堺 提交于 2019-12-08 13:45:30
I'm trying to select multiple items in a GridView by hovering over them with pressed mouse (like drawing). I tried to achieve this with the PointerEntered event but I'm unable to change the selction from code. Is there a way to implement a custom selection mode? This didn't work for me because I can't use Style.Triggers in Win RT XAML: https://stackoverflow.com/a/2886223/5739170 You will have to inherit the gridview control and override the PrepareContainerForItemOverride method: The code: public class MyGridView : GridView { protected override void PrepareContainerForItemOverride

Crop image with rectangle

时间秒杀一切 提交于 2019-12-08 13:37:31
问题 I have a Image and I want crop it by using a rectangle, code below is the code I put a image and draw a rectangle at middle of the image: MainPage.Xaml: <Canvas x:Name="canvas" HorizontalAlignment="Center" VerticalAlignment="Center" Width="340" Height="480" Background="Blue"> <Image x:Name="photo" HorizontalAlignment="Center" VerticalAlignment="Center" ManipulationMode="All"> <Image.RenderTransform> <CompositeTransform/> </Image.RenderTransform> </Image> <Path Stroke="Black" StrokeThickness=

An recommendations on displaying HTML without WebView

≡放荡痞女 提交于 2019-12-08 12:15:30
问题 The WebView control cannot be transparent. In addition, it sizes in ways that don't enable simple XAML development, but complex sniffing and resizing. I have a block of HTML that needs to be displayed in a simple, nice way. Is there any way to do this without WebView and parsing it all by hand? 来源: https://stackoverflow.com/questions/40183377/an-recommendations-on-displaying-html-without-webview

Clipping Using Ellipse and binding it inside my user control in Windows RT

回眸只為那壹抹淺笑 提交于 2019-12-08 11:25:49
问题 I have an image and I am clipping the mouse area using an Ellipse in which I am quite successful. But I want that ellipse to be a part of my user control and the user control should move along with my finger and the clipping Ellipse should be inside the user control . The complete project can be downloaded from here My UserControl'sXAML is <UserControl x:Class="App78.Magnifier" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006

Launching the Windows Store listing from Win RT / Windows 8 app

◇◆丶佛笑我妖孽 提交于 2019-12-08 11:16:34
On Windows Phone there's a marketplace review task. Is there any way to implement the equivalent functionality in WinRT apps? I realize that there's the "rate and review" button in the Charms bar, however, this is not what I need, as I want to integrate a button inside the app to launch the review UI. It may seem trivial, however, this is one of the most important requirements! This is not a duplicate of is there an equivalent of wp7's marketplacereviewtask for windows 8 / winrt / metro style? because the questioner was happy with the Charms bar method. thanks This can be done in C# this way:

WinRT - Multiple WebViews inside ScrollViewer

前提是你 提交于 2019-12-08 10:02:23
问题 I have a ScrollViewer and WebViews inside. <ScrollViewer x:Name="ScrollViewer" HorizontalScrollMode="Disabled" VerticalScrollMode="Auto" VerticalScrollBarVisibility="Hidden"> <StackPanel Orientation="Vertical"> <WebView/> <WebView/> <WebView/> ... <WebView/> </StackPanel> </ScrollViewer> All of WebView's have height equals to its content (I implemented something like WrapContent for webView). Now, the thing is, that the webviews are bouncing (rubber-band effect) while scrolling and

ListView Windows 8 multiple indexes

会有一股神秘感。 提交于 2019-12-08 08:30:30
问题 When you have a ListView in Windows 8 Metro Style Apps how can you get all the indexes selected supposing you have multiple selection enabled? void itemsChanged (Platform::Object^ sender, Windows::UI::Xaml::Controls::Controls::SelectionChangedEventArgs^ e { // get selected indexes } 回答1: You would have to compare the SelectedItems property of the sender (the ListView) with the Items property. It appears that SelectedItems add to the collection and remove from the collection in the order items

Win RT Xaml GridView: Drag select multiple items

陌路散爱 提交于 2019-12-08 08:16:42
问题 I'm trying to select multiple items in a GridView by hovering over them with pressed mouse (like drawing). I tried to achieve this with the PointerEntered event but I'm unable to change the selction from code. Is there a way to implement a custom selection mode? This didn't work for me because I can't use Style.Triggers in Win RT XAML: https://stackoverflow.com/a/2886223/5739170 回答1: You will have to inherit the gridview control and override the PrepareContainerForItemOverride method: The

How to disable WebView scrolling in Windows 8.1

╄→尐↘猪︶ㄣ 提交于 2019-12-08 07:40:44
问题 I am developing an app for Windows 8.1. I tried below code it's not working. <WebView Source="http://wikipedia.org" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollMode="Disabled"/> Is there any JavaScript solution to disable touch, mouse & key board scrolling? 回答1: I have used below given JS for my requirement. Though I am waiting for a better (XAML) solution. function RemoveScrolling() { var styleElement = document.createElement('style'); var styleText = 'body