1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-31 07:26:09 +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"?> <?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:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:tools="clr-namespace:AideDeJeu.Tools" xmlns:tools="clr-namespace:AideDeJeu.Tools"
xmlns:mdview="clr-namespace:Xam.Forms.Markdown" xmlns:mdview="clr-namespace:Xam.Forms.Markdown"
x:Class="AideDeJeu.Views.Pickers.ItemPickerView" x:Class="AideDeJeu.Views.Pickers.ItemPickerView"
x:Name="this"> x:Name="this">
<StackLayout.Resources> <ContentView.Resources>
<ResourceDictionary> <ResourceDictionary>
<tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" /> <tools:MonsterMarkdownTheme x:Key="MonsterMarkdownTheme" />
<tools:NullToFalseConverter x:Key="NullToFalseConverter" /> <tools:NullToFalseConverter x:Key="NullToFalseConverter" />
</ResourceDictionary> </ResourceDictionary>
</StackLayout.Resources> </ContentView.Resources>
<StackLayout.Triggers> <ContentView.Triggers>
<DataTrigger TargetType="StackLayout" Binding="{Binding Source={x:Reference this}, Path=IsEnabled}" Value="False"> <DataTrigger TargetType="ContentView" Binding="{Binding Source={x:Reference this}, Path=IsEnabled}" Value="False">
<Setter Property="Opacity" Value="0.5" /> <Setter Property="Opacity" Value="0.5" />
</DataTrigger> </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" /> <Setter Property="Opacity" Value="1" />
</DataTrigger> </DataTrigger>
</StackLayout.Triggers> </ContentView.Triggers>
<Frame BorderColor="Black" Padding="2" Margin="10"> <Frame BorderColor="Black" Padding="2" Margin="10">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -45,8 +45,8 @@
</DataTemplate> </DataTemplate>
</BindableLayout.ItemTemplate> </BindableLayout.ItemTemplate>
</StackLayout>--> </StackLayout>-->
<StackLayout.GestureRecognizers> <ContentView.GestureRecognizers>
<ClickGestureRecognizer Command="{Binding PickerCommand, Source={x:Reference this}}" CommandParameter="{Binding ItemsSource, Source={x:Reference this}}" /> <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}}" /> <TapGestureRecognizer Command="{Binding PickerCommand, Source={x:Reference this}}" CommandParameter="{Binding ItemsSource, Source={x:Reference this}}" />
</StackLayout.GestureRecognizers> </ContentView.GestureRecognizers>
</StackLayout> </ContentView>

View file

@ -12,7 +12,7 @@ using Xamarin.Forms.Xaml;
namespace AideDeJeu.Views.Pickers namespace AideDeJeu.Views.Pickers
{ {
[XamlCompilation(XamlCompilationOptions.Compile)] [XamlCompilation(XamlCompilationOptions.Compile)]
public partial class ItemPickerView : StackLayout public partial class ItemPickerView : ContentView
{ {
public MainViewModel Main public MainViewModel Main
{ {
@ -76,7 +76,7 @@ namespace AideDeJeu.Views.Pickers
nameof(ItemsSource), nameof(ItemsSource),
typeof(System.Collections.IEnumerable), typeof(System.Collections.IEnumerable),
typeof(ItemPickerView), typeof(ItemPickerView),
default(System.Collections.IEnumerable)); defaultValue: null); // default(System.Collections.IEnumerable));
public ICommand PickerCommand public ICommand PickerCommand
{ {