Start Binding Layout
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
f22e8294fa
commit
210dd80a32
@ -1,76 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="Linaris.LocalFilesPage"
|
||||
xmlns:control="clr-namespace:Syncfusion.Maui.ProgressBar;assembly=Syncfusion.Maui.ProgressBar"
|
||||
xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders"
|
||||
xmlns:local="clr-namespace:Linaris"
|
||||
xmlns:manager="clr-namespace:Model;assembly=Model"
|
||||
x:Class="Linaris.LocalFilesPage"
|
||||
Title="LocalFilesPage"
|
||||
Style="{StaticResource PageFlyoutTrigger}">
|
||||
|
||||
<Grid Style="{StaticResource GridFlyoutTrigger}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="100"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Style="{StaticResource GridFlyoutTrigger}" RowDefinitions="*,100">
|
||||
<local:Layout Grid.Column="0"/>
|
||||
|
||||
<ScrollView Grid.Column="1" Grid.Row="0" BackgroundColor="#404040">
|
||||
|
||||
<VerticalStackLayout>
|
||||
|
||||
<SearchBar Style="{StaticResource SearchBar}"/>
|
||||
|
||||
<FlexLayout Direction="Row" AlignItems="Start" JustifyContent="SpaceAround" Wrap="Wrap">
|
||||
|
||||
<VerticalStackLayout Margin="10">
|
||||
<ImageButton Source="mp3.png" SemanticProperties.Description="MP3" Style="{StaticResource Pochette}"/>
|
||||
<Label Text="The Last Breath" Style="{StaticResource Titre}"></Label>
|
||||
</VerticalStackLayout>
|
||||
|
||||
<VerticalStackLayout Margin="10">
|
||||
<ImageButton Source="wav.png" SemanticProperties.Description="WAV" Style="{StaticResource Pochette}"/>
|
||||
<Label Text="Love" Style="{StaticResource Titre}"></Label>
|
||||
</VerticalStackLayout>
|
||||
|
||||
<VerticalStackLayout Margin="10">
|
||||
<ImageButton Source="ogg.png" SemanticProperties.Description="OGG" Style="{StaticResource Pochette}"/>
|
||||
<Label Text="Winter" Style="{StaticResource Titre}"></Label>
|
||||
</VerticalStackLayout>
|
||||
|
||||
<VerticalStackLayout Margin="10">
|
||||
<ImageButton Source="midi.png" SemanticProperties.Description="MIDI" Style="{StaticResource Pochette}"/>
|
||||
<Label Text="Croissant" Style="{StaticResource Titre}"></Label>
|
||||
</VerticalStackLayout>
|
||||
|
||||
<VerticalStackLayout Margin="10">
|
||||
<ImageButton Source="mp3.png" SemanticProperties.Description="MP3" Style="{StaticResource Pochette}"/>
|
||||
<Label Text="Fredo et Louis" Style="{StaticResource Titre}"></Label>
|
||||
</VerticalStackLayout>
|
||||
|
||||
<VerticalStackLayout Margin="10">
|
||||
<ImageButton Source="mp3.png" SemanticProperties.Description="MP3" Style="{StaticResource Pochette}"/>
|
||||
<Label Text="end" Style="{StaticResource Titre}"></Label>
|
||||
</VerticalStackLayout>
|
||||
|
||||
<VerticalStackLayout Margin="10">
|
||||
<ImageButton Source="wav.png" SemanticProperties.Description="WAV" Style="{StaticResource Pochette}"/>
|
||||
<Label Text="calm" Style="{StaticResource Titre}"></Label>
|
||||
</VerticalStackLayout>
|
||||
|
||||
<VerticalStackLayout Margin="10">
|
||||
<ImageButton Source="mp3.png" SemanticProperties.Description="MP3" Style="{StaticResource Pochette}"/>
|
||||
<Label Text="Lessgooo" Style="{StaticResource Titre}"></Label>
|
||||
</VerticalStackLayout>
|
||||
|
||||
<FlexLayout Direction="Row" AlignItems="Start" BindableLayout.ItemsSource="{Binding CustomTitles}" JustifyContent="SpaceAround" Wrap="Wrap">
|
||||
<BindableLayout.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<VerticalStackLayout Margin="10">
|
||||
<ImageButton Grid.Row="0" Source="{Binding ImageURL}" Style="{StaticResource Pochette}"/>
|
||||
<Label Grid.Row="1" Text="{Binding Name}" Style="{StaticResource Titre}"/>
|
||||
</VerticalStackLayout>
|
||||
</DataTemplate>
|
||||
</BindableLayout.ItemTemplate>
|
||||
</FlexLayout>
|
||||
|
||||
<Button WidthRequest="300" HeightRequest="50" Margin="0,20,0,20" BackgroundColor="{StaticResource Primary}" Text="Ajouter d'autres titres" Clicked="AddCustomTitle"/>
|
||||
</VerticalStackLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<local:FooterPage Grid.Row="1" Grid.ColumnSpan="2"/>
|
||||
|
||||
</Grid>
|
||||
</ContentPage>
|
@ -1,9 +1,29 @@
|
||||
using Model;
|
||||
using Model.Serialization;
|
||||
using Model.Stub;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace Linaris;
|
||||
|
||||
public partial class LocalFilesPage : ContentPage
|
||||
{
|
||||
|
||||
private ObservableCollection<CustomTitle> customTitles = App.Manager.GetCustomTitles();
|
||||
|
||||
public ObservableCollection<CustomTitle> CustomTitles
|
||||
{
|
||||
get => customTitles;
|
||||
}
|
||||
|
||||
public LocalFilesPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
BindingContext = this;
|
||||
}
|
||||
|
||||
void AddCustomTitle(object sender, EventArgs e)
|
||||
{
|
||||
App.Manager.AddCustomTitle(new CustomTitle());
|
||||
customTitles = App.Manager.GetCustomTitles();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in new issue