xaml

Transform a colored image to a grayscale image using XAML?

蹲街弑〆低调 提交于 2021-01-27 07:03:50
问题 Using XAML preferably, I need to dynamically apply a gray-scale filter on a colored image from bottom to top. That's to say, i would like to be able to change the offset value of the gray-scale filter applied to my image pro grammatically. For example, I would like to programmatically set 50% of the image in color (from the bottom of the image to its middle), and the other 50% of the image in gray-scale (e.g. from the middle of the image to its top). I have read a lot of different answers,

Xamarin Forms : How to fix Activity Indicator in Centre of Screen in Scrollview

巧了我就是萌 提交于 2021-01-27 07:01:39
问题 I have a ScrollView over AbsoluteLayout .. I need to Fix the postion of the ActivityIndicator in centre of screen. I tried following code. <ScrollView> <AbsoluteLayout VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"> <StackLayout BackgroundColor="White" Padding="50,20,50,20" Spacing="5" AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All"> // have set of elements.. </StackLayout> <ActivityIndicator IsVisible="{Binding IsBusy}" IsRunning="{Binding IsBusy}"

Strange behaviour (or bug?) with ComboBox in WPF when changing DataContext and having bound ItemsSource and SelectedItem

大兔子大兔子 提交于 2021-01-27 06:53:01
问题 I'm trying to debug a strange error in a combobox bound to an itemssource and selecteditem. It's driving me crazy. The problem arise when changing selected tabitem in which the combobox exists. (Actually it's only when changing the DataContext of the ComboBox). The SelectedItem-binding has a custom validationrule to give error if value is null. The problem is that wpf calls my custom rule when switching tabitems (DataContext) and tries to validate a value of null, even though the selecteditem

Can We add content Above tabbed page in xamarin forms?

 ̄綄美尐妖づ 提交于 2021-01-27 05:42:35
问题 I want to add some label and image above tabbed page in xamarin forms, so when i slide to another tabbed page the content above tabbed page will remain the same here is the design can i achieve this because i cant find any reference to do that ? 回答1: You can not add label above in tabbed page if you want to add label above tabbed page you have to crate your own tabbed page. You can create a layout that show/hide based on your selection for your selection create tab design and tap gesture to

How and Where to Create StaticResource Key for a Converter within the Simple XAML Window?

♀尐吖头ヾ 提交于 2021-01-27 05:34:19
问题 I'm having a simple WPF XAML Window, I need to Create a StaticResource Key with in the following XAML. The XAML Source Code is <Window x:Class="WpfApplication1.Trigger" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:super="clr-namespace:WpfApplication1" Title="Trigger" Height="300" Width="300"> <Grid> <Border x:Name="m_Border" Width="100" Height="30" HorizontalAlignment="Center" VerticalAlignment="Top" Background=

How and Where to Create StaticResource Key for a Converter within the Simple XAML Window?

孤人 提交于 2021-01-27 05:33:23
问题 I'm having a simple WPF XAML Window, I need to Create a StaticResource Key with in the following XAML. The XAML Source Code is <Window x:Class="WpfApplication1.Trigger" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:super="clr-namespace:WpfApplication1" Title="Trigger" Height="300" Width="300"> <Grid> <Border x:Name="m_Border" Width="100" Height="30" HorizontalAlignment="Center" VerticalAlignment="Top" Background=

Pass KeyUp as parameter WPF Command Binding Text Box

感情迁移 提交于 2021-01-27 04:50:50
问题 I've a Text box KeyUp Event Trigger Wired up to a command in WPF. I need to pass the actual key that was pressed as a command parameter. The command executes fine, but the code that handles it needs to know the actual key that was pressed (remember this could be an enter key or anything not just a letter, so I can't get it from the TextBox.text). Can't figure out how to do this. XAML: xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" XAML: <TextBox

How to set ItemsSource of ListView?

我与影子孤独终老i 提交于 2021-01-27 04:20:29
问题 Here I have defined my data myListOfEmployeeObjects : public class App : Application { public List<Employee> myListOfEmployeeObjects; public App () { Employee emp1 = new Employee () { FirstName = "Max", LastName = "Mustermann", Twitter = "@fake1" }; Employee emp2 = new Employee () { FirstName = "Evy", LastName = "Mustermann", Twitter = "@fake2" }; myListOfEmployeeObjects = new List<Employee> { emp1, emp2 }; MainPage = new NavigationPage (new EmployeeListPage ()); } } Than I have my XAML where

How to set ItemsSource of ListView?

折月煮酒 提交于 2021-01-27 04:20:08
问题 Here I have defined my data myListOfEmployeeObjects : public class App : Application { public List<Employee> myListOfEmployeeObjects; public App () { Employee emp1 = new Employee () { FirstName = "Max", LastName = "Mustermann", Twitter = "@fake1" }; Employee emp2 = new Employee () { FirstName = "Evy", LastName = "Mustermann", Twitter = "@fake2" }; myListOfEmployeeObjects = new List<Employee> { emp1, emp2 }; MainPage = new NavigationPage (new EmployeeListPage ()); } } Than I have my XAML where

How to determine if Control has Text property

耗尽温柔 提交于 2021-01-27 04:19:10
问题 When I iterate over a bunch of different controls on a Form, instead of trying to access the Text property: String text = String.Empty; foreach(Control control in this.Controls) { try { text = control.Text; } catch(Exception exception) { // This control probably doesn't have the Text property. Debug.WriteLine(exception.Message); } } Is there a way to just determine whether or not a given control has a Text property? Something like this: String text = String.Empty; foreach(Control control in