uwp

Two-way-binding: editing passed value from XAML control in the model setter does not update control

*爱你&永不变心* 提交于 2020-01-05 07:11:11
问题 This is for a Windows 10 Universal App. XAML: <RelativePanel Padding="4" Margin="4,12,0,0"> <TextBlock x:Name="Label" Text="Class Name" Margin="12,0,0,4"/> <ListView x:Name="ClassTextBoxes" ItemsSource="{Binding TextBoxList}" SelectionMode="None" RelativePanel.Below="Label"> <ListView.ItemTemplate> <DataTemplate > <RelativePanel> <TextBox x:Name="tbox" PlaceholderText="{Binding PlaceHolder}" Text="{Binding BoxText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Padding="4" Width="200"

Error: An error occurred while validating. HRESULT = '80070057'

大憨熊 提交于 2020-01-05 05:59:07
问题 I'm having this error message when I try to make an .exe file with "Microsoft Visual Studio 2017 Installer Projects". I read all the post on this error, but nothing helped. Starting with Install/reinstall and finish with trying to find a file with Temporary ASP.Net files (could not find them till end). Also, I tried it with a basic "Hello world" project on 2 PCs and one notebook. But I got the same error. The project is written in C# and XAML. How to fix this error? Any help will be

POST Request UWP

久未见 提交于 2020-01-05 05:42:08
问题 I writing UWP app. I need to send POST request with json to server Here is my code for downloading JSON and writing to value: public async void AllOrders_down() { string url = "http://api.simplegames.com.ua/index.php/?wc_orders=all_orders"; var json = await FetchAsync(url); List<RootObject> rootObjectData = JsonConvert.DeserializeObject<List<RootObject>>(json); OrdersList = new List<RootObject>(rootObjectData); } public async Task<string> FetchAsync(string url) { string jsonString; using (var

How to not focus element on application startup?

感情迁移 提交于 2020-01-05 05:41:07
问题 Simplest application possible: <Page x:Class="TestApp.MainPage" ...> <Grid> <TextBox /> </Grid> </Page> Question: is there any elegant way to prevent the cursor (focus) from being set in the TextBox on application start up? To expand: My real issue is that I have a PopUp that is opened when the TextBox receives focus. If I click on an element in my PopUp it should close, but since the TextBox is the first focusable element in my page it automatically receives focus and thus the PopUp

AdControl not showing ads, even after uploading the app to the store

眉间皱痕 提交于 2020-01-05 05:29:07
问题 I Uploaded app an UWP app to the windows 10 store whil using AdControl to show ads in my app. My Add Control doesn't show me ads, it just stay blank and throwing the next error: "No ad available. No additional information"" In the dashbored - monetize I created ad unit name and got ad unit ID app ID and ad unit name as shown in here: in the xaml file: <UI:AdControl ApplicationId="78eefbba-92ef-466f-bec3-81e17f9c36d4" AdUnitId="332861" Name="adControl" Height="60" Width="480" Grid.Row="5"

Is there an event for hiding for NavigationBar in Windows 10 Mobile?

别来无恙 提交于 2020-01-05 05:29:05
问题 In my scenrio, I need to get notification while hiding the NavigationBar in Window 10 Mobile. Is there any way to find out the visibility change of the NavigationBar in Window 10 Mobile? Regards, Srinivasan 回答1: Just have a test, it seems on Windows 10 mobile, we can only make the app run in full screen mode to hide the Navigation bar, but problem is when the app is in full screen mode, the status bar in the top will also be hidden. So if you want to make your app be launched in full screen

Linking ThemeDictionaries in Library Project

别来无恙 提交于 2020-01-05 05:18:41
问题 I created 2 ResourceDictionary /theme files in Themes folder named Light.xaml and Dark.xaml . Added SolidColorBrush with name BgColor in both files : <SolidColorBrush x:Name="BgColor" Color="Silver" /> // in Light.xaml <SolidColorBrush x:Name="BgColor" Color="WhiteSmoke" /> // in Dark.xaml In Application type project, I can add below XAML code in App.xaml so I can reference this resource in my UserControl : <Application> <Application.Resources> <ResourceDictionary> <ResourceDictionary

Hosted api Issue in windows 10 universal app

痞子三分冷 提交于 2020-01-05 05:05:26
问题 Hi I have created a windows universal app in which I am using API which is hosted on my machine's IP address. As I run the app whether from VS15 or from App package it works fine. But as soon as I run this app on another machine using app package it doesn't work. Similarly if I host the same API on another machine's IP address it stops working on my machine. Even though in both cases I can access the data via hitting the URL path in browser. But running the app package on phone works fine.

XAML ScrollViewer's child bring into view event

隐身守侯 提交于 2020-01-05 04:57:24
问题 I have a ScrollViewer , at the top area, there is a video player, and a ListView below the media player. While scrolling up and down, when the media player bring into view, it starts to play. When scroll down till the media player disappears, the media player pauses. So, how to do it? Thx. 回答1: We can use ScrollViewer.ViewChanged event to know the user scrolling and zooming the ScrollViewer. But the ScrollViewer.ViewChanged do not raise when the layout changing. So we can use LayoutUpdated

UWP Application launched with LaunchUriAsync is not showing main page

徘徊边缘 提交于 2020-01-05 04:28:28
问题 I have launched a uwp app with LaunchUriAsync but the application is not loading the properly(not showing main page of the application), it is showing default blue screen public MainPage() { this.InitializeComponent(); callUri(); } private async void callUri() { var uriBing = new Uri((@"testapptolaunch://")); // Launch the URI var success = await Windows.System.Launcher.LaunchUriAsync(uriBing); } and in app.xaml.cs added the below code protected override void OnActivated(IActivatedEventArgs