windows-runtime

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

How To Print Glyph Elements in WinRT

笑着哭i 提交于 2019-12-08 09:56:51
问题 I am trying to print a Canvas with Path, TextBlock and Glyph elements on it, however the Glyphs are excluded in the printed content. This is eerily similar to the exact same problem with Silverlight 5 Vector printing, for which I never found a resolution. Am I missing something or does the same problem exist in WinRT? As background, I would like to print an XPS document, but as WinRT cannot print one directly, I am creating a Canvas out of each page, which can then be fed to the WinRT

Reading from file in a Windows RT Application [duplicate]

扶醉桌前 提交于 2019-12-08 09:07:10
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: How to read a text file line by line Windows RT? I am trying to read from file line by line in C#. This is my code String filename = "apoel.txt"; System.IO.StreamReader file = new System.IO.StreamReader(filename); I followed instructions from an MSDN page and followed them exactly. The problem is I keep getting the errors The best overloaded method match for System.IO.StreamReader.StreamReader (System.IO.Stream)

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

Is there an alternative of SignedCMS in WinRT?

≯℡__Kan透↙ 提交于 2019-12-08 08:28:28
问题 And again I ran into trouble while porting a .NET Desktop App to a Windows Store App... Long story short, I have a ZIP File with an encrypted and signed XML File and a certificate in it. The decryption is working (more or less) but now I have to "unsign" the XML and I'm stuck. In the .NET App the unsigning is done with System.Security.Cryptography.Pkcs.SignedCms but that class does not exist in WinRt (as always...) Is there any alternative in WinRT? here is some of the code used in the .NET

HttpClient in Windows Phone 8.1 Universal app

北城以北 提交于 2019-12-08 08:16:49
问题 So i'm testing universal applications and have reached this: I have an application on Windows Tablet that gets data from server. Server is protected with certificate ( SSL ) I have this code, runs great on simple Windows Store Application, and Universal application project for tablet, but not Phone async public static Task<string> GetDataFromServer() { try { HttpClientHandler aHandler = new HttpClientHandler(); aHandler.ClientCertificateOptions = ClientCertificateOption.Automatic; HttpClient

How to change the font size of a grid's children text blocks dynamically in c#?

落花浮王杯 提交于 2019-12-08 08:04:07
问题 In a Windows Phone 8.1 WinRT app using c# in Microsoft Visual Studio, with the following code, how can I change the font size of the grid's children text blocks dynamically in the code behind? <Grid Name="mainGrid"> <Grid.Resources> <Style TargetType="TextBlock"> <Setter Property="Margin" Value="5"/> <Setter Property="FontSize" Value="12"/> </Style> </Grid.Resources> </Grid> The idea is to let the user change the font size in the options screen, and then save it to local settings, and then

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

how to disable the default selection in listview when you navigate to it

半腔热情 提交于 2019-12-08 07:20:47
问题 I have two list views in a scene (listview1 and listview2, contents of listview2 depends on the selecteditem on listview1) and when I navigate to the scene I want the first item in listview1 to be selected and the details be displayed in the other listview (listview2) but I do not want any item in the listView2 selected by default. What i am observing is that the first item in listView2 is also selected and that is causing selectionchanged event to be triggered for listview2 (which I want to

UWP app icon on taskbar

左心房为你撑大大i 提交于 2019-12-08 07:14:22
问题 I have all icon assets sorted out for a UWP app as detailed here except for the icon on the Taskbar. This is because I find the description at the link referred to somewhat long-winded and confusing as to how I should name an icon that should show up on the Taskbar (when the app is running). I have icon sizes prepared in dimensions of 16x16, 24x24, 32x32, 48x48, 256x256. I named them as recommended as MyAppName AppList.targetsize-XX.png where XX is 16, 24, 32, 48 or 256. As I've indicated