uwp

mismatch detected for 'vccorlib_lib_should_be_specified_before_msvcrt_lib_to_linker': value '1' doesn't match value '0' in msvcrtd.lib

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 12:37:15
问题 I have a C library project for UWP. There are some C files which are calling C++ WINRT functions defined in CPP file.It is compiling successfully and generating a library file(LIB). I am compiling in Visual Studio 2015 with update 1 and target platform is 10.0.10240.0 But, I want to generate DLL instead of LIB file. Here's the changes I did to change the project so that it generates DLL instead of LIB. Try1: So, In the startup project, In Configuration Properties => General I change

Call Native C# from WinJS that's loaded in a WebView

核能气质少年 提交于 2019-12-11 12:14:32
问题 I know it's possible to call native C# from WinJS by creating a Windows Runtime Component and then adding it as a reference to the WinJS app -- but is it possible to do the same thing from the WinJS app when it's loaded inside a WebView ? I've tried it, but it seems the WinJS app inside the WebView is operating in a completely different context or something and isn't finding the symbols, so it crashes and offers to launch a new instance of VS2013 to try and debug. 回答1: You're correct in that

Stretching buttons in ItemsControl

依然范特西╮ 提交于 2019-12-11 12:03:56
问题 I have collection of data items that should be represented on a page in a row. <ItemsControl ItemsSource="{x:Bind ViewModel.PresetsSecondLine, Mode=OneWay}" Visibility="{x:Bind ViewModel.IsExpanded, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0 5"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapGrid Orientation="Horizontal" HorizontalChildrenAlignment="Stretch" MaximumRowsOrColumns="4" /> <

UWP MediaPlayerElement - how to loop/repeat mp4

爷,独闯天下 提交于 2019-12-11 11:52:46
问题 I have an mp4 that I need to repeat in a page. How can this be achieved? <MediaPlayerElement Grid.Row="0" Background="White" Source="{x:Bind MovieSource}" Width="900" AutoPlay="True" > </MediaPlayerElement> I tried to use a storyboard but found out that MediaTimeline is not available in UWP. Can't find a working alternative... 回答1: The MediaPlayer property of the MediaPlayerElement class has an IsLoopingEnabled property. 来源: https://stackoverflow.com/questions/52128282/uwp-mediaplayerelement

How to get logical drives names in Windows 10?

只谈情不闲聊 提交于 2019-12-11 11:51:59
问题 In WPF, we can access the drives names using GetLogicalDrives() method in System.IO namespace. But for UWP, GetLogicalDrives() method is not in System.IO namespace. So how can I access drives names in windows 10? 回答1: Nor sure if this answers your question, but: var removableDevices = KnownFolders.RemovableDevices; var folders = await removableDevices.GetFoldersAsync(); This will return a collection you can iterate through: foreach (StorageFolder folder in folders) { sb.AppendFormat(

Call MediaCapture.InitializeAsync from UWP BackgroundTask

依然范特西╮ 提交于 2019-12-11 11:37:58
问题 I am trying to take a photo during a BackgroundTask at an UWP application. I read at documentation that InitializeAsync should be on the STA thread but is there some approach to achieve that from a MTA? I don't known, something like Dispatchers or others workarounds. In my actual scenario, when I call CapturePhotoToStreamAsync just after the InitializeAsync, the following exception occurs: System.Runtime.InteropServices.COMException (0xC00D3E82): A media source cannot go from the stopped

Run External exe from UWP app, workaround sandboxed mode

倖福魔咒の 提交于 2019-12-11 10:57:59
问题 I have a program where i want to have the ability to launch a local application (for example Spotify) from my UWP App. I have searched the web for a solution as (Process.Start()) doesn't work. As i have understood the UWP applications is kind of sandboxed for saftey and stability reasons. But is there a (simpel) way to work around this. I only want the ability to start and close a program inside my own frame/Window. No need to interact/send/recive data between my applications and the external

Selected Item Always deselect (C#)

自作多情 提交于 2019-12-11 10:57:52
问题 I am implementing a list box, when i select an item in list box it appears on a text block "MiniTextBlock" , but i want when text block text is changed manually or textblock text is not equal to selected item in list box then, that selected item should be deselected from list box. DispatcherTimer timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(0.4) }; timer.Tick += delegate (object sender, object e) { if(selectedItem != null && selectedItem.ToString() != MiniTextBlock.Text) {

Universal Apps: How to bind a property of a ListViewItem (container) to the actual item (View Model)?

我的梦境 提交于 2019-12-11 10:55:38
问题 I have this ListView <ListView ItemsSource="{Binding Items}"> <ListView.ItemContainerStyle> <Style TargetType="ListViewItem"> <Setter Property="Background" Value="{Binding IsValid, Converter={StaticResource BooleanToBrushConverter}" /> </Style> </ListView.ItemContainerStyle> <ListView.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding Name}" /> </DataTemplate> </ListView.ItemTemplate> </ListView> I KNOW Bindings don't work for Setters in Universal Applications but, then how do I bind a

Use Swipe Gesture in UWP

两盒软妹~` 提交于 2019-12-11 10:38:35
问题 I've seen that since the latest update (Windows Fall Creators Update) there exists a collection of Swipe Classes, but in the current stable release of VS ( 15.4.1 ) there isn't a way to make it work. I'm currently running the latest W10 update (1709) with Visual Studio 2017 Enterprise ( 15.4.1 ) and there's no way to make it work. I've tried to make the following example work but with no luck: https://channel9.msdn.com/Events/Windows/Windows-Developer-Day-Fall-Creators-Update/WinDev015