1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-29 14:35:45 +00:00

=> ContentView

This commit is contained in:
Yan Maniez 2019-10-20 01:04:50 +02:00
parent 4551b0e6a0
commit 789e0ebed7
2 changed files with 15 additions and 15 deletions

View file

@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<StackLayout xmlns="http://xamarin.com/schemas/2014/forms"
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:tools="clr-namespace:AideDeJeu.Tools"
xmlns:mdview="clr-namespace:Xam.Forms.Markdown"
x:Class="AideDeJeu.Views.Pickers.ItemPickerView"
x:Name="this">
<StackLayout.Resources>
<ContentView.Resources>
<ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary>
</StackLayout.Resources>
<StackLayout.Triggers>
<DataTrigger TargetType="StackLayout" Binding="{Binding Source={x:Reference this}, Path=IsEnabled}" Value="False">
</ContentView.Resources>
<ContentView.Triggers>
<DataTrigger TargetType="ContentView" Binding="{Binding Source={x:Reference this}, Path=IsEnabled}" Value="False">
<Setter Property="Opacity" Value="0.5" />
</DataTrigger>
<DataTrigger TargetType="StackLayout" Binding="{Binding Source={x:Reference this}, Path=IsEnabled}" Value="True">
<DataTrigger TargetType="ContentView" Binding="{Binding Source={x:Reference this}, Path=IsEnabled}" Value="True">
<Setter Property="Opacity" Value="1" />
</DataTrigger>
</StackLayout.Triggers>
</ContentView.Triggers>
<Frame BorderColor="Black" Padding="2" Margin="10">
<Grid>
<Grid.ColumnDefinitions>
@ -45,8 +45,8 @@
</DataTemplate>
</BindableLayout.ItemTemplate>
</StackLayout>-->
<StackLayout.GestureRecognizers>
<ContentView.GestureRecognizers>
<ClickGestureRecognizer Command="{Binding PickerCommand, Source={x:Reference this}}" CommandParameter="{Binding ItemsSource, Source={x:Reference this}}" />
<TapGestureRecognizer Command="{Binding PickerCommand, Source={x:Reference this}}" CommandParameter="{Binding ItemsSource, Source={x:Reference this}}" />
</StackLayout.GestureRecognizers>
</StackLayout>
</ContentView.GestureRecognizers>
</ContentView>

View file

@ -12,7 +12,7 @@ using Xamarin.Forms.Xaml;
namespace AideDeJeu.Views.Pickers
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class ItemPickerView : StackLayout
public partial class ItemPickerView : ContentView
{
public MainViewModel Main
{
@ -73,10 +73,10 @@ namespace AideDeJeu.Views.Pickers
// defaultValue: new List<string>());
public static readonly BindableProperty ItemsSourceProperty =
BindableProperty.Create(
nameof(ItemsSource),
typeof(System.Collections.IEnumerable),
typeof(ItemPickerView),
default(System.Collections.IEnumerable));
nameof(ItemsSource),
typeof(System.Collections.IEnumerable),
typeof(ItemPickerView),
defaultValue: null); // default(System.Collections.IEnumerable));
public ICommand PickerCommand
{