xaml

How to get a certain UI control from two classes

喜欢而已 提交于 2021-01-29 07:21:09
问题 I'm developing a UWP application with two window pages on two separate screens. It's include: Mainpage.xaml Mainpage.xaml.cs Page2.xaml Page2.xaml.cs My scenario: get the mouse position(X) while moving on the secondary screen (Page2). write it in the text block on the first screen (MainPage), Changing at the same time. In MainPage.xaml <Page x:Class="LineDraw.MainPage" xmlns:local="using:LineDraw" ... .. <Grid> <TextBlock Name="textblock" Text="N/A" HorizontalAlignment="Stretch"

How to bind the position value of Xamarin.forms.Maps inside the ListView?

人走茶凉 提交于 2021-01-29 06:50:28
问题 I am using Xamarin.forms.Maps for showing the map in my project. The map is inside the ListView and I need to bind the coordinate positions to the map. Model Class: public class History { public double Latitude { get; set; } public double Longitude { get; set; } } Data adding part: historyList.Add(new History() { Latitude= -28.854930 ,Longitude= 151.166023 }); historyList.Add(new History() { Latitude = -28.853671, Longitude = 151.165712 }); historyList.Add(new History() { Latitude = -28

I am not able to implement MouseUp, MouseDown and mouseMove Events in Xamarin Mobile applications

自作多情 提交于 2021-01-29 05:29:49
问题 There is only valueChanged Event defined for Slider control, I need to develop mousedown,mouseup and Mousemove events. When a user clicks on the slider, on the view it should display "Mouse is up", "Mouse is down". But I can't able to develop that implementation.Any code help is greatly appreciated. 回答1: There is no mouse in mobile, therefore there will not be any mouse events. You have to look for GestureRecognizers, you can add TapGestureRecognizer, pan, pinch etc and so on to get events.

Picker ItemSource values not binding in a XAML ListView

梦想的初衷 提交于 2021-01-29 05:25:04
问题 Hoping you can advise as I've tried all methods to bind a picker in a Listview to my item source values using both code-behind and MVVM. The picker binding works outside of the ListView, but not inside - is this out of the box or just not possible? Please see my list below! code <ListView x:Name="TypesList" HeightRequest="53" BackgroundColor="White" IsGroupingEnabled="True" IsPullToRefreshEnabled="false" ItemsSource="{Binding Items}" IsRefreshing="{Binding IsBusy}" RefreshCommand="{Binding

Xamarin.Forms: how to automatically hide first CollectionView

ⅰ亾dé卋堺 提交于 2021-01-29 05:10:15
问题 I work on a Xamarin.Forms app that will contain a page with 2 CollectionView items: an horizontal CollectionView that will display events a vertical CollectionView that will display posts I would like that the first list is progressively hidden as soon as the user starts to scroll on the second list. We can found this behaviour on a sample from Syncfusion : but they use a SfRotator as control for the horizontal list: I've tried to reproduce the same behaviour on my page, but it doesn't work

WPF UserControl: setter not called on binding one property in multiple controls and back

谁都会走 提交于 2021-01-29 04:31:56
问题 I've got a problem with my WPF UserControl binding one property in multiple controls and back. The setters of the business object will not be called. I searched for hours now and tried serveral things which did not work. My Code Can be download here: WpfApplicationUserControlProblem.zip My Business object has 2 DateTime Values to be bound. public class BusinessObject { private DateTime _value1 = DateTime.Today.AddHours(10); public DateTime Value1 { get { return _value1; } set { _value1 =

Disable pointer mode for webview in Xbox UWP

…衆ロ難τιáo~ 提交于 2021-01-29 04:24:55
问题 Is there a way to disable pointer mode for WebView in an Xbox UWP app? I cannot use the RequiresPointer property since WebView is extended from FrameworkElement and not from Control . This is my sample XAML: <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <WebView Source="http://stackoverflow.com/" Height="300" Width="500" /> </Grid> Please find the pointer marked in the image below. I have provided RequiresPointerMode = ApplicationRequiresPointerMode.WhenRequested; in

Disable pointer mode for webview in Xbox UWP

感情迁移 提交于 2021-01-29 04:23:41
问题 Is there a way to disable pointer mode for WebView in an Xbox UWP app? I cannot use the RequiresPointer property since WebView is extended from FrameworkElement and not from Control . This is my sample XAML: <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <WebView Source="http://stackoverflow.com/" Height="300" Width="500" /> </Grid> Please find the pointer marked in the image below. I have provided RequiresPointerMode = ApplicationRequiresPointerMode.WhenRequested; in

ItemsControl with VirtualizingStackPanel disables horizontal animations in ScrollViewer

為{幸葍}努か 提交于 2021-01-29 03:36:29
问题 I'm building a custom XAML control for a UWP app that relies heavily on a ScrollViewer with snap points. I would really like the content that is bound to the control to be virtualized, so I'm using an ItemsControl. However, when I use a VirtualizingStackPanel in the ItemsControl, and then call ChangeView() on the ScrollViewer to a specific HorizontalOffset, the animation effect when scrolling to the new offset is disabled (it just jumps directly to the offset). If I simply replace the

Image with Overlay ItemsControl

烈酒焚心 提交于 2021-01-29 03:30:27
问题 I found a example and it works well, if I remove the ScrollViewer , but I need the image inside of the ScrollViewer . The TextBox shall be a overlay of the image. In this example the image is not inside the ScrollViewer . Could somebody please advise how I go about adding the image inside? <Image Grid.Column="2" HorizontalAlignment="Center" Source="/Images/Italien.png" Stretch="None"/> <ScrollViewer Grid.Column="2" Margin="2,2,2,2" HorizontalScrollBarVisibility="Visible"