winrt-xaml

How to override ContentControlThemeFontFamily

荒凉一梦 提交于 2019-11-30 21:05:27
is it possible to set a custom font for ContentControlThemeFontFamily in WinRt Applications in the standardstyles.xaml? do you have any example? Sameer Vartak Create a resource dictionary of your own and override the themes. <ResourceDictionary.ThemeDictionaries> <ResourceDictionary x:Key="Default"> <FontFamily x:Key="ContentControlThemeFontFamily">Times new roman</FontFamily> </ResourceDictionary> </ResourceDictionary.ThemeDictionaries> 来源: https://stackoverflow.com/questions/12227669/how-to-override-contentcontrolthemefontfamily

UWP ContentDialog Invocation

别来无恙 提交于 2019-11-30 20:40:08
I am using UWP and Template 10 to build a GUI app by following MVVM pattern. As a part of application I need to invoke a content dialog by pressing button on Main Page. So separate ContentDialog was created in standalone .xaml file for that purpose: <ContentDialog x:Class="UWP1.Views.Speech" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:UWP1.Views" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" Title=

Capture screen of Windows store App

烂漫一生 提交于 2019-11-30 20:05:30
Is it possible to capture the contents of running Windows store app? I need to capture the entire screen or a user defined rectangular area. The application will provide share option When the application is running and share option is selected, I want to get the screen shot periodically say 4 times in a second This screen shot image will be posted to server, which will store the same You can't capture screen programatically. See the below threads from MSDN. Programmatically take snap shot Windows RT. How to capture screen in Metro app? It's now possible in Windows 8.1 to capture the screen of

Selected Items using MVVM in WinRT

你。 提交于 2019-11-30 18:40:36
I'm struggling to find a way to bind the SelectedItems property in a ListView to the view model. Previously I used this: http://www.codeproject.com/Articles/412417/Managing-Multiple-selection-in-View-Model-NET-Metr which no longer works in the RTM release. Any help is much appreciated! Thanks in advance :) You could look at the ListViewExtensions.BindableSelection from the WinRT XAML Toolkit on CodePlex. Turns out binding to the attached property was failing because the type of the attached property was being seen as From the output window in Visual Studio: type ('null') After further research

Not showing items with Visibility=Collapsed in Windows 8.1 GridView

吃可爱长大的小学妹 提交于 2019-11-30 18:36:15
I have a Windows 8.1 application with a GridView bound to a custom (sortable, deduplicated) observable collection. In this collection, I do some heavy filtering and setting an IsHidden flag for every item. In the data template for the item, there is a condition making the item collapsed if IsHidden flag is set to true. <Grid Width="160" Height="280" Visibility="{Binding IsHidden, Converter={StaticResource InvertedBooleanToVisibilityConverter}}"> This approach works in Windows Phone 8.1 XAML, making the items disappear from the ListView but it does not work in Windows 8.1 GridView . The problem

providing domain/user credentials to webview control

坚强是说给别人听的谎言 提交于 2019-11-30 18:24:59
问题 Does anyone know how to provide credentials to a WebView control (or even better - run a Windows 8 Metro style application / WinRT app in the context of a specific domain user?) I've tried following the HttpClient + WebView approach as listed here (http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/05e46a0a-e913-469d-a4a5-4a805dcf158a) but it still prompts the user for credentials, since in the returned content there are links to secured items. I have a NetworkCredential

SOS Debugging Extensions for Microsoft.NET.CoreRuntime

≯℡__Kan透↙ 提交于 2019-11-30 16:36:09
While trying to track down a fatal null pointer language exceptions (c000027b) in a UWP C#/XAML store project with WinDbg, I cannot get to the CLR Exception object because of a missing SOS debugging extention for Microsoft.NET.CoreRuntime. I was unable to locate a matching sos.dll. What am I missing? Note: The app crash is reproducible, but only happens when not debugging. So running the project under the Visual Studio debugger is unfortunately not a solutions in this case. [...] 0:009> dt -a6 000001c37c6587e0 combase!PSTOWED_EXCEPTION_INFORMATION_V2 [0] @ 000001c3`7c6587e0 -------------------

How to access xaml Control inside DataTemplate inside FlipView

别来无恙 提交于 2019-11-30 16:27:55
I want to access the "image" element in the C# code. I know that i cannot access it directly since it is in datatemplate. I have tried visual trees but still not able to get "image" control element in the code . <FlipView x:Name="flipView" AutomationProperties.AutomationId="ItemsFlipView" AutomationProperties.Name="Item Details" TabIndex="1" Grid.RowSpan="2" ItemsSource="{Binding Source={StaticResource itemsViewSource}}" SelectionChanged="flipView_SelectionChanged"> <FlipView.ItemContainerStyle> <Style TargetType="FlipViewItem"> <Setter Property="Margin" Value="0,137,0,0"/> </Style> </FlipView

Use MediaCapture on a Windows 8 desktop app

我们两清 提交于 2019-11-30 15:28:44
问题 On a Windows 8 desktop app, I need to take a photo using the camera in C# 4.5. I've tried to use the CameraCaptureUI class, but it is not available on a desktop app. So I try to use the MediaCapture class, which is available for Metro app or desktop app. It works great, based on the example found here : http://code.msdn.microsoft.com/windowsapps/media-capture-sample-adf87622/ var capture = new MediaCapture(); // Find the camera device id to use string deviceId = ""; var devices = await

Save canvas with background image on WinRT

会有一股神秘感。 提交于 2019-11-30 15:27:45
I want to make a simple drawing app for children with C# for WinRT. The user can choose a picture and draw a little bit. But how can I save the image (together with the background)? There is no functionality to save the image with background. I tried to use your library to render a Canvas into an image file but I got this error runtime: "Can't find component. (Exception from HRESULT: 0x88982F50)". Code looks like this: //SAVE private async void saveButton_Click(object sender, RoutedEventArgs e) { await SaveToFile(); } public async Task SaveToFile() { var wb = new WriteableBitmap(1, 1); await