Displaying events and all-day events.
This commit is contained in:
@@ -18,7 +18,8 @@
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Bind Item.Title, Mode=OneWay}" />
|
||||
Text="{x:Bind Item.Title, Mode=OneWay}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
<ResourceDictionary
|
||||
x:Class="Wino.Calendar.Styles.DayColumnControlResources"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:Wino.Calendar.Controls">
|
||||
|
||||
xmlns:controls="using:Wino.Calendar.Controls"
|
||||
xmlns:data="using:Wino.Calendar.ViewModels.Data"
|
||||
xmlns:interfaces="using:Wino.Core.Domain.Interfaces"
|
||||
xmlns:local="using:Wino.Calendar.Styles">
|
||||
<!-- Top column header DayColumnControl -->
|
||||
<Style TargetType="controls:DayColumnControl">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="controls:DayColumnControl">
|
||||
<Grid MinHeight="100" MaxHeight="150">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="25" />
|
||||
<RowDefinition Height="7" />
|
||||
@@ -62,11 +65,20 @@
|
||||
<!-- Extras -->
|
||||
<StackPanel Grid.Column="1" HorizontalAlignment="Right" />
|
||||
|
||||
<!-- Events -->
|
||||
<!-- All-Day Events -->
|
||||
<ScrollViewer
|
||||
Grid.Row="1"
|
||||
Grid.ColumnSpan="2"
|
||||
VerticalScrollBarVisibility="Hidden" />
|
||||
VerticalScrollBarVisibility="Hidden">
|
||||
<ItemsControl ItemsSource="{Binding EventsCollection.AllDayEvents, Mode=OneWay}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<!-- All-Day Event template -->
|
||||
<DataTemplate x:DataType="interfaces:ICalendarItem">
|
||||
<TextBlock Text="{x:Bind Title}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
@@ -89,5 +101,4 @@
|
||||
</Style>
|
||||
|
||||
|
||||
|
||||
</ResourceDictionary>
|
||||
12
Wino.Calendar/Styles/DayColumnControlResources.xaml.cs
Normal file
12
Wino.Calendar/Styles/DayColumnControlResources.xaml.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Windows.UI.Xaml;
|
||||
|
||||
namespace Wino.Calendar.Styles
|
||||
{
|
||||
partial class DayColumnControlResources : ResourceDictionary
|
||||
{
|
||||
public DayColumnControlResources()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,10 @@
|
||||
ItemsSource="{x:Bind CalendarDays}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate x:DataType="models:CalendarDayModel">
|
||||
<controls:DayColumnControl DayModel="{x:Bind}" />
|
||||
<controls:DayColumnControl
|
||||
MinHeight="100"
|
||||
MaxHeight="200"
|
||||
DayModel="{x:Bind}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
<ItemsControl.ItemsPanel>
|
||||
|
||||
Reference in New Issue
Block a user