Event details page basic layout.

This commit is contained in:
Burak Kaan Köse
2025-01-14 00:53:54 +01:00
parent 10b0b1e96e
commit 56d6c22d53
27 changed files with 618 additions and 30 deletions

View File

@@ -0,0 +1,31 @@
using Microsoft.UI.Xaml.Controls;
using Windows.UI.Xaml;
using Wino.Calendar.ViewModels.Data;
namespace Wino.Calendar.Controls
{
public class CalendarItemCommandBarFlyout : CommandBarFlyout
{
public static readonly DependencyProperty ItemProperty = DependencyProperty.Register(nameof(Item), typeof(CalendarItemViewModel), typeof(CalendarItemCommandBarFlyout), new PropertyMetadata(null, new PropertyChangedCallback(OnItemChanged)));
public CalendarItemViewModel Item
{
get { return (CalendarItemViewModel)GetValue(ItemProperty); }
set { SetValue(ItemProperty, value); }
}
private static void OnItemChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
if (d is CalendarItemCommandBarFlyout flyout)
{
flyout.UpdateMenuItems();
}
}
private void UpdateMenuItems()
{
}
}
}

View File

@@ -7,6 +7,7 @@
xmlns:helpers="using:Wino.Helpers"
xmlns:local="using:Wino.Calendar.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
d:DesignHeight="300"
d:DesignWidth="400"
CanDrag="True"
@@ -27,11 +28,12 @@
</Grid.ColumnDefinitions>
<Grid.ContextFlyout>
<MenuFlyout Opened="ContextFlyoutOpened">
<MenuFlyoutItem Text="as" />
<MenuFlyoutItem Text="as" />
<MenuFlyoutItem Text="as" />
</MenuFlyout>
<local:CalendarItemCommandBarFlyout Placement="Top">
<local:CalendarItemCommandBarFlyout.PrimaryCommands>
<AppBarButton Icon="Save" Label="save" />
<AppBarButton Icon="Delete" Label="Delet" />
</local:CalendarItemCommandBarFlyout.PrimaryCommands>
</local:CalendarItemCommandBarFlyout>
</Grid.ContextFlyout>
<Grid
@@ -143,7 +145,6 @@
<VisualState x:Name="MultiDayEvent">
<VisualState.Setters>
<Setter Target="MainGrid.CornerRadius" Value="0" />
<Setter Target="MainBackground.Opacity" Value="0.2" />
<Setter Target="MainGrid.IsHitTestVisible" Value="False" />

View File

@@ -194,11 +194,5 @@ namespace Wino.Calendar.Controls
WeakReferenceMessenger.Default.Send(new CalendarItemRightTappedMessage(CalendarItem));
}
private void ContextFlyoutOpened(object sender, object e)
{
if (CalendarItem == null) return;
}
}
}