Gui Changes
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
x:Class="Jugenddienst_Stunden.Views.AllNotesPage"
|
||||
Title="Deine Notizen"
|
||||
NavigatedTo="ContentPage_NavigatedTo">
|
||||
|
||||
<ContentPage.BindingContext>
|
||||
<viewModels:NotesViewModel />
|
||||
</ContentPage.BindingContext>
|
||||
@@ -14,28 +15,32 @@
|
||||
<ToolbarItem Text="Add" Command="{Binding NewCommand}" IconImageSource="{FontImage Glyph='+', Color=Black, Size=22}" />
|
||||
</ContentPage.ToolbarItems>
|
||||
|
||||
<Label Text="Werden nur lokal gespeichert"/>
|
||||
<!-- Display notes in a list -->
|
||||
<CollectionView x:Name="notesCollection"
|
||||
<VerticalStackLayout>
|
||||
<Label Text="Werden nur lokal gespeichert"/>
|
||||
|
||||
<!-- Display notes in a list -->
|
||||
<CollectionView x:Name="notesCollection"
|
||||
ItemsSource="{Binding AllNotes}"
|
||||
Margin="20"
|
||||
SelectionMode="Single"
|
||||
SelectionChangedCommand="{Binding SelectNoteCommand}"
|
||||
SelectionChangedCommandParameter="{Binding Source={RelativeSource Self}, Path=SelectedItem}">
|
||||
|
||||
<!-- Designate how the collection of items are laid out -->
|
||||
<CollectionView.ItemsLayout>
|
||||
<LinearItemsLayout Orientation="Vertical" ItemSpacing="10" />
|
||||
</CollectionView.ItemsLayout>
|
||||
<!-- Designate how the collection of items are laid out -->
|
||||
<CollectionView.ItemsLayout>
|
||||
<LinearItemsLayout Orientation="Vertical" ItemSpacing="10" />
|
||||
</CollectionView.ItemsLayout>
|
||||
|
||||
<!-- Define the appearance of each item in the list -->
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackLayout>
|
||||
<Label Text="{Binding Text}" FontSize="22"/>
|
||||
<Label Text="{Binding Date}" FontSize="14" TextColor="Silver"/>
|
||||
</StackLayout>
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
</CollectionView>
|
||||
<!-- Define the appearance of each item in the list -->
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackLayout>
|
||||
<Label Text="{Binding Text}" FontSize="22"/>
|
||||
<Label Text="{Binding Date}" FontSize="14" TextColor="Silver"/>
|
||||
</StackLayout>
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
</CollectionView>
|
||||
|
||||
</VerticalStackLayout>
|
||||
</ContentPage>
|
||||
@@ -3,16 +3,16 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:models="clr-namespace:Jugenddienst_Stunden.ViewModels"
|
||||
x:Class="Jugenddienst_Stunden.Views.StundePage"
|
||||
Title="StundePage">
|
||||
Title="Eintrag bearbeiten">
|
||||
|
||||
<ContentPage.BindingContext>
|
||||
<models:StundeViewModel />
|
||||
</ContentPage.BindingContext>
|
||||
|
||||
<VerticalStackLayout Spacing="10" Margin="10">
|
||||
|
||||
<Label Text="{Binding SubTitle}" />
|
||||
|
||||
<Grid Padding="15,10,0,10">
|
||||
<Grid Padding="5,10,5,10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -29,11 +29,11 @@
|
||||
|
||||
<!--<Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding Stunde.description}" Padding="0,0,0,5"/>-->
|
||||
|
||||
<Editor Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Placeholder="Beschreibung" Text="{Binding Stunde.description}" HeightRequest="40" />
|
||||
<Editor Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Placeholder="Beschreibung" Text="{Binding Stunde.description}" MinimumHeightRequest="40" AutoSize="TextChanges" />
|
||||
</Grid>
|
||||
|
||||
<Grid ColumnDefinitions="*,*" ColumnSpacing="4">
|
||||
<Button Text="Save" Clicked="GetDayTime" />
|
||||
<Button Text="Save" />
|
||||
|
||||
<Button Grid.Column="1"
|
||||
Text="Delete" />
|
||||
|
||||
@@ -6,23 +6,8 @@ namespace Jugenddienst_Stunden.Views;
|
||||
public partial class StundePage : ContentPage
|
||||
{
|
||||
|
||||
private DayTime _stunde;
|
||||
|
||||
public StundePage()
|
||||
{
|
||||
//GetDayTime();
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
|
||||
private async void GetDayTime() {
|
||||
_stunde = await Models.Stunde.LoadEntry(4096);
|
||||
//_stunde = new DayTime();
|
||||
//_stunde.description = "asd";
|
||||
//StundeDescription.Text = _stunde.description;
|
||||
}
|
||||
|
||||
private void GetDayTime(object sender, EventArgs e) {
|
||||
GetDayTime();
|
||||
}
|
||||
}
|
||||
@@ -10,14 +10,12 @@
|
||||
</ContentPage.BindingContext>
|
||||
|
||||
<ContentPage.ToolbarItems>
|
||||
<ToolbarItem Text="Add" Command="{Binding NewCommand}" IconImageSource="{FontImage Glyph='+', Color=Black, Size=22}" />
|
||||
<ToolbarItem Text="Add" Command="{Binding NewEntryCommand}" IconImageSource="{FontImage Glyph='+', Color=Black, Size=22}" />
|
||||
</ContentPage.ToolbarItems>
|
||||
|
||||
<ScrollView Margin="5">
|
||||
|
||||
<VerticalStackLayout Spacing="10" Margin="10">
|
||||
|
||||
|
||||
|
||||
<Grid RowDefinitions="Auto" ColumnDefinitions="Auto,*">
|
||||
<DatePicker Grid.Column="0" MinimumDate="{Binding MinimumDate}"
|
||||
MaximumDate="{Binding MaximumDate}"
|
||||
@@ -27,10 +25,10 @@
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
|
||||
<CollectionView
|
||||
ItemsSource="{Binding DayTimes}"
|
||||
x:Name="stundeItems" Margin="0"
|
||||
HeightRequest="350"
|
||||
SelectionMode="Single"
|
||||
SelectionChangedCommand="{Binding SelectEntryCommand}"
|
||||
SelectionChangedCommandParameter="{Binding Source={RelativeSource Self}, Path=SelectedItem}">
|
||||
@@ -41,7 +39,7 @@
|
||||
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Padding="15,10,0,0">
|
||||
<Grid Padding="5,10,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -115,5 +113,5 @@
|
||||
|
||||
|
||||
</VerticalStackLayout>
|
||||
</ScrollView>
|
||||
|
||||
</ContentPage>
|
||||
Reference in New Issue
Block a user