uwp

How to interact with DOM on a UWP WebView?

回眸只為那壹抹淺笑 提交于 2019-12-13 07:27:57
问题 I have a UWP XAML Page and a WebView <WebView Name="webview1" Margin="10" Source="http://www.apelosurgentes.com.br/en-us/" LoadCompleted="WebView_LoadCompleted" /> How to read and manipulate the DOM of the document that was loaded on this WebView? 回答1: How to interact with DOM on a UWP WebView? You can use InvokeScriptAsync with the JavaScript eval function to use the HTML event handlers, and to use window.external.notify from the HTML event handler to notify the application using WebView

how to make a contractable stackpanel in Xaml

别说谁变了你拦得住时间么 提交于 2019-12-13 07:21:38
问题 My idea is fairly simple and I've seen it many places. I want to be able to expand and contract a list of items based on a click on a button. ex listitem 1 listitem 2 subList item 1 subList item 2 listItem 3 simply click Listitem 2 and the sublistitems should disapear. click it again or any other listitem and the sublist item belonging to that listitem should reappear. here is what I've done so far(Doesn't work) Channels.Xaml: <UserControl x:Class="InternetRadio.RadioChannels" xmlns="http:/

ContentDialog in UWP, bad scrolling behavior

て烟熏妆下的殇ゞ 提交于 2019-12-13 07:05:38
问题 I've created this ContentDialog with a tall StackPanel on purpose, but even though the contents are inside a ScrollViewer, the content appears clipped when it doesn't have enough space. What's going on there? <ContentDialog x:Name="ContentDialog"> <ScrollViewer> <StackPanel> <Button>Hola</Button> <Button>Hola</Button> <Button>Hola</Button> <Button>Hola</Button> <Button>Hola</Button> <Button>Hola</Button> <Button>Hola</Button> <Button>Hola</Button> <Button>Hola</Button> <Button>Hola</Button>

How to scale a windows universal desktop app programatically

跟風遠走 提交于 2019-12-13 07:03:09
问题 The default scale factor in desktop is 1 but I want to apply an scale factor of 1.75 to a desktop application. I don´t mean the app bounds (that´s easy) but the scale applied to all visual elements, like mobile version does on devices. Is there any way to achieve this globally? 来源: https://stackoverflow.com/questions/40033649/how-to-scale-a-windows-universal-desktop-app-programatically

UWP app targeted only to Desktop/Tablet?

谁都会走 提交于 2019-12-13 07:01:40
问题 I'm trying to understand how UWP apps work. I'm looking at some third party libraries on NuGet, but some of them won't work with UWP due, I presume to missing dependencies. For example, some PDF drawers need System.Drawing.dll which I presume may not be accessible on Windows Phone. Given my app doesn't need to work on Phones, and it's arguably not even required for tablets... it's primarily a Desktop app... how can I get around these dependency issues? Is there some way for me to still use

Template 10 hamburger menu detail page disappears after resume

荒凉一梦 提交于 2019-12-13 06:59:51
问题 Start app [Press home button] press "all apps" on home screen and the icon for my app now i only see the hamburger icon. this is my suspend and resume functions. 回答1: Resolved by the Template10 team. dg2k. All is fine. Just change ExistingContent.Exclude to ExistingContent.Include for the following line in public override UIElement CreateRootElement(IActivatedEventArgs e) (App.xaml.cs). public override UIElement CreateRootElement(IActivatedEventArgs e) { ... var navService =

SignalR client connection error (UWP & JavaScript Client)

扶醉桌前 提交于 2019-12-13 06:52:41
问题 I have both, a simple UWP app running on local machine in Visual Studio and a simple AngularJS SPA. I have also an OWIN based self hosted server running in a Service Fabric Cluster. The server use web api and signalR. When I'm hosting the Service Fabric Cluster on my local machine, the UWP app and the angular app can open a connection to a signalR hub on the server. When I'm hosting the Service Fabric Cluster on Azure, the clients are not able to connect to the signalR hub. I'm getting:

AppBar shows half of content

穿精又带淫゛_ 提交于 2019-12-13 06:49:33
问题 I use AppBar for my application and AppBarButtons. But ABB shows only half of title text and rest after opening AB. I want to hide the text completely and show it only in case of opening AB. Problem image <Page.Resources> <Style TargetType="AppBarButton" x:Name="appBar"> <Setter Property="VerticalAlignment" Value="Top"/> <Setter Property="HorizontalAlignment" Value="Right"/> </Style> </Page.Resources> <Page.BottomAppBar> <AppBar IsSticky="True" ClosedDisplayMode="Compact" Background=

Errors on build creating a UWP cppwinrt SolidColorBrush

▼魔方 西西 提交于 2019-12-13 06:31:34
问题 When creating a solid brush (cppwinrt) for a textblock I get errors when building, using: void MainPage::myStyle(Controls::TextBlock & block) { block.FontSize(72.0); block.Foreground(Media::SolidColorBrush(Windows::UI::Colors::Orange())); block.VerticalAlignment(VerticalAlignment::Center); } error: LNK2019 unresolved external symbol "public: __thiscall winrt::Windows::UI::Xaml::Media::SolidColorBrush::SolidColorBrush(struct winrt::Windows::UI::Color const &)" The error goes when I take the

How to access Pivot Header Template Dynamically (i.e. using C#)

与世无争的帅哥 提交于 2019-12-13 06:30:22
问题 As per @Justin XL's answer to this question (Overriding Pivot header foreground brushes in UWP app) you can style the Pivot Header in XAML (as per his code, below). Having done this in XAML, how would you then programmatically change something (e.g. the Foreground) dynamically using C#? <Grid> <Pivot Title="Pivot"> <Pivot.HeaderTemplate> <DataTemplate> <Grid> <TextBlock Text="{Binding}" Foreground="Teal" /> </Grid> </DataTemplate> </Pivot.HeaderTemplate> <PivotItem Header="My first header">