win-universal-app

ListView with horizontal items

只愿长相守 提交于 2021-02-20 06:53:09
问题 I come from WPF and I don't know if it's possible to make a ListView to distribute items horizontally, with all the extras like mouse-wheel scrolling (mouse devices) and swiping (touch devices). I've tried this, but it doesn't behave like the vertical one. Example: I cannot scroll with the mouse-wheel. <ListView ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Auto" ItemsSource="{Binding Collection}" > <ListView.ItemsPanel> <ItemsPanelTemplate>

Detect when screen is locked UWP

痞子三分冷 提交于 2021-02-20 05:18:33
问题 How can I detect if the screen is locked in UWP apps? When screen is locked, suspension of app occurs and I need to put some different code in case of locking screen. 回答1: You will find your answer here: https://developerinsider.co/prevent-the-screen-from-locking-on-uwp/ For those that are not looking for a link to another post that could, or could not, potentially be helpful here is the summary The code you would use is var displayRequest = new DisplayRequest(); displayRequest.RequestActive(

How to set min size of windows universal app on desktop?

不想你离开。 提交于 2021-02-19 08:20:28
问题 I would like to set min size like 800x600 for my windows universal app which on desktop. I found a method ApplicationView.GetForCurrentView().SetPreferredMinSize(new Size(800, 600)); but it doesn't work, I still can drag the window to 500x300. What I miss ? 回答1: I found a solution https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.viewmanagement.applicationview.tryresizeview for desktop, I can set a min size which is bigger than 500x500 as below code. private void Page

Toggle Button Two Way Binding Not Working (Universal Windows Platform)

ⅰ亾dé卋堺 提交于 2021-02-19 05:36:19
问题 I am trying to bind the "IsChecked" property on the ToggleButton to "ModelView.IsEnabled". "ModelView.IsEnabled" is always "false" but somehow the ToggleButton can still show as "Checked". Is there anything wrong with the binding? XAML ... <Page.Resources> <ModelView:ModelView x:Key="ModelView"/> </Page.Resources> <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <ToggleButton IsChecked="{Binding Source={StaticResource ModelView}, Path=IsEnabled, Mode=TwoWay}">

XAML Designer System.Runtime.Remoting.RemotingException

ⅰ亾dé卋堺 提交于 2021-02-17 20:28:58
问题 I'm encountering the following System.Runtime.Remoting.RemotingException error when I create a blank Windows 10 Universal Application... Following are event viewer screens... I have checked online for other solutions and have already done the following... Uninstall/Repair Visual Studio 2015 Update 1 Reset my Windows 10 PC 1511 update Cleared the Designer/ShadowCache folder Target environment has been set to x86/x64 Target framework set to 10240 Developer mode enabled Updated graphic drivers

UWP Scale textblock inside treeview - text wrapping

心已入冬 提交于 2021-02-08 07:27:34
问题 Can please anyone help, I am working on a UWP app and I want TextBlock to wrap the text inside it according to window width. That Textblock is inside Grid which is inside TreeView. Now when I resize my app window it doesn't do anything. Original: Resized: I want it to look like this and don't have fixed width but to change dynamically with window: This is my XAML code: <TreeView Name="ItemsTreeView" SelectionMode="Multiple" ItemsSource="{x:Bind DataSource}" CanReorderItems="False" CanDrag=

UWP Scale textblock inside treeview - text wrapping

巧了我就是萌 提交于 2021-02-08 07:25:36
问题 Can please anyone help, I am working on a UWP app and I want TextBlock to wrap the text inside it according to window width. That Textblock is inside Grid which is inside TreeView. Now when I resize my app window it doesn't do anything. Original: Resized: I want it to look like this and don't have fixed width but to change dynamically with window: This is my XAML code: <TreeView Name="ItemsTreeView" SelectionMode="Multiple" ItemsSource="{x:Bind DataSource}" CanReorderItems="False" CanDrag=

How to properly set AppExecutionAlias so the program could be launched from command line?

こ雲淡風輕ζ 提交于 2021-02-07 19:49:46
问题 The Package.appxmanifest for this WPF app has already set <uap5:Extension Category="windows.appExecutionAlias" Executable="PROGRAMNAME.exe" EntryPoint="Windows.FullTrustApplication"> <uap5:AppExecutionAlias> <uap5:ExecutionAlias Alias="PROGRAMNAME.exe" /> </uap5:AppExecutionAlias> </uap5:Extension> but when I try to run PROGRAMNAME from command line there is an error message "The system cannot find the file ....WindowsApps..." I can go to that WindowsApps directory and even though I see that

How to properly set AppExecutionAlias so the program could be launched from command line?

梦想的初衷 提交于 2021-02-07 19:48:57
问题 The Package.appxmanifest for this WPF app has already set <uap5:Extension Category="windows.appExecutionAlias" Executable="PROGRAMNAME.exe" EntryPoint="Windows.FullTrustApplication"> <uap5:AppExecutionAlias> <uap5:ExecutionAlias Alias="PROGRAMNAME.exe" /> </uap5:AppExecutionAlias> </uap5:Extension> but when I try to run PROGRAMNAME from command line there is an error message "The system cannot find the file ....WindowsApps..." I can go to that WindowsApps directory and even though I see that

Windows 10 Mobile height of soft keyboard

流过昼夜 提交于 2021-02-07 09:23:36
问题 Does anybody know how to move content of the page (maybe set relative margins or something like that) when soft keyboard is shown. Here is the example page from my application. So I want when the user starts typing a phone number in the text box the bottom button will be shown above the soft keyboard. As a result I want something like that: P.S: Sorry about Russian language on the screens. 回答1: It's kind of tricky, but as I've tried should work. I've used InputPane's showing and hiding events