winrt-xaml

How can I disable the arrows on a FlipView?

不羁的心 提交于 2019-12-23 13:32:11
问题 I have a FlipView, which is working great, but I'd like to disable the < and > arrows that fade in while scrolling. 回答1: I think that would break the scenario for keyboard/mouse users, no? You could remove the buttons from the control template if you really need to. 回答2: Here are 2 options. Option 1. In FlipView.Loaded event dynamically remove the arrow buttons. private void flipView_Loaded(object sender, RoutedEventArgs e) { Grid grid = (Grid)VisualTreeHelper.GetChild(flipView, 0); for (int

x:Bind Converter and FallbackValue not collaborating (UWP 10)

萝らか妹 提交于 2019-12-23 12:18:52
问题 I have a problem that involves a bunch of code, but I've isolated it down. If you want a TL;DR; jump to it further down. If you want a bit of context, here's my situation: I have created three data converters for my bindings. One of them is a "string prefixer": it prefixes whatever you put in with a fixed string. In the current example, that fixed string is "ms-appx:///cache/" . The second one turns a string type into an ImageSource , and the third one chains multiple converters together. I

Can't create dependency property in a UserControl in a Windows Runtime Component library

依然范特西╮ 提交于 2019-12-23 12:13:09
问题 I wanted to created data bindable property inside a user control. And this user control contains inside a "Windows Runtime Component" project. I used below code to create property. public MyItem CurrentItem { get { return (MyItem)GetValue(CurrentItemProperty); } set { SetValue(CurrentItemProperty, value); } } // Using a DependencyProperty as the backing store for CurrentItem. // This enables animation, styling, binding, etc... public static readonly DependencyProperty CurrentItemProperty =

BitmapImage returns 0 for PixelWidth and PixelHeight

时间秒杀一切 提交于 2019-12-23 08:13:25
问题 I'm trying to do a super simple thing : get the size of an image. So I create my BitmapImage but I'm getting 0 when I try to access the PixelWidth and PixelHeight . How can I accomplish that please? EDIT: (added sample code) I'm just doing: var baseUri = new Uri("ms-appx:///"); var bitmapImage = new BitmapImage(new Uri(baseUri, "Assets/Logo.png")); MyImage.Source = bitmapImage; Debug.WriteLine("Width: " + bitmapImage.PixelWidth + " Height: " + bitmapImage.PixelHeight); In the console, I get:

BitmapImage returns 0 for PixelWidth and PixelHeight

南楼画角 提交于 2019-12-23 08:12:04
问题 I'm trying to do a super simple thing : get the size of an image. So I create my BitmapImage but I'm getting 0 when I try to access the PixelWidth and PixelHeight . How can I accomplish that please? EDIT: (added sample code) I'm just doing: var baseUri = new Uri("ms-appx:///"); var bitmapImage = new BitmapImage(new Uri(baseUri, "Assets/Logo.png")); MyImage.Source = bitmapImage; Debug.WriteLine("Width: " + bitmapImage.PixelWidth + " Height: " + bitmapImage.PixelHeight); In the console, I get:

.net WP8.1/Win10 UWP: Namespace for MapControl not found in Visual Studio Designer

北城余情 提交于 2019-12-23 06:57:26
问题 Edit: the described issue below occurs also in a Win 10 UWP application (VS2015, Win10) when using the MapControl. I have a weird problem using the MapControl in a Windows Phone 8.1 (universal app) application. After adding the control to a page, Visual Studio says The name "MapControl" does not exist in the namespace "using:Windows.UI.Xaml.Controls.Maps". Building the app works, I can deploy it to the phone and the map is shown and everything is fine - but I cannot use the Designer for this

Winrt Xaml Tapped Event Responds Slowly While Clicked Responds Rapidly

▼魔方 西西 提交于 2019-12-23 05:31:03
问题 I recently created a custom entry pad with buttons that the user may be clicking rapidly (it is basically a custom numeric entry pad). The problem is that if the button tapped event is used to register the handler for the entry pad key it responds so slowly that button presses are missed (meaning if I rapidly press the number 2 five times, maybe 2 or 3 twos show up). Changing the event from Tapped to Clicked (same code otherwise) causes the entry pad to be fully responsive. Why is it that the

How to limit transformation of images inside canvas in window store app

故事扮演 提交于 2019-12-23 05:11:53
问题 I have been struggling for two weeks for this problem . I am applying dragging and scaling to an image inside canvas.Dragging works fine and is limiting inside canvas IsBoundary functions but when I am applying scaling its drag area changes . If increases scaling with mouse drag area increases also and whem I make it shrink in size drag area also shrinks.Help me to solve this problem of limiting scaling Thanks. Here is my code link sample 回答1: I think I understand your question. When you

The content of a ListView with ItemsPanel modified is not shown in designer (VS and Blend)

帅比萌擦擦* 提交于 2019-12-23 04:50:49
问题 I have this code: <ListView Margin="0,10,0,0"> <!--Orientation="Horizontal"--> <ListView.ItemsPanel> <ItemsPanelTemplate> <WrapGrid Orientation="Horizontal" /> </ItemsPanelTemplate> </ListView.ItemsPanel> <ListView.Items> <AppBarButton Icon="Download" IsCompact="False" Label="Stáhnout test" HorizontalAlignment="Center"></AppBarButton> <AppBarButton Icon="Play" IsCompact="False" Label="Spustit test" HorizontalAlignment="Center"></AppBarButton> <AppBarButton Icon="Attach" Grid.Column="4"

(WinRT)How to get TextBox caret index?

南楼画角 提交于 2019-12-23 04:49:23
问题 I got some problems with getting caret index of TextBox in Windows Store App(WP 8.1). I need to insert specific symbols to the text when button is pressed. I tried this: text.Text = text.Text.Insert(text.SelectionStart, "~"); But this code inserts symbol to the beginning of text, not to the place where caret is. UPDATE I updated my code thanks to Ladi. But now I got another problem: I'm building HMTL editor app so my default TextBlock.Text is: <!DOCTYPE html>\r\n<html>\r\n<head>\r\n</head>\r