328 lines
40 KiB
XML
328 lines
40 KiB
XML
<abstract:CalendarSettingsPageAbstract
|
|
x:Class="Wino.Mail.WinUI.Views.Calendar.CalendarSettingsPage"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:abstract="using:Wino.Mail.WinUI.Views.Abstract"
|
|
xmlns:calendarViewModels="using:Wino.Calendar.ViewModels"
|
|
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
|
|
xmlns:controls1="using:Microsoft.UI.Xaml.Controls"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:data="using:Wino.Calendar.ViewModels.Data"
|
|
xmlns:domain="using:Wino.Core.Domain"
|
|
xmlns:entities="using:Wino.Core.Domain.Entities.Shared"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:toolkitExt="using:CommunityToolkit.WinUI"
|
|
x:Name="Root"
|
|
mc:Ignorable="d">
|
|
|
|
<Grid>
|
|
<StackPanel>
|
|
<!-- First day of week -->
|
|
<controls:SettingsCard Description="Adjust the day that week starts." Header="First day of week">
|
|
<controls:SettingsCard.HeaderIcon>
|
|
<PathIcon Data="F1 M 16.328125 2.5 C 16.816406 2.5 17.283527 2.599285 17.729492 2.797852 C 18.175455 2.99642 18.56608 3.263348 18.901367 3.598633 C 19.236652 3.93392 19.50358 4.324545 19.702148 4.770508 C 19.900715 5.216473 20 5.683595 20 6.171875 L 20 13.828125 C 20 14.316406 19.900715 14.783529 19.702148 15.229492 C 19.50358 15.675456 19.236652 16.066082 18.901367 16.401367 C 18.56608 16.736654 18.175455 17.00358 17.729492 17.202148 C 17.283527 17.400717 16.816406 17.5 16.328125 17.5 L 3.671875 17.5 C 3.183594 17.5 2.716471 17.400717 2.270508 17.202148 C 1.824544 17.00358 1.433919 16.736654 1.098633 16.401367 C 0.763346 16.066082 0.496419 15.675456 0.297852 15.229492 C 0.099284 14.783529 0 14.316406 0 13.828125 L 0 6.171875 C 0 5.683595 0.099284 5.216473 0.297852 4.770508 C 0.496419 4.324545 0.763346 3.93392 1.098633 3.598633 C 1.433919 3.263348 1.824544 2.99642 2.270508 2.797852 C 2.716471 2.599285 3.183594 2.5 3.671875 2.5 Z M 18.75 6.201172 C 18.75 5.875651 18.683268 5.564779 18.549805 5.268555 C 18.41634 4.972332 18.237305 4.711915 18.012695 4.487305 C 17.788086 4.262696 17.527668 4.08366 17.231445 3.950195 C 16.935221 3.816732 16.624348 3.75 16.298828 3.75 L 3.701172 3.75 C 3.375651 3.75 3.064779 3.816732 2.768555 3.950195 C 2.472331 4.08366 2.211914 4.262696 1.987305 4.487305 C 1.762695 4.711915 1.583659 4.972332 1.450195 5.268555 C 1.316732 5.564779 1.25 5.875651 1.25 6.201172 L 1.25 13.798828 C 1.25 14.130859 1.318359 14.446615 1.455078 14.746094 C 1.591797 15.045573 1.774089 15.30599 2.001953 15.527344 C 2.229818 15.748698 2.495117 15.924479 2.797852 16.054688 C 3.100586 16.184896 3.417969 16.25 3.75 16.25 L 3.75 8.125 C 3.75 7.871094 3.798828 7.630209 3.896484 7.402344 C 3.99414 7.174479 4.129231 6.974284 4.301758 6.801758 C 4.474284 6.629232 4.674479 6.494141 4.902344 6.396484 C 5.130208 6.298828 5.371094 6.25 5.625 6.25 L 14.375 6.25 C 14.628906 6.25 14.869791 6.298828 15.097656 6.396484 C 15.32552 6.494141 15.525715 6.629232 15.698242 6.801758 C 15.870768 6.974284 16.005859 7.174479 16.103516 7.402344 C 16.201172 7.630209 16.25 7.871094 16.25 8.125 L 16.25 16.25 L 16.298828 16.25 C 16.624348 16.25 16.935221 16.18327 17.231445 16.049805 C 17.527668 15.916342 17.788086 15.737305 18.012695 15.512695 C 18.237305 15.288086 18.41634 15.02767 18.549805 14.731445 C 18.683268 14.435222 18.75 14.12435 18.75 13.798828 Z M 15 16.25 L 15 8.125 C 14.999999 7.95573 14.93815 7.809246 14.814453 7.685547 C 14.690755 7.56185 14.544271 7.5 14.375 7.5 L 5.625 7.5 C 5.455729 7.5 5.309245 7.56185 5.185547 7.685547 C 5.061849 7.809246 5 7.95573 5 8.125 L 5 16.25 Z M 9.0625 9.6875 C 9.0625 9.947917 8.971354 10.169271 8.789062 10.351562 C 8.606771 10.533854 8.385416 10.625 8.125 10.625 C 7.864583 10.625 7.643229 10.533854 7.460938 10.351562 C 7.278646 10.169271 7.1875 9.947917 7.1875 9.6875 C 7.1875 9.427084 7.278646 9.205729 7.460938 9.023438 C 7.643229 8.841146 7.864583 8.75 8.125 8.75 C 8.385416 8.75 8.606771 8.841146 8.789062 9.023438 C 8.971354 9.205729 9.0625 9.427084 9.0625 9.6875 Z M 12.8125 9.6875 C 12.8125 9.947917 12.721354 10.169271 12.539062 10.351562 C 12.356771 10.533854 12.135416 10.625 11.875 10.625 C 11.614583 10.625 11.393229 10.533854 11.210938 10.351562 C 11.028646 10.169271 10.9375 9.947917 10.9375 9.6875 C 10.9375 9.427084 11.028646 9.205729 11.210938 9.023438 C 11.393229 8.841146 11.614583 8.75 11.875 8.75 C 12.135416 8.75 12.356771 8.841146 12.539062 9.023438 C 12.721354 9.205729 12.8125 9.427084 12.8125 9.6875 Z M 9.0625 13.4375 C 9.0625 13.697917 8.971354 13.919271 8.789062 14.101562 C 8.606771 14.283854 8.385416 14.375 8.125 14.375 C 7.864583 14.375 7.643229 14.283854 7.460938 14.101562 C 7.278646 13.919271 7.1875 13.697917 7.1875 13.4375 C 7.1875 13.177084 7.278646 12.955729 7.460938 12.773438 C 7.643229 12.591146 7.864583 12.5 8.125 12.5 C 8.385416 12.5 8.606771 12.591146 8.789062 12.773438 C 8.971354 12.955729 9.0625 13.177084 9.0625 13.4375 Z M 12.8125 13.4375 C 12.8125 13.697917 12.721354 13.919271 12.539062 14.101562 C 12.356771 14.283854 12.135416 14.375 11.875 14.375 C 11.614583 14.375 11.393229 14.283854 11.210938 14.101562 C 11.028646 13.919271 10.9375 13.697917 10.9375 13.4375 C 10.9375 13.177084 11.028646 12.955729 11.210938 12.773438 C 11.393229 12.591146 11.614583 12.5 11.875 12.5 C 12.135416 12.5 12.356771 12.591146 12.539062 12.773438 C 12.721354 12.955729 12.8125 13.177084 12.8125 13.4375 Z " />
|
|
</controls:SettingsCard.HeaderIcon>
|
|
<controls:SettingsCard.Content>
|
|
<ComboBox ItemsSource="{x:Bind ViewModel.DayNames, Mode=OneWay}" SelectedIndex="{x:Bind ViewModel.SelectedFirstDayOfWeekIndex, Mode=TwoWay}" />
|
|
</controls:SettingsCard.Content>
|
|
</controls:SettingsCard>
|
|
|
|
<!-- Working days/hours -->
|
|
<controls:SettingsExpander Description="Set the day range for your working hours." Header="Working days">
|
|
<controls:SettingsExpander.HeaderIcon>
|
|
<PathIcon Data="F1 M 18.75 8.056641 L 18.75 14.443359 C 18.75 14.853516 18.666992 15.244141 18.500977 15.615234 C 18.334961 15.986328 18.113605 16.310221 17.836914 16.586914 C 17.560221 16.863607 17.236328 17.084961 16.865234 17.250977 C 16.494141 17.416992 16.103516 17.5 15.693359 17.5 L 4.306641 17.5 C 3.896484 17.5 3.505859 17.416992 3.134766 17.250977 C 2.763672 17.084961 2.439779 16.863607 2.163086 16.586914 C 1.886393 16.310221 1.665039 15.986328 1.499023 15.615234 C 1.333008 15.244141 1.25 14.853516 1.25 14.443359 L 1.25 8.056641 C 1.25 7.633464 1.334635 7.236328 1.503906 6.865234 C 1.673177 6.494141 1.901042 6.170248 2.1875 5.893555 C 2.473958 5.616862 2.80599 5.398764 3.183594 5.239258 C 3.561198 5.079754 3.958333 5.000001 4.375 5 L 6.25 5 L 6.25 2.5 C 6.25 2.324219 6.282552 2.161459 6.347656 2.011719 C 6.41276 1.86198 6.502278 1.730145 6.616211 1.616211 C 6.730143 1.502279 6.861979 1.412762 7.011719 1.347656 C 7.161458 1.282553 7.324218 1.25 7.5 1.25 L 12.5 1.25 C 12.675781 1.25 12.840169 1.282553 12.993164 1.347656 C 13.146158 1.412762 13.277994 1.500652 13.388672 1.611328 C 13.499349 1.722006 13.587239 1.853842 13.652344 2.006836 C 13.717447 2.159832 13.75 2.324219 13.75 2.5 L 13.75 5 L 15.693359 5 C 16.103516 5.000001 16.494141 5.083009 16.865234 5.249023 C 17.236328 5.41504 17.560221 5.636395 17.836914 5.913086 C 18.113605 6.189779 18.334961 6.513672 18.500977 6.884766 C 18.666992 7.255859 18.75 7.646484 18.75 8.056641 Z M 12.5 2.5 L 7.5 2.5 L 7.5 5 L 12.5 5 Z M 17.5 8.125 C 17.5 7.871094 17.451172 7.630209 17.353516 7.402344 C 17.255859 7.174479 17.120768 6.974284 16.948242 6.801758 C 16.775715 6.629232 16.57552 6.494141 16.347656 6.396484 C 16.119791 6.298828 15.878906 6.25 15.625 6.25 L 4.375 6.25 C 4.121094 6.25 3.880208 6.298828 3.652344 6.396484 C 3.424479 6.494141 3.224284 6.629232 3.051758 6.801758 C 2.879232 6.974284 2.744141 7.174479 2.646484 7.402344 C 2.548828 7.630209 2.5 7.871094 2.5 8.125 L 2.5 14.375 C 2.5 14.628906 2.548828 14.869792 2.646484 15.097656 C 2.744141 15.325521 2.879232 15.525717 3.051758 15.698242 C 3.224284 15.870769 3.424479 16.005859 3.652344 16.103516 C 3.880208 16.201172 4.121094 16.25 4.375 16.25 L 15.625 16.25 C 15.878906 16.25 16.119791 16.201172 16.347656 16.103516 C 16.57552 16.005859 16.775715 15.870769 16.948242 15.698242 C 17.120768 15.525717 17.255859 15.325521 17.353516 15.097656 C 17.451172 14.869792 17.5 14.628906 17.5 14.375 Z " />
|
|
</controls:SettingsExpander.HeaderIcon>
|
|
|
|
<controls:SettingsExpander.Items>
|
|
<controls:SettingsCard
|
|
HorizontalContentAlignment="Stretch"
|
|
VerticalContentAlignment="Stretch"
|
|
ContentAlignment="Vertical">
|
|
<Grid RowSpacing="12">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="50" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontWeight="Bold"
|
|
Text="From" />
|
|
<ComboBox
|
|
Grid.Column="1"
|
|
ItemsSource="{x:Bind ViewModel.DayNames, Mode=OneWay}"
|
|
SelectedIndex="{x:Bind ViewModel.WorkingDayStartIndex, Mode=TwoWay}" />
|
|
<TimePicker
|
|
x:Name="WorkHourStartPicker"
|
|
Grid.Column="2"
|
|
Margin="12,0"
|
|
Time="{x:Bind ViewModel.WorkingHourStart, Mode=TwoWay}" />
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="50" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
FontWeight="Bold"
|
|
Text="To" />
|
|
<ComboBox
|
|
Grid.Column="1"
|
|
ItemsSource="{x:Bind ViewModel.DayNames, Mode=OneWay}"
|
|
SelectedIndex="{x:Bind ViewModel.WorkingDayEndIndex, Mode=TwoWay}" />
|
|
|
|
<TimePicker
|
|
x:Name="WorkEndStartPicker"
|
|
Grid.Column="2"
|
|
Margin="12,0"
|
|
Time="{x:Bind ViewModel.WorkingHourEnd, Mode=TwoWay}" />
|
|
</Grid>
|
|
</Grid>
|
|
</controls:SettingsCard>
|
|
</controls:SettingsExpander.Items>
|
|
</controls:SettingsExpander>
|
|
|
|
<!-- Cell hour height -->
|
|
<controls:SettingsExpander
|
|
Description="Adjust calendar timeline rendering options."
|
|
Header="Calendar rendering"
|
|
IsExpanded="True">
|
|
<controls:SettingsExpander.HeaderIcon>
|
|
<PathIcon Data="F1 M 15.078125 1.25 C 15.566406 1.25 16.033527 1.349285 16.479492 1.547852 C 16.925455 1.74642 17.31608 2.013348 17.651367 2.348633 C 17.986652 2.68392 18.25358 3.074545 18.452148 3.520508 C 18.650715 3.966473 18.75 4.433594 18.75 4.921875 L 18.75 15.078125 C 18.75 15.566406 18.650715 16.033529 18.452148 16.479492 C 18.25358 16.925455 17.986652 17.31608 17.651367 17.651367 C 17.31608 17.986654 16.925455 18.25358 16.479492 18.452148 C 16.033527 18.650717 15.566406 18.75 15.078125 18.75 L 4.921875 18.75 C 4.433594 18.75 3.966471 18.650717 3.520508 18.452148 C 3.074544 18.25358 2.683919 17.986654 2.348633 17.651367 C 2.013346 17.31608 1.746419 16.925455 1.547852 16.479492 C 1.349284 16.033529 1.25 15.566406 1.25 15.078125 L 1.25 4.921875 C 1.25 4.433594 1.349284 3.966473 1.547852 3.520508 C 1.746419 3.074545 2.013346 2.68392 2.348633 2.348633 C 2.683919 2.013348 3.074544 1.74642 3.520508 1.547852 C 3.966471 1.349285 4.433594 1.25 4.921875 1.25 Z M 4.951172 2.5 C 4.625651 2.5 4.314778 2.566732 4.018555 2.700195 C 3.722331 2.83366 3.461914 3.012695 3.237305 3.237305 C 3.012695 3.461914 2.833659 3.722332 2.700195 4.018555 C 2.566732 4.314779 2.5 4.625651 2.5 4.951172 L 2.5 5 L 17.5 5 L 17.5 4.951172 C 17.5 4.625651 17.433268 4.314779 17.299805 4.018555 C 17.16634 3.722332 16.987305 3.461914 16.762695 3.237305 C 16.538086 3.012695 16.277668 2.83366 15.981445 2.700195 C 15.685221 2.566732 15.374349 2.5 15.048828 2.5 Z M 15.048828 17.5 C 15.374349 17.5 15.685221 17.433268 15.981445 17.299805 C 16.277668 17.166342 16.538086 16.987305 16.762695 16.762695 C 16.987305 16.538086 17.16634 16.27767 17.299805 15.981445 C 17.433268 15.685222 17.5 15.37435 17.5 15.048828 L 17.5 6.25 L 2.5 6.25 L 2.5 15.048828 C 2.5 15.37435 2.566732 15.685222 2.700195 15.981445 C 2.833659 16.27767 3.012695 16.538086 3.237305 16.762695 C 3.461914 16.987305 3.722331 17.166342 4.018555 17.299805 C 4.314778 17.433268 4.625651 17.5 4.951172 17.5 Z M 16.25 9.375 C 16.25 9.544271 16.18815 9.690756 16.064453 9.814453 C 15.940754 9.938151 15.79427 10 15.625 10 L 13.642578 10 C 13.577474 10.188803 13.486328 10.359701 13.369141 10.512695 C 13.251953 10.66569 13.115234 10.797526 12.958984 10.908203 C 12.802734 11.018881 12.633463 11.103516 12.451172 11.162109 C 12.26888 11.220703 12.076822 11.25 11.875 11.25 C 11.673177 11.25 11.481119 11.220703 11.298828 11.162109 C 11.116536 11.103516 10.947266 11.018881 10.791016 10.908203 C 10.634766 10.797526 10.498047 10.66569 10.380859 10.512695 C 10.263672 10.359701 10.172525 10.188803 10.107422 10 L 4.375 10 C 4.205729 10 4.059245 9.938151 3.935547 9.814453 C 3.811849 9.690756 3.75 9.544271 3.75 9.375 C 3.75 9.205729 3.811849 9.059245 3.935547 8.935547 C 4.059245 8.81185 4.205729 8.75 4.375 8.75 L 10.107422 8.75 C 10.172525 8.561198 10.263672 8.3903 10.380859 8.237305 C 10.498047 8.084311 10.634766 7.952475 10.791016 7.841797 C 10.947266 7.73112 11.116536 7.646484 11.298828 7.587891 C 11.481119 7.529297 11.673177 7.5 11.875 7.5 C 12.076822 7.5 12.26888 7.529297 12.451172 7.587891 C 12.633463 7.646484 12.802734 7.73112 12.958984 7.841797 C 13.115234 7.952475 13.251953 8.084311 13.369141 8.237305 C 13.486328 8.3903 13.577474 8.561198 13.642578 8.75 L 15.625 8.75 C 15.79427 8.75 15.940754 8.81185 16.064453 8.935547 C 16.18815 9.059245 16.25 9.205729 16.25 9.375 Z M 16.25 14.375 C 16.25 14.544271 16.18815 14.690756 16.064453 14.814453 C 15.940754 14.938151 15.79427 15 15.625 15 L 9.892578 15 C 9.827474 15.188803 9.736328 15.359701 9.619141 15.512695 C 9.501953 15.66569 9.365234 15.797526 9.208984 15.908203 C 9.052734 16.018881 8.883463 16.103516 8.701172 16.162109 C 8.51888 16.220703 8.326822 16.25 8.125 16.25 C 7.923177 16.25 7.731119 16.220703 7.548828 16.162109 C 7.366536 16.103516 7.197266 16.018881 7.041016 15.908203 C 6.884766 15.797526 6.748047 15.66569 6.630859 15.512695 C 6.513672 15.359701 6.422526 15.188803 6.357422 15 L 4.375 15 C 4.205729 15 4.059245 14.938151 3.935547 14.814453 C 3.811849 14.690756 3.75 14.544271 3.75 14.375 C 3.75 14.205729 3.811849 14.059245 3.935547 13.935547 C 4.059245 13.81185 4.205729 13.75 4.375 13.75 L 6.357422 13.75 C 6.422526 13.561198 6.513672 13.3903 6.630859 13.237305 C 6.748047 13.084311 6.884766 12.952475 7.041016 12.841797 C 7.197266 12.73112 7.366536 12.646484 7.548828 12.587891 C 7.731119 12.529297 7.923177 12.5 8.125 12.5 C 8.326822 12.5 8.51888 12.529297 8.701172 12.587891 C 8.883463 12.646484 9.052734 12.73112 9.208984 12.841797 C 9.365234 12.952475 9.501953 13.084311 9.619141 13.237305 C 9.736328 13.3903 9.827474 13.561198 9.892578 13.75 L 15.625 13.75 C 15.79427 13.75 15.940754 13.81185 16.064453 13.935547 C 16.18815 14.059245 16.25 14.205729 16.25 14.375 Z " />
|
|
</controls:SettingsExpander.HeaderIcon>
|
|
|
|
<controls:SettingsExpander.Items>
|
|
<controls:SettingsCard
|
|
HorizontalContentAlignment="Stretch"
|
|
VerticalContentAlignment="Stretch"
|
|
ContentAlignment="Vertical"
|
|
Description="How many pixels should 1 hour representation occupy in daily/weekly calendars."
|
|
Header="Hour height">
|
|
<controls:SettingsCard.HeaderIcon>
|
|
<PathIcon Data="F1 M 4.921875 18.75 C 4.433594 18.75 3.966471 18.650717 3.520508 18.452148 C 3.074544 18.25358 2.683919 17.986654 2.348633 17.651367 C 2.013346 17.31608 1.746419 16.925455 1.547852 16.479492 C 1.349284 16.033529 1.25 15.566406 1.25 15.078125 L 1.25 4.921875 C 1.25 4.433594 1.349284 3.966473 1.547852 3.520508 C 1.746419 3.074545 2.013346 2.68392 2.348633 2.348633 C 2.683919 2.013348 3.074544 1.74642 3.520508 1.547852 C 3.966471 1.349285 4.433594 1.25 4.921875 1.25 L 15.078125 1.25 C 15.566406 1.25 16.033527 1.349285 16.479492 1.547852 C 16.925455 1.74642 17.31608 2.013348 17.651367 2.348633 C 17.986652 2.68392 18.25358 3.074545 18.452148 3.520508 C 18.650715 3.966473 18.75 4.433594 18.75 4.921875 L 18.75 15.078125 C 18.75 15.566406 18.650715 16.033529 18.452148 16.479492 C 18.25358 16.925455 17.986652 17.31608 17.651367 17.651367 C 17.31608 17.986654 16.925455 18.25358 16.479492 18.452148 C 16.033527 18.650717 15.566406 18.75 15.078125 18.75 Z M 2.5 10 L 17.5 10 L 17.5 4.951172 C 17.5 4.625651 17.433268 4.314779 17.299805 4.018555 C 17.16634 3.722332 16.987305 3.461914 16.762695 3.237305 C 16.538086 3.012695 16.277668 2.83366 15.981445 2.700195 C 15.685221 2.566732 15.374349 2.5 15.048828 2.5 L 4.951172 2.5 C 4.625651 2.5 4.314778 2.566732 4.018555 2.700195 C 3.722331 2.83366 3.461914 3.012695 3.237305 3.237305 C 3.012695 3.461914 2.833659 3.722332 2.700195 4.018555 C 2.566732 4.314779 2.5 4.625651 2.5 4.951172 Z " />
|
|
</controls:SettingsCard.HeaderIcon>
|
|
<Grid
|
|
Padding="0,20"
|
|
ColumnSpacing="12"
|
|
RowSpacing="12">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Margin="0,5,0,0" VerticalAlignment="Top">
|
|
<Run Text="{x:Bind ViewModel.CellHourHeight, Mode=OneWay}" />
|
|
<Run Text="px" />
|
|
</TextBlock>
|
|
|
|
<Slider
|
|
x:Name="HourCellSlider"
|
|
Grid.Column="1"
|
|
Maximum="200"
|
|
Minimum="60"
|
|
Value="{x:Bind ViewModel.CellHourHeight, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" />
|
|
|
|
<!-- Hour cell demo -->
|
|
<Grid
|
|
Grid.Column="2"
|
|
HorizontalAlignment="Center"
|
|
ColumnSpacing="6">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock HorizontalAlignment="Right" Text="00:00" />
|
|
<TextBlock
|
|
Grid.Row="2"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Bottom"
|
|
Text="01:00" />
|
|
<Grid
|
|
Grid.Column="1"
|
|
Width="100"
|
|
Height="{x:Bind HourCellSlider.Value, Mode=OneWay}"
|
|
VerticalAlignment="Center"
|
|
BorderBrush="Black"
|
|
BorderThickness="1">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="1" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
<Rectangle
|
|
Grid.Row="1"
|
|
HorizontalAlignment="Stretch"
|
|
Stroke="Black"
|
|
StrokeThickness="0.5" />
|
|
|
|
</Grid>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
</controls:SettingsCard>
|
|
<controls:SettingsCard Description="Set whether you want to use AM/PM or 24 hour clock identifier." Header="Clock identifier for headers">
|
|
<controls:SettingsCard.HeaderIcon>
|
|
<PathIcon Data="F1 M 4.921875 18.75 C 4.433594 18.75 3.966471 18.650717 3.520508 18.452148 C 3.074544 18.25358 2.683919 17.986654 2.348633 17.651367 C 2.013346 17.31608 1.746419 16.925455 1.547852 16.479492 C 1.349284 16.033529 1.25 15.566406 1.25 15.078125 L 1.25 4.921875 C 1.25 4.433594 1.349284 3.966473 1.547852 3.520508 C 1.746419 3.074545 2.013346 2.68392 2.348633 2.348633 C 2.683919 2.013348 3.074544 1.74642 3.520508 1.547852 C 3.966471 1.349285 4.433594 1.25 4.921875 1.25 L 15.078125 1.25 C 15.566406 1.25 16.033527 1.349285 16.479492 1.547852 C 16.925455 1.74642 17.31608 2.013348 17.651367 2.348633 C 17.986652 2.68392 18.25358 3.074545 18.452148 3.520508 C 18.650715 3.966473 18.75 4.433594 18.75 4.921875 L 18.75 15.078125 C 18.75 15.566406 18.650715 16.033529 18.452148 16.479492 C 18.25358 16.925455 17.986652 17.31608 17.651367 17.651367 C 17.31608 17.986654 16.925455 18.25358 16.479492 18.452148 C 16.033527 18.650717 15.566406 18.75 15.078125 18.75 Z M 2.5 10 L 17.5 10 L 17.5 4.951172 C 17.5 4.625651 17.433268 4.314779 17.299805 4.018555 C 17.16634 3.722332 16.987305 3.461914 16.762695 3.237305 C 16.538086 3.012695 16.277668 2.83366 15.981445 2.700195 C 15.685221 2.566732 15.374349 2.5 15.048828 2.5 L 4.951172 2.5 C 4.625651 2.5 4.314778 2.566732 4.018555 2.700195 C 3.722331 2.83366 3.461914 3.012695 3.237305 3.237305 C 3.012695 3.461914 2.833659 3.722332 2.700195 4.018555 C 2.566732 4.314779 2.5 4.625651 2.5 4.951172 Z " />
|
|
</controls:SettingsCard.HeaderIcon>
|
|
<StackPanel Spacing="8">
|
|
<ToggleSwitch
|
|
IsOn="{x:Bind ViewModel.Is24HourHeaders, Mode=TwoWay}"
|
|
OffContent="12h"
|
|
OnContent="24h" />
|
|
<TextBlock
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
Text="{x:Bind ViewModel.TimedHourLabelPreview, Mode=OneWay}"
|
|
TextWrapping="WrapWholeWords" />
|
|
</StackPanel>
|
|
</controls:SettingsCard>
|
|
|
|
<controls:SettingsCard
|
|
Description="{x:Bind domain:Translator.CalendarSettings_TimedDayHeaderFormat_Description}"
|
|
Header="{x:Bind domain:Translator.CalendarSettings_TimedDayHeaderFormat_Header}">
|
|
<controls:SettingsCard.HeaderIcon>
|
|
<FontIcon Glyph="" />
|
|
</controls:SettingsCard.HeaderIcon>
|
|
<StackPanel Spacing="8">
|
|
<TextBox
|
|
PlaceholderText="ddd dd"
|
|
Text="{x:Bind ViewModel.TimedDayHeaderDateFormat, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
<ComboBox
|
|
ItemsSource="{x:Bind ViewModel.TimedDayHeaderFormatPresets, Mode=OneWay}"
|
|
SelectedIndex="{x:Bind ViewModel.SelectedTimedDayHeaderFormatPresetIndex, Mode=TwoWay}" />
|
|
<TextBlock
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
Text="{x:Bind ViewModel.TimedDayHeaderFormatPreview, Mode=OneWay}"
|
|
TextWrapping="WrapWholeWords" />
|
|
</StackPanel>
|
|
</controls:SettingsCard>
|
|
</controls:SettingsExpander.Items>
|
|
</controls:SettingsExpander>
|
|
<!-- Calendar Accounts -->
|
|
<!--<controls:SettingsExpander
|
|
Description="Manage calendar settings for each account"
|
|
Header="Calendar Accounts"
|
|
IsExpanded="True">
|
|
<controls:SettingsExpander.HeaderIcon>
|
|
<FontIcon Glyph="" />
|
|
</controls:SettingsExpander.HeaderIcon>
|
|
|
|
<controls:SettingsExpander.Items>
|
|
<controls:SettingsCard
|
|
HorizontalContentAlignment="Stretch"
|
|
VerticalContentAlignment="Stretch"
|
|
ContentAlignment="Vertical">
|
|
<ItemsControl ItemsSource="{x:Bind ViewModel.Accounts, Mode=OneWay}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate x:DataType="entities:MailAccount">
|
|
<Button
|
|
Padding="12,8"
|
|
HorizontalAlignment="Stretch"
|
|
HorizontalContentAlignment="Left"
|
|
Command="{Binding ElementName=Root, Path=ViewModel.NavigateToAccountSettingsCommand}"
|
|
CommandParameter="{x:Bind}"
|
|
Style="{StaticResource SubtleButtonStyle}">
|
|
<StackPanel Orientation="Horizontal" Spacing="12">
|
|
<FontIcon FontSize="20" Glyph="" />
|
|
<StackPanel VerticalAlignment="Center">
|
|
<TextBlock Text="{x:Bind Name}" />
|
|
<TextBlock
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
Text="{x:Bind Address}" />
|
|
</StackPanel>
|
|
<FontIcon
|
|
Margin="0,0,8,0"
|
|
HorizontalAlignment="Right"
|
|
FontSize="12"
|
|
Glyph="" />
|
|
</StackPanel>
|
|
</Button>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</controls:SettingsCard>
|
|
</controls:SettingsExpander.Items>
|
|
</controls:SettingsExpander>-->
|
|
<!-- Default reminder -->
|
|
<controls:SettingsCard Description="Set a default reminder for all new calendar events." Header="Default reminder">
|
|
<controls:SettingsCard.HeaderIcon>
|
|
<PathIcon Data="F1 M 10 1.25 C 10.456706 1.25 10.889486 1.337565 11.298339 1.512695 C 11.707192 1.687826 12.072591 1.927409 12.394531 2.231445 C 12.716471 2.535482 12.97656 2.892253 13.173828 3.301758 C 13.371096 3.711263 13.481771 4.146484 13.505859 4.607422 L 13.505859 5 C 13.969401 5.028646 14.386068 5.16276 14.755859 5.402344 C 15.125651 5.641927 15.414713 5.947917 15.623047 6.320312 C 15.83138 6.692709 15.9349 7.096355 15.933594 7.53125 L 15.933594 8.75 L 16.25 8.75 C 16.822917 8.75 17.317057 8.95638 17.732422 9.369141 C 18.147787 9.781901 18.357422 10.273437 18.359375 10.84375 L 18.359375 16.40625 C 18.359375 16.979167 18.153971 17.473308 17.743164 17.888672 C 17.332357 18.304037 16.839844 18.511719 16.265625 18.511719 L 3.734375 18.511719 C 3.164062 18.511719 2.671549 18.304037 2.256836 17.888672 C 1.842122 17.473308 1.634114 16.979167 1.630859 16.40625 L 1.630859 10.84375 C 1.630859 10.273437 1.837565 9.781901 2.250977 9.369141 C 2.664388 8.95638 3.156901 8.75 3.728516 8.75 L 4.0625 8.75 L 4.0625 7.53125 C 4.0625 7.09375 4.166341 6.689453 4.374023 6.314453 C 4.581706 5.939453 4.86914 5.632486 5.236328 5.393555 C 5.603516 5.154623 6.019532 5.021485 6.484375 4.994141 L 6.484375 4.607422 C 6.506511 4.148438 6.617838 3.714518 6.818359 3.305664 C 7.01888 2.896811 7.282877 2.539063 7.610352 2.232422 C 7.937826 1.92578 8.308268 1.685222 8.721679 1.510742 C 9.135091 1.336264 9.56575 1.249024 10.013672 1.249024 Z M 10.013672 2.5 C 9.441406 2.5 8.947916 2.706381 8.533203 3.119141 C 8.118489 3.531901 7.911459 4.023437 7.912109 4.59375 L 7.912109 6.25 L 12.089844 6.25 L 12.089844 4.59375 C 12.089844 4.023438 11.882161 3.531902 11.466797 3.119141 C 11.051433 2.706382 10.557292 2.5 9.984375 2.5 Z M 5.3125 7.53125 L 5.3125 8.75 L 14.6875 8.75 L 14.6875 7.53125 C 14.6875 7.303385 14.605144 7.107747 14.440429 6.944336 C 14.275714 6.780925 14.080729 6.69987 13.855469 6.703125 L 6.142578 6.703125 C 5.914713 6.703125 5.71875 6.785482 5.552734 6.950195 C 5.386719 7.114909 5.30339 7.310547 5.300781 7.537109 Z M 16.25 10 L 3.75 10 C 3.540365 10 3.361328 10.071615 3.212891 10.214844 C 3.064453 10.358073 2.989258 10.534505 2.986328 10.744141 L 2.986328 16.40625 C 2.986328 16.618489 3.058595 16.797526 3.203125 16.943359 C 3.347656 17.089193 3.526693 17.161458 3.740234 17.15625 L 16.25 17.15625 C 16.458333 17.15625 16.636067 17.082683 16.783203 16.935547 C 16.930339 16.788411 17.003906 16.609375 17.003906 16.398437 L 17.003906 10.742187 C 17.003906 10.536459 16.932942 10.359049 16.791016 10.209961 C 16.64909 10.060873 16.469401 9.986328 16.257812 9.986328 Z M 10 11.5625 C 10.227865 11.5625 10.423502 11.644856 10.586914 11.809571 C 10.750325 11.974285 10.83138 12.16862 10.830078 12.393555 L 10.830078 13.427734 L 11.855469 13.427734 C 12.080404 13.427734 12.273437 13.509115 12.434571 13.671875 C 12.595704 13.834636 12.675781 14.026693 12.675781 14.248047 C 12.675781 14.46224 12.596354 14.653321 12.4375 14.813477 C 12.278646 14.973633 12.089192 15.053711 11.869141 15.053711 L 10.830078 15.053711 L 10.830078 16.074219 C 10.830078 16.296224 10.748372 16.486981 10.584961 16.646484 C 10.42155 16.805989 10.229818 16.885742 10.005859 16.885742 C 9.781901 16.885742 9.590495 16.806315 9.431641 16.647461 C 9.272786 16.488607 9.193359 16.296875 9.193359 16.072266 L 9.193359 15.053711 L 8.15625 15.053711 C 7.931314 15.053711 7.738934 14.972331 7.579102 14.80957 C 7.419269 14.646809 7.339192 14.454753 7.338867 14.233399 C 7.338867 14.008464 7.419921 13.815755 7.582031 13.655274 C 7.744141 13.494793 7.935872 13.414551 8.157227 13.414551 L 9.193359 13.414551 L 9.193359 12.394531 C 9.193359 12.166667 9.275715 11.971029 9.440429 11.807618 C 9.605144 11.644206 9.799479 11.562825 10.023437 11.5625 Z" />
|
|
</controls:SettingsCard.HeaderIcon>
|
|
<controls:SettingsCard.Content>
|
|
<ComboBox ItemsSource="{x:Bind ViewModel.ReminderOptions, Mode=OneWay}" SelectedIndex="{x:Bind ViewModel.SelectedDefaultReminderIndex, Mode=TwoWay}" />
|
|
</controls:SettingsCard.Content>
|
|
</controls:SettingsCard>
|
|
|
|
<controls:SettingsCard Description="{x:Bind domain:Translator.CalendarSettings_DefaultSnoozeDuration_Description}" Header="{x:Bind domain:Translator.CalendarSettings_DefaultSnoozeDuration_Header}">
|
|
<controls:SettingsCard.HeaderIcon>
|
|
<PathIcon Data="F1 M 10 1.25 C 10.456706 1.25 10.889486 1.337565 11.298339 1.512695 C 11.707192 1.687826 12.072591 1.927409 12.394531 2.231445 C 12.716471 2.535482 12.97656 2.892253 13.173828 3.301758 C 13.371096 3.711263 13.481771 4.146484 13.505859 4.607422 L 13.505859 5 C 13.969401 5.028646 14.386068 5.16276 14.755859 5.402344 C 15.125651 5.641927 15.414713 5.947917 15.623047 6.320312 C 15.83138 6.692709 15.9349 7.096355 15.933594 7.53125 L 15.933594 8.75 L 16.25 8.75 C 16.822917 8.75 17.317057 8.95638 17.732422 9.369141 C 18.147787 9.781901 18.357422 10.273437 18.359375 10.84375 L 18.359375 16.40625 C 18.359375 16.979167 18.153971 17.473308 17.743164 17.888672 C 17.332357 18.304037 16.839844 18.511719 16.265625 18.511719 L 3.734375 18.511719 C 3.164062 18.511719 2.671549 18.304037 2.256836 17.888672 C 1.842122 17.473308 1.634114 16.979167 1.630859 16.40625 L 1.630859 10.84375 C 1.630859 10.273437 1.837565 9.781901 2.250977 9.369141 C 2.664388 8.95638 3.156901 8.75 3.728516 8.75 L 4.0625 8.75 L 4.0625 7.53125 C 4.0625 7.09375 4.166341 6.689453 4.374023 6.314453 C 4.581706 5.939453 4.86914 5.632486 5.236328 5.393555 C 5.603516 5.154623 6.019532 5.021485 6.484375 4.994141 L 6.484375 4.607422 C 6.506511 4.148438 6.617838 3.714518 6.818359 3.305664 C 7.01888 2.896811 7.282877 2.539063 7.610352 2.232422 C 7.937826 1.92578 8.308268 1.685222 8.721679 1.510742 C 9.135091 1.336264 9.56575 1.249024 10.013672 1.249024 Z M 10.013672 2.5 C 9.441406 2.5 8.947916 2.706381 8.533203 3.119141 C 8.118489 3.531901 7.911459 4.023437 7.912109 4.59375 L 7.912109 6.25 L 12.089844 6.25 L 12.089844 4.59375 C 12.089844 4.023438 11.882161 3.531902 11.466797 3.119141 C 11.051433 2.706382 10.557292 2.5 9.984375 2.5 Z M 5.3125 7.53125 L 5.3125 8.75 L 14.6875 8.75 L 14.6875 7.53125 C 14.6875 7.303385 14.605144 7.107747 14.440429 6.944336 C 14.275714 6.780925 14.080729 6.69987 13.855469 6.703125 L 6.142578 6.703125 C 5.914713 6.703125 5.71875 6.785482 5.552734 6.950195 C 5.386719 7.114909 5.30339 7.310547 5.300781 7.537109 Z M 16.25 10 L 3.75 10 C 3.540365 10 3.361328 10.071615 3.212891 10.214844 C 3.064453 10.358073 2.989258 10.534505 2.986328 10.744141 L 2.986328 16.40625 C 2.986328 16.618489 3.058595 16.797526 3.203125 16.943359 C 3.347656 17.089193 3.526693 17.161458 3.740234 17.15625 L 16.25 17.15625 C 16.458333 17.15625 16.636067 17.082683 16.783203 16.935547 C 16.930339 16.788411 17.003906 16.609375 17.003906 16.398437 L 17.003906 10.742187 C 17.003906 10.536459 16.932942 10.359049 16.791016 10.209961 C 16.64909 10.060873 16.469401 9.986328 16.257812 9.986328 Z M 10 11.5625 C 10.227865 11.5625 10.423502 11.644856 10.586914 11.809571 C 10.750325 11.974285 10.83138 12.16862 10.830078 12.393555 L 10.830078 13.427734 L 11.855469 13.427734 C 12.080404 13.427734 12.273437 13.509115 12.434571 13.671875 C 12.595704 13.834636 12.675781 14.026693 12.675781 14.248047 C 12.675781 14.46224 12.596354 14.653321 12.4375 14.813477 C 12.278646 14.973633 12.089192 15.053711 11.869141 15.053711 L 10.830078 15.053711 L 10.830078 16.074219 C 10.830078 16.296224 10.748372 16.486981 10.584961 16.646484 C 10.42155 16.805989 10.229818 16.885742 10.005859 16.885742 C 9.781901 16.885742 9.590495 16.806315 9.431641 16.647461 C 9.272786 16.488607 9.193359 16.296875 9.193359 16.072266 L 9.193359 15.053711 L 8.15625 15.053711 C 7.931314 15.053711 7.738934 14.972331 7.579102 14.80957 C 7.419269 14.646809 7.339192 14.454753 7.338867 14.233399 C 7.338867 14.008464 7.419921 13.815755 7.582031 13.655274 C 7.744141 13.494793 7.935872 13.414551 8.157227 13.414551 L 9.193359 13.414551 L 9.193359 12.394531 C 9.193359 12.166667 9.275715 11.971029 9.440429 11.807618 C 9.605144 11.644206 9.799479 11.562825 10.023437 11.5625 Z" />
|
|
</controls:SettingsCard.HeaderIcon>
|
|
<controls:SettingsCard.Content>
|
|
<ComboBox ItemsSource="{x:Bind ViewModel.SnoozeOptions, Mode=OneWay}" SelectedIndex="{x:Bind ViewModel.SelectedDefaultSnoozeIndex, Mode=TwoWay}" />
|
|
</controls:SettingsCard.Content>
|
|
</controls:SettingsCard>
|
|
|
|
<controls:SettingsCard Description="{x:Bind domain:Translator.CalendarSettings_NewEventBehavior_Description}" Header="{x:Bind domain:Translator.CalendarSettings_NewEventBehavior_Header}">
|
|
<controls:SettingsCard.HeaderIcon>
|
|
<FontIcon Glyph="" />
|
|
</controls:SettingsCard.HeaderIcon>
|
|
<controls:SettingsCard.Content>
|
|
<StackPanel Spacing="12">
|
|
<ComboBox ItemsSource="{x:Bind ViewModel.NewEventBehaviorOptions, Mode=OneWay}" SelectedItem="{x:Bind ViewModel.SelectedNewEventBehaviorOption, Mode=TwoWay}">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate x:DataType="calendarViewModels:CalendarNewEventBehaviorOption">
|
|
<TextBlock Text="{x:Bind DisplayText}" />
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
|
|
<ComboBox
|
|
ItemsSource="{x:Bind ViewModel.AvailableNewEventCalendars, Mode=OneWay}"
|
|
SelectedItem="{x:Bind ViewModel.SelectedNewEventCalendar, Mode=TwoWay}"
|
|
Visibility="{x:Bind ViewModel.ShouldShowSpecificNewEventCalendar, Mode=OneWay}">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate x:DataType="data:AccountCalendarViewModel">
|
|
<StackPanel Orientation="Vertical" Spacing="2">
|
|
<TextBlock Text="{x:Bind Name}" />
|
|
<TextBlock
|
|
FontSize="12"
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
Text="{x:Bind Account.Address}" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
</StackPanel>
|
|
</controls:SettingsCard.Content>
|
|
</controls:SettingsCard>
|
|
</StackPanel>
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="ClockIdentifierStates">
|
|
<VisualState x:Name="TwelweHour" />
|
|
<VisualState x:Name="TwentyFourHour">
|
|
<VisualState.StateTriggers>
|
|
<StateTrigger IsActive="{x:Bind ViewModel.Is24HourHeaders, Mode=OneWay}" />
|
|
</VisualState.StateTriggers>
|
|
<VisualState.Setters>
|
|
<Setter Target="WorkHourStartPicker.ClockIdentifier" Value="24HourClock" />
|
|
<Setter Target="WorkEndStartPicker.ClockIdentifier" Value="24HourClock" />
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Grid>
|
|
</abstract:CalendarSettingsPageAbstract>
|
|
|
|
|