windows-runtime

Xaml, wpf image position and crop issue

无人久伴 提交于 2019-12-13 16:36:01
问题 I have images of 600px width and 600px height. we have three sizes of circles. all have the center in the middle. Some have reflection as shadow beneath it. I would like to crop the image for display purposes. So the largest circle as shown above has a diameter of about 500 pixels, but the medium and small ones have less. I know in the code which size I have of object type Product . Because of the size differences I have to place them differently and used three placeholder images for it, like

Slider's behaviour depending on minimum-maximum range

倾然丶 夕夏残阳落幕 提交于 2019-12-13 15:58:15
问题 I'm working on Windows Phone 8.1 Runtime and I've encountered strange problem. Let's define two almost identical Silders : <Slider Header="Values 0.1-0.9" Grid.Row="0" HorizontalAlignment="Stretch" TickFrequency="0.05" TickPlacement="Inline" Minimum="0.1" Maximum="0.9" Value="0.2"/> <Slider Header="Values 1.0-9.0" Grid.Row="1" HorizontalAlignment="Stretch" TickFrequency="0.5" TickPlacement="Inline" Minimum="1" Maximum="9" Value="2"/> As you can see the second Slider differentiate from the

How do I make a GIF repeat in loop when generating with BitmapEncoder

最后都变了- 提交于 2019-12-13 14:23:59
问题 I am able to use BitmapEncoder (C#, WinRT) to create an animated gif. However, I haven't been able to figure out how to make the GIF loop back and start from scratch? Didn't try much because I am not sure what to try. Searched for more properties to set on the GIF, but could not find anything relative. 回答1: Okay, finally been able to figure it out. Apparently you need to add the following metdata to the GIF to get it to loop: BitmapPropertySet properties = await encoder.BitmapProperties

Inheritance impossible in Windows Runtime Component?

こ雲淡風輕ζ 提交于 2019-12-13 14:11:59
问题 Scenario: I have 3 classes (A,B,C) in my Windows Runtime Component project. class A{} public sealed class B : A {} public sealed class C : A {} On compiling the above code, I get the following error : "Inconsistent accessibility: base class 'A' is less accessible than class 'C'." If I make class A public, it gives a compile error : "Exporting unsealed types is not supported. Please mark type 'MyProject.A' as sealed." But now, if I make A as sealed, then B and C cannot inherit from it.

Style of MediaElement in Windows 8.1

限于喜欢 提交于 2019-12-13 12:14:12
问题 How can I change style of sample MediaElement : For example how can I change the background. Code: <MediaElement AudioCategory="BackgroundCapableMedia" x:Name="media" MediaEnded="Media_MediaEnded" AutoPlay="True" AreTransportControlsEnabled="True" IsMuted="False" Volume="0.5"/> 回答1: Actually you can change the colors by overriding the default colors in the App. Note this would apply now for all MediaElement controls with transport controls, but it is possible. In your App.xaml you would

How should IBuffer objects generated through Windows.Security.Cryptography be managed securely?

血红的双手。 提交于 2019-12-13 10:42:39
问题 Following on from my previous question: Do the IBuffer objects produced by the methods in Windows.Security.Cryptography.CryptographicBuffer have security features? IBuffer objects are returned and used by the cryptographic routines in WinRT. As my previous question was answered, any secure management of those buffers has to be maintained by the user--e.g. overwriting the memory, encrypting when it isn't actively needed, etc. However, methods to interact with the data underlying IBuffers are

WebView display Loginscreen again after login via basic authentication with HttpClient

旧巷老猫 提交于 2019-12-13 08:17:59
问题 i am connecting to a server with basic authentication and after that i am calling the URL in Webview with following code: WebView.Source(new Uri("https:(//UrlHere")); The Webview Puts up a Login-Window, but i am already logged in. Why is this happening? How can i prevent this? The way i a authenticate to the server: private async void HttpClientCall(object sender, RoutedEventArgs e) { System.Diagnostics.Debug.WriteLine(this.GetType().Name + ": HTTPCLientCall entered"); //System.Diagnostics

Loosely-ordered concurrency with loops?

牧云@^-^@ 提交于 2019-12-13 07:42:21
问题 I have the following code that is meant to fetch data from a REST service (the Get(i) calls), then populate a matrix (not shown; this happens within addLabels() ) with their relationships. All of the Get() calls can run in parallel to each other, but they must all be finished before anything enters the second loop (where, once again, the calls can run in parallel to each other). The addLabel() calls depend on the work from the Get() calls to be complete. ** To anyone stumbling across this

Grid Splitter Overlap

末鹿安然 提交于 2019-12-13 07:24:37
问题 I'm trying to create an "overlap" effect (for lack of a better term). There will be a splitter that when moved, exposes a different view of two similar images (e.g. between colored and grayscale). I plan on using CustomGridSplitter from WinRTXAMLToolkit (due to WinRT's lack of a splitter). I'm thinking of starting with a grid similar to: <Grid> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition Height="10" /> <RowDefinition /> </Grid.RowDefinitions> <controls:CustomGridSplitter Grid.Row=

Sharepoint 2013 - How to logout a WinRT Client

做~自己de王妃 提交于 2019-12-13 07:11:52
问题 we have written a WinRT App connected to a Sharepoint 2013. We are able to authenticate and login to the sharepoint, but we have problems with the logout 'process'. Login is implemented as follows: We are setting up a HttpClient with the corresponding user credentials and domain information. The configuration is wrapped in the HttpClientConfig class an delivered to a the HttpClientService which holds the HttpClient object. After that we retrieve the formdigestValue from the sharepoint and use