uwp-xaml

Does ApiInformation not respect the app target version

╄→尐↘猪︶ㄣ 提交于 2019-12-07 16:51:47
问题 Imagine the following setup: UWP Library: MinVersion: 10240 TargetVersion: 16299 This library checks at runtime if the UniversalApiContract Version 5 is present. If yes, it will use the new NavigationView control that. UWP App: MinVersion: 10240 TargetVersion: 10240 This app references the UWP Library project. When I run this app on my Computer, which has Windows 10 Version 16299 installed, the following happens: The UWP Library checks at runtime for the api contract. As I have the newest

Aligning Content of CommandBar in UWP

徘徊边缘 提交于 2019-12-07 06:38:08
问题 How can I align content in the content section of the CommandBar horizontally right? Before Anniversary Update, this was still possible. 回答1: Solution Disable the IsDynamicOverflowEnabled property and set the HorizontalContentAlignment to Right . After doing this, you will get the same behavior as in pre-Anniversary Update SDK versions. <CommandBar HorizontalContentAlignment="Right" IsDynamicOverflowEnabled="False"> <CommandBar.Content> <TextBlock Text="Content" /> </CommandBar.Content> <

What is the 'right' way to resize a SymbolIcon?

社会主义新天地 提交于 2019-12-07 04:11:32
问题 I want to be able to define a style and set the style on the icon (or on the button that holds the icon). Setting the button h/w doesn't enlarge the symbol and adding a Viewbox works, but I can't figure out how to set that from a style. <Button x:Name="ZoomInButton" Style="{ThemeResource HeaderButtonStyle}" Grid.Column="1" Grid.Row="0" Click="ZoomInButton_Click"> <SymbolIcon Symbol="ZoomIn" /> </Button> Any help very much appreciated! Seems so easy, but I'm stumped! 回答1: In UWP apps, the

UWP xaml: How to display a button with icon and text in it?

巧了我就是萌 提交于 2019-12-06 19:30:04
问题 How can I display an image/icon AND text in a button? <StackPanel Name="stackPanel" Orientation="Horizontal" Tapped="stackPanel_Tapped"> <Button x:Name="button" FontFamily="Segoe MDL2 Assets" Content="" Width="50" Height="50" Background="Transparent" /> <TextBlock Text="Grades" FontSize="18" VerticalAlignment="Center" /> </StackPanel> I can add a taplistener to the stackpanel, but that won't make the stackpanel have visual effect like a real button. I've also tried: <Button FontFamily="Segoe

x:Bind ViewModel method to an Event inside DataTemplate

本小妞迷上赌 提交于 2019-12-06 15:56:27
I'm basically asking the same question as this person , but in the context of the newer x:Bind . ViewModels' DataContext is defined like so <Page.DataContext> <vm:ChapterPageViewModel x:Name="ViewModel" /> </Page.DataContext> So whenever I need to bind something I do it explicitely to the ViewModel like so ItemsSource="{x:Bind ViewModel.pageList, Mode=OneWay}" However that doesn't work within templates <FlipView ItemsSource="{x:Bind ViewModel.pageList, Mode=OneWay}"> <FlipView.ItemTemplate> <DataTemplate x:DataType="models:Image"> <ScrollViewer SizeChanged="{x:Bind ViewModel.PageResized}"> <--

Xamarin Form - How To checked the checkbox on another check box checked in UWP

扶醉桌前 提交于 2019-12-06 14:01:01
问题 My application displays the fetures permissions on DataGrid from database. For realizing this I am using the MyToolkit.Controls.DataGrid . Now i want output for if user checked the admin or update/delete/create check box then View and list check box checked vice versa same for the and also i want to set checkbox checked value from database. thanks in advance. Image if user checked the create/update/delete then same row list and view should be checkbox checked if user checked the view check

How to replicate the window transparency effect found in the new DropBox UWP app

牧云@^-^@ 提交于 2019-12-06 13:29:30
问题 Apparently the effect is a feature introduced in the Creator's Update. Has anyone figured out the exact APIs used to pull this off? Even better would be some example code to at least help get me started. Any help would be greatly appreciated. :] 回答1: You should target Windows Creators Update for it to work using Windows.UI.Xaml.Hosting; //'this' is MainPage, but can be any UIElement var visual = ElementCompositionPreview.GetElementVisual(this); var brush = visual.Compositor

Horizontal swipe gesture on UWP

笑着哭i 提交于 2019-12-06 11:39:13
is there any way to get swipe gesture same as windows phone 8 with wptoolkit. Because wptoolkit nuget package is not available for uwp, so i am unable to get similar swipe gesture on UWP In windows Phone 8 with the help of WPtoolkit nugetget package i placed this <toolkit:GestureService.GestureListener> <toolkit:GestureListener Flick="OnSwipe"/> </toolkit:GestureService.GestureListener> over text block, so i can swipe left to right or right to left over textbox1 . and swipe gesture help me to implement this private static int i; private void OnSwipe(object sender, FlickGestureEventArgs e) { if

Change size & spacing of UWP RatingControl

扶醉桌前 提交于 2019-12-06 07:38:27
There's a new RatingControl in UWP that allows you to show ratings as a series of stars. I was wondering how I can change the size of the stars and also the spacing between them. FontSize does not work like it did on the Telerik version for UWP. I hope this is possible without restyling the whole control. For example, Microsoft explicitly states "Spacing customization" as a feature : The rating control has many additional features which can be used. Details for using these features can be found in our MSDN reference documentation. Here is a non-comprehensive list of additional functionality:

Button VisualState Focused not working

眉间皱痕 提交于 2019-12-06 07:34:56
I'm trying to change the font color of a button when the button is clicked. I have tried many different things but none have worked. This is the latest thing I tried and what I believe should be the answer but its not working. Can someone help? PointerOver isworking fine, but Focused is not doing anything when the button is clicked. <Style x:Key="ButtonStyle" TargetType="Button"> <Setter Property="Background" Value="Transparent" /> <Setter Property="Foreground" Value="Black" /> <Setter Property="FontWeight" Value="Normal" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate