Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions 10.0/Apps/DeveloperBalance/App.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version = "1.0" encoding = "UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
<Application xmlns="http://schemas.microsoft.com/dotnet/maui/global"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:DeveloperBalance"
x:Class="DeveloperBalance.App">
<Application.Resources>
<ResourceDictionary>
Expand Down
15 changes: 7 additions & 8 deletions 10.0/Apps/DeveloperBalance/AppShell.xaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class="DeveloperBalance.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns="http://schemas.microsoft.com/dotnet/maui/global"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:sf="clr-namespace:Syncfusion.Maui.Toolkit.SegmentedControl;assembly=Syncfusion.Maui.Toolkit"
xmlns:pages="clr-namespace:DeveloperBalance.Pages"
Shell.FlyoutBehavior="Flyout"
Title="DeveloperBalance">

<ShellContent
Title="Dashboard"
Icon="{StaticResource IconDashboard}"
ContentTemplate="{DataTemplate pages:MainPage}"
ContentTemplate="{DataTemplate MainPage}"
Route="main" />

<ShellContent
Title="Projects"
Icon="{StaticResource IconProjects}"
ContentTemplate="{DataTemplate pages:ProjectListPage}"
ContentTemplate="{DataTemplate ProjectListPage}"
Route="projects" />

<ShellContent
Title="Manage Meta"
Icon="{StaticResource IconMeta}"
ContentTemplate="{DataTemplate pages:ManageMetaPage}"
ContentTemplate="{DataTemplate ManageMetaPage}"
Route="manage" />

<Shell.FlyoutFooter>
<Grid Padding="15">
<sf:SfSegmentedControl x:Name="ThemeSegmentedControl"
VerticalOptions="Center" HorizontalOptions="Center" SelectionChanged="SfSegmentedControl_SelectionChanged"
SegmentWidth="40" SegmentHeight="40">
<sf:SfSegmentedControl x:Name="ThemeSegmentedControl"
VerticalOptions="Center" HorizontalOptions="Center" SelectionChanged="SfSegmentedControl_SelectionChanged"
SegmentWidth="40" SegmentHeight="40">
<sf:SfSegmentedControl.ItemsSource>
<x:Array Type="{x:Type sf:SfSegmentItem}">
<sf:SfSegmentItem ImageSource="{StaticResource IconLight}" SemanticProperties.Description="Light mode"/>
Expand Down
4 changes: 4 additions & 0 deletions 10.0/Apps/DeveloperBalance/DeveloperBalance.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
<NoWarn>XC0103</NoWarn>
<MauiEnableXamlCBindingWithSourceCompilation>true</MauiEnableXamlCBindingWithSourceCompilation>

<!-- Enable Global and Implicit XML Namespaces for .NET 10 MAUI -->
<DefineConstants>$(DefineConstants);MauiAllowImplicitXmlnsDeclaration</DefineConstants>
<EnablePreviewFeatures>true</EnablePreviewFeatures>

<!-- Display name -->
<ApplicationTitle>DeveloperBalance</ApplicationTitle>

Expand Down
10 changes: 10 additions & 0 deletions 10.0/Apps/DeveloperBalance/GlobalXmlns.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Global XML Namespace definitions
// This enables implicit namespace declarations in XAML files

// Local application namespaces
[assembly: XmlnsDefinition("http://schemas.microsoft.com/dotnet/maui/global", "DeveloperBalance")]
[assembly: XmlnsDefinition("http://schemas.microsoft.com/dotnet/maui/global", "DeveloperBalance.Models")]
[assembly: XmlnsDefinition("http://schemas.microsoft.com/dotnet/maui/global", "DeveloperBalance.PageModels")]
[assembly: XmlnsDefinition("http://schemas.microsoft.com/dotnet/maui/global", "DeveloperBalance.Pages")]
[assembly: XmlnsDefinition("http://schemas.microsoft.com/dotnet/maui/global", "DeveloperBalance.Pages.Controls")]
[assembly: XmlnsDefinition("http://schemas.microsoft.com/dotnet/maui/global", "Fonts")]
2 changes: 1 addition & 1 deletion 10.0/Apps/DeveloperBalance/Pages/Controls/AddButton.xaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<Button xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
<Button xmlns="http://schemas.microsoft.com/dotnet/maui/global"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="DeveloperBalance.Pages.Controls.AddButton"
ImageSource="{StaticResource IconAdd}"
Expand Down
14 changes: 6 additions & 8 deletions 10.0/Apps/DeveloperBalance/Pages/Controls/CategoryChart.xaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Border xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
<Border xmlns="http://schemas.microsoft.com/dotnet/maui/global"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:chart="clr-namespace:Syncfusion.Maui.Toolkit.Charts;assembly=Syncfusion.Maui.Toolkit"
xmlns:controls="clr-namespace:DeveloperBalance.Pages.Controls"
xmlns:shimmer="clr-namespace:Syncfusion.Maui.Toolkit.Shimmer;assembly=Syncfusion.Maui.Toolkit"
xmlns:pageModels="clr-namespace:DeveloperBalance.PageModels"
x:Class="DeveloperBalance.Pages.Controls.CategoryChart"
HeightRequest="{OnIdiom 300, Phone=200}"
x:DataType="pageModels:MainPageModel"
x:DataType="MainPageModel"
Style="{StaticResource CardStyle}">
<shimmer:SfShimmer
AutomationProperties.IsInAccessibleTree="False"
Expand All @@ -24,9 +22,9 @@
</shimmer:SfShimmer.CustomView>
<shimmer:SfShimmer.Content>
<chart:SfCircularChart x:Name="Chart"
SemanticProperties.Description="Task Categories Chart">
SemanticProperties.Description="Task Categories Chart">
<chart:SfCircularChart.Resources>
<controls:ChartDataLabelConverter x:Key="ChartDataLabelConverter"/>
<ChartDataLabelConverter x:Key="ChartDataLabelConverter"/>
</chart:SfCircularChart.Resources>
<chart:DoughnutSeries
ItemsSource="{Binding TodoCategoryData}"
Expand Down Expand Up @@ -62,10 +60,10 @@

<chart:DoughnutSeries.DataLabelSettings>
<chart:CircularDataLabelSettings LabelPosition="Outside"
SmartLabelAlignment="Shift">
SmartLabelAlignment="Shift">
<chart:CircularDataLabelSettings.ConnectorLineSettings>
<chart:ConnectorLineStyle ConnectorType="Line"
StrokeWidth="3"></chart:ConnectorLineStyle>
StrokeWidth="3"></chart:ConnectorLineStyle>
</chart:CircularDataLabelSettings.ConnectorLineSettings>
</chart:CircularDataLabelSettings>
</chart:DoughnutSeries.DataLabelSettings>
Expand Down
13 changes: 5 additions & 8 deletions 10.0/Apps/DeveloperBalance/Pages/Controls/ProjectCardView.xaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<Border xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
<Border xmlns="http://schemas.microsoft.com/dotnet/maui/global"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:controls="clr-namespace:DeveloperBalance.Pages.Controls"
xmlns:models="clr-namespace:DeveloperBalance.Models"
xmlns:fonts="clr-namespace:Fonts"
xmlns:pageModels="clr-namespace:DeveloperBalance.PageModels"
xmlns:shimmer="clr-namespace:Syncfusion.Maui.Toolkit.Shimmer;assembly=Syncfusion.Maui.Toolkit"
x:Class="DeveloperBalance.Pages.Controls.ProjectCardView"
Style="{StaticResource CardStyle}"
MinimumHeightRequest="250"
SemanticProperties.Description="{Binding AccessibilityDescription}"
x:DataType="models:Project">
x:DataType="Project">
<shimmer:SfShimmer
BackgroundColor="Transparent"
IsActive="{Binding IsBusy, Source={RelativeSource AncestorType={x:Type pageModels:MainPageModel}}, x:DataType=pageModels:IProjectTaskPageModel}">
IsActive="{Binding IsBusy, Source={RelativeSource AncestorType={x:Type MainPageModel}}, x:DataType=IProjectTaskPageModel}">
<shimmer:SfShimmer.CustomView>
<VerticalStackLayout Spacing="15">
<BoxView
Expand Down Expand Up @@ -50,8 +47,8 @@
<Label Text="{Binding Description}" LineBreakMode="WordWrap"/>
<FlexLayout Wrap="Wrap" Direction="Row" AlignItems="Start" JustifyContent="Start" BindableLayout.ItemsSource="{Binding Tags}">
<BindableLayout.ItemTemplate>
<DataTemplate x:DataType="models:Tag">
<controls:TagView />
<DataTemplate x:DataType="Tag">
<TagView />
</DataTemplate>
</BindableLayout.ItemTemplate>
</FlexLayout>
Expand Down
5 changes: 2 additions & 3 deletions 10.0/Apps/DeveloperBalance/Pages/Controls/TagView.xaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<Border xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
<Border xmlns="http://schemas.microsoft.com/dotnet/maui/global"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="DeveloperBalance.Pages.Controls.TagView"
xmlns:models="clr-namespace:DeveloperBalance.Models"
StrokeShape="RoundRectangle 16"
HeightRequest="32"
StrokeThickness="0"
Background="{Binding DisplayColor}"
Padding="{OnPlatform '12,0,12,8',Android='12,0,12,0'}"
x:DataType="models:Tag">
x:DataType="Tag">

<Label Text="{Binding Title}" x:Name="TitleLabel"
TextColor="{AppThemeBinding Light={StaticResource LightBackground},Dark={StaticResource DarkBackground}}"
Expand Down
16 changes: 7 additions & 9 deletions 10.0/Apps/DeveloperBalance/Pages/Controls/TaskView.xaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<Border
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns="http://schemas.microsoft.com/dotnet/maui/global"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:effectsView="clr-namespace:Syncfusion.Maui.Toolkit.EffectsView;assembly=Syncfusion.Maui.Toolkit"
xmlns:pageModels="clr-namespace:DeveloperBalance.PageModels"
xmlns:models="clr-namespace:DeveloperBalance.Models"
xmlns:effects="clr-namespace:Syncfusion.Maui.Toolkit.EffectsView;assembly=Syncfusion.Maui.Toolkit"
xmlns:shimmer="clr-namespace:Syncfusion.Maui.Toolkit.Shimmer;assembly=Syncfusion.Maui.Toolkit"
x:Class="DeveloperBalance.Pages.Controls.TaskView"
StrokeShape="RoundRectangle 20"
Background="{AppThemeBinding Light={StaticResource LightSecondaryBackground}, Dark={StaticResource DarkSecondaryBackground}}"
x:DataType="models:ProjectTask">
x:DataType="ProjectTask">

<effectsView:SfEffectsView
<effects:SfEffectsView
TouchDownEffects="Highlight"
HighlightBackground="{AppThemeBinding Light={StaticResource DarkOnLightBackground}, Dark={StaticResource LightOnDarkBackground}}">
<shimmer:SfShimmer
BackgroundColor="Transparent"
VerticalOptions="Fill"
IsActive="{Binding IsBusy, Source={RelativeSource AncestorType={x:Type pageModels:IProjectTaskPageModel}}, x:DataType=pageModels:IProjectTaskPageModel}">
IsActive="{Binding IsBusy, Source={RelativeSource AncestorType={x:Type IProjectTaskPageModel}}, x:DataType=IProjectTaskPageModel}">
<shimmer:SfShimmer.CustomView>
<Grid
ColumnDefinitions="Auto,*"
Expand Down Expand Up @@ -47,7 +45,7 @@

<Grid.GestureRecognizers>
<TapGestureRecognizer
Command="{Binding NavigateToTaskCommand, Source={RelativeSource AncestorType={x:Type pageModels:IProjectTaskPageModel}}, x:DataType=pageModels:IProjectTaskPageModel}"
Command="{Binding NavigateToTaskCommand, Source={RelativeSource AncestorType={x:Type IProjectTaskPageModel}}, x:DataType=IProjectTaskPageModel}"
CommandParameter="{Binding .}"/>
</Grid.GestureRecognizers>
</Grid>
Expand All @@ -63,5 +61,5 @@
</Grid>
</shimmer:SfShimmer.Content>
</shimmer:SfShimmer>
</effectsView:SfEffectsView>
</effects:SfEffectsView>
</Border>
23 changes: 10 additions & 13 deletions 10.0/Apps/DeveloperBalance/Pages/MainPage.xaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/maui/global"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:pageModels="clr-namespace:DeveloperBalance.PageModels"
xmlns:models="clr-namespace:DeveloperBalance.Models"
xmlns:controls="clr-namespace:DeveloperBalance.Pages.Controls"
xmlns:pullToRefresh="clr-namespace:Syncfusion.Maui.Toolkit.PullToRefresh;assembly=Syncfusion.Maui.Toolkit"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
xmlns:pullToRefresh="clr-namespace:Syncfusion.Maui.Toolkit.PullToRefresh;assembly=Syncfusion.Maui.Toolkit"
x:Class="DeveloperBalance.Pages.MainPage"
x:DataType="pageModels:MainPageModel"
x:DataType="MainPageModel"
x:Name="OverviewPage"
Title="{Binding Today}">

Expand Down Expand Up @@ -37,7 +34,7 @@
IsRefreshing="{Binding IsRefreshing}"
RefreshCommand="{Binding RefreshCommand}">
<pullToRefresh:SfPullToRefresh.PullableContent>
<ScrollView>
<ScrollView SafeAreaEdges="Container">
<Grid Padding="{StaticResource LayoutPadding}" RowSpacing="{StaticResource LayoutSpacing}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
Expand All @@ -49,22 +46,22 @@
</Grid.RowDefinitions>

<Label Grid.Row="0" Text="Task Categories" Style="{StaticResource Title2}" SemanticProperties.HeadingLevel="Level1"/>
<controls:CategoryChart Grid.Row="1" />
<CategoryChart Grid.Row="1" />
<Label Grid.Row="2" Text="Projects" Style="{StaticResource Title2}" SemanticProperties.HeadingLevel="Level1"/>
<CollectionView Grid.Row="3" ItemsSource="{Binding Projects}"
Margin="-7.5,0"
MinimumHeightRequest="250"
x:Name="ProjectsCollectionView"
SelectionMode="Single"
SelectedItem="{Binding SelectedProject}"
SelectionChangedCommand="{Binding NavigateToProjectCommand, Source={RelativeSource AncestorType={x:Type pageModels:MainPageModel}}, x:DataType=pageModels:MainPageModel}"
SelectionChangedCommand="{Binding NavigateToProjectCommand, Source={RelativeSource AncestorType={x:Type MainPageModel}}, x:DataType=MainPageModel}"
SelectionChangedCommandParameter="{Binding SelectedProject}">
<CollectionView.ItemsLayout>
<LinearItemsLayout Orientation="Horizontal" ItemSpacing="7.5"/>
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="models:Project">
<controls:ProjectCardView WidthRequest="200" />
<DataTemplate x:DataType="Project">
<ProjectCardView WidthRequest="200" />
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
Expand All @@ -85,7 +82,7 @@
BindableLayout.ItemsSource="{Binding Tasks}">
<BindableLayout.ItemTemplate>
<DataTemplate>
<controls:TaskView TaskCompletedCommand="{Binding TaskCompletedCommand, Source={RelativeSource AncestorType={x:Type pageModels:MainPageModel}}, x:DataType=pageModels:MainPageModel}" />
<TaskView TaskCompletedCommand="{Binding TaskCompletedCommand, Source={RelativeSource AncestorType={x:Type MainPageModel}}, x:DataType=MainPageModel}" />
</DataTemplate>
</BindableLayout.ItemTemplate>
</VerticalStackLayout>
Expand All @@ -94,7 +91,7 @@
</pullToRefresh:SfPullToRefresh.PullableContent>
</pullToRefresh:SfPullToRefresh>

<controls:AddButton
<AddButton
IsEnabled="{Binding IsBusy, Converter={StaticResource InvertedBoolConverter}}"
Command="{Binding AddTaskCommand}"
SemanticProperties.Description="Add task" />
Expand Down
Loading
Loading