Event details page basic layout.
This commit is contained in:
31
Wino.Calendar/Controls/CalendarItemCommandBarFlyout.cs
Normal file
31
Wino.Calendar/Controls/CalendarItemCommandBarFlyout.cs
Normal 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()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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" />
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user