windows-store-apps

Stop YouTube Video on Back Button of Windows Metro App 8.1

纵饮孤独 提交于 2019-12-13 07:09:34
问题 I have a page on which i am showing multiple youtube videos as webviews. When i play any video, then correspoding video starts playing. But When I click on the back button of the App i should be stop then but its running in background(can hear voice of video). here is the code of back button: protected void GoBack(object sender, RoutedEventArgs e) { ((Frame)Window.Current.Content).GoBack(); } Tell me how i can dispose of this webview or can stop video. Thanks 回答1: First make sure that the

Find out which Style Resource a Control uses

徘徊边缘 提交于 2019-12-13 06:18:48
问题 I'm searching for a way to find out which style resources a control uses. I.e. I'm currently trying to change the Brushes of the back Button in my app. Confusingly these brushes are partly located under the ResourceKey s AppBarItemPointerOverForegroundThemeBrush (etc.) instead of BackButtonPointerOverForegroundThemeBrush (which doesn't seem to change anything - side question: what's this resource for?). I couldn't find the the foreground theme brush resource for the normal ViewState at all.

Windows 8 Store App DirectX 11.1 Enabling Blendstate with loaded PNG texture with alpha

跟風遠走 提交于 2019-12-13 06:17:40
问题 I am loading a PNG with transparency to a texture with the following code: ComPtr<IWICStream> stream; ComPtr<IWICBitmapDecoder> bitmapDecoder; ComPtr<IWICBitmapFrameDecode> bitmapFrame; ComPtr<IWICFormatConverter> formatConverter; unsigned int width, height D3D11_SUBRESOURCE_DATA resourceData; ZeroMemory(&resourceData, sizeof(resourceData)); DX::ThrowIfFailed( m_wicFactory->CreateStream(&stream) ); DX::ThrowIfFailed( stream->InitializeFromMemory( rawFileBytes->Data, rawFileBytes->Length) );

How to save a canvas having more than one image to the picture library in windows store app using c# and xaml

怎甘沉沦 提交于 2019-12-13 05:38:49
问题 I am creating an application for windows 8 store app using c# and xaml.I have used a canvas where more than one images are added now i want t save the canvas to the picture library . Thanks :) 回答1: You can use WinRT XAML Toolkit's Composition library. Build your UI as you would to display on screen, call Measure and Arrange on the root element to size it to your output image dimensions and use one of the extension methods - WriteableBitmapRenderExtensions.Render() or .RenderToPngStream() to

Registering Windows Tablet 8.1 for development of Windows Store Apps

。_饼干妹妹 提交于 2019-12-13 05:20:14
问题 I am using Visual Studio 2013 Professional (with a Store developer account connected) and I have a Windows 8.1 Lenovo tablet for which I'd like to try developing Store apps. I am stuck right now because when I connect my tablet to my laptop (which has Visual Studio) using the USB port, and open "Windows Phone Development Registration" tool, my Windows tablet device is not recognized by it. Any help in letting me know what I am missing would be greatly apprciated. Thanks. 回答1: Windows systems

DesktopAppConverter woes, Windows 10 v.17134

*爱你&永不变心* 提交于 2019-12-13 05:17:11
问题 I'm trying to convert my Win32 app from its MSI into UWP appx package using Desktop App Converter, so that I can update it in the Windows Store. Here's the steps. When I downloaded the Windows_BaseImage_DAC_17134.wim file and tried to install it, I got this at the end (I'm not sure if it means anything): Here's the same as a text: VERBOSE: Removing any pre-existing NAT network Get-NetNat : Invalid class At C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.1.1.0_x64__8wekyb3d8bbwe

Can I decide the number of rectangles in a grid at runtime?

☆樱花仙子☆ 提交于 2019-12-13 04:59:43
问题 I'm basically having the same problem as this guy. The thing is, I want there to be a certain number of rectangles on the screen, depending on the screen size/resolution. Now the first comment on that question says "creating UI elements in procedural code in XAML-based technologies is discouraged, cumbersome, probably a bad idea, and just plain wrong". So is there another way in which I can achieve my goal? One way I can think of would be to have a minimum of 3x3 rectangles, but add UI code

LoadStateEventArgs can't loaded

穿精又带淫゛_ 提交于 2019-12-13 04:48:21
问题 guys, I have a problem with my Store App (Windows 8.1), I don't know the motive. The LoadStateEventArgs don't load. I put the using assembly using Windows.UI.Xaml.Navigation; and don't work. How fix it? 回答1: NavigationHelper and LoadStateEventArgs aren't defined in any of the assemblies; they're included directly in your project when you add a new item based on the Basic Page template: Once you do that, a couple of file are added to the Common folder: Among them is also NavigationHelper.cs

Is it possible to create an Attached Property on a Sealed XAML control class?

◇◆丶佛笑我妖孽 提交于 2019-12-13 04:29:00
问题 The Run class in the Windows Store Apps libraries is SEALED, unlike the old desktop version. I need to add a property to it that I can retrieve when the user selects the Run. Is it possible to attach a property to the sealed Run class that I can access in code? Here is my attempt: public static readonly DependencyProperty MyIndexProperty = DependencyProperty.RegisterAttached("MyIndex", typeof(int), typeof(Run), new PropertyMetadata(null)); public static int GetMyIndex(Run obj) { return (int

How do I set a custom button background for a Metro app for all states

旧时模样 提交于 2019-12-13 04:17:52
问题 I want to use my own bitmaps for my buttons for a Metro style Windows 8 app. I can set the background brush for a button to my own ImageBrush and that works fine, except for the hover and pressed states. I cannot figure out how to set the bitmaps for them. Does anyone know how to do this? Thanks. 回答1: WinRT XAML Toolkit has an ImageButton control that allows to define images for all states if that is what you need. You can also check its default template in Generic.xaml to see how it uses the