Skip to content

Commit 89bf930

Browse files
saiyathalifathimabee.m@syncfusion.comsaiyathalifathimabee.m@syncfusion.com
authored andcommitted
updated the sample using navigationDrawer
1 parent 3b94a3b commit 89bf930

31 files changed

Lines changed: 442 additions & 584 deletions

ChartControlsThemeDemo/ChartControlsThemeDemo/App.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
1212

1313
<syncTheme:SyncfusionThemeResourceDictionary VisualTheme="MaterialLight"/>
14-
14+
1515
<!--<ResourceDictionary>
1616
1717
--><!--Cartesian Chart--><!--

ChartControlsThemeDemo/ChartControlsThemeDemo/App.xaml.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
using Syncfusion.Maui.Themes;
2-
3-
namespace ChartControlsThemeDemo
1+
namespace ChartControlsThemeDemo
42
{
53
public partial class App : Application
64
{
75
public App()
86
{
97
InitializeComponent();
10-
118
MainPage = new AppShell();
129
}
1310
}

ChartControlsThemeDemo/ChartControlsThemeDemo/AppShell.xaml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,11 @@
55
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
66
xmlns:local="clr-namespace:ChartControlsThemeDemo"
77
xmlns:switch="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
8-
Shell.FlyoutBehavior="Flyout"
8+
Shell.FlyoutBehavior="Disabled"
99
Title="ChartControlsThemeDemo">
1010

11-
<ShellContent Route="page1" Title="Cartesian Chart" ContentTemplate="{DataTemplate local:CartesianChartDemo}" />
12-
<ShellContent Route="page2" Title="Circular Chart" ContentTemplate="{DataTemplate local:CircularChartDemo}" />
13-
<ShellContent Route="page3" Title="Funnel Chart" ContentTemplate="{DataTemplate local:FunnelChartDemo}" />
14-
<ShellContent Route="page4" Title="Pyramid Chart" ContentTemplate="{DataTemplate local:PyramidChartDemo}" />
15-
<ShellContent Route="page5" Title="Sunburst Chart" ContentTemplate="{DataTemplate local:SunburstChartDemo}" />
11+
<ShellContent
12+
ContentTemplate="{DataTemplate local:MainPage}"
13+
Route="MainPage" />
1614

17-
<Shell.FlyoutFooter>
18-
<Border StrokeShape="RoundRectangle 10" StrokeThickness="1.5" Margin="20" HorizontalOptions="Fill"
19-
Padding="20" Stroke="#2a1d45">
20-
<StackLayout Orientation="Horizontal" HorizontalOptions="Center" VerticalOptions="CenterAndExpand">
21-
<Label Text="Change Theme" VerticalOptions="Center" FontSize="18" FontAttributes="Bold" TextColor="{AppThemeBinding Light=Black, Dark=White}"/>
22-
<switch:SfSwitch x:Name="switch" Margin="15,0,0,0" IsOn="False" StateChanged="switch_StateChanged"/>
23-
</StackLayout>
24-
</Border>
25-
</Shell.FlyoutFooter>
26-
2715
</Shell>
Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,10 @@
1-
using Microsoft.Maui.Controls;
2-
using Microsoft.Maui.Controls.Shapes;
3-
using Syncfusion.Maui.Themes;
4-
5-
namespace ChartControlsThemeDemo
1+
namespace ChartControlsThemeDemo
62
{
73
public partial class AppShell : Shell
84
{
95
public AppShell()
106
{
117
InitializeComponent();
12-
13-
Routing.RegisterRoute("page1", typeof(CartesianChartDemo));
14-
Routing.RegisterRoute("page2", typeof(CircularChartDemo));
15-
Routing.RegisterRoute("page3", typeof(FunnelChartDemo));
16-
Routing.RegisterRoute("page4", typeof(PyramidChartDemo));
17-
Routing.RegisterRoute("page5", typeof(SunburstChartDemo));
18-
}
19-
20-
private void switch_StateChanged(object sender, Syncfusion.Maui.Buttons.SwitchStateChangedEventArgs e)
21-
{
22-
var state = e.NewValue;
23-
ICollection<ResourceDictionary> mergedDictionaries = Application.Current.Resources.MergedDictionaries;
24-
if (mergedDictionaries != null)
25-
{
26-
var theme = mergedDictionaries.OfType<SyncfusionThemeResourceDictionary>().FirstOrDefault();
27-
if (theme != null)
28-
{
29-
if (state == false)
30-
{
31-
theme.VisualTheme = SfVisuals.MaterialLight;
32-
Application.Current.UserAppTheme = AppTheme.Light;
33-
34-
}
35-
else
36-
{
37-
theme.VisualTheme = SfVisuals.MaterialDark;
38-
Application.Current.UserAppTheme = AppTheme.Dark;
39-
}
40-
}
41-
}
428
}
439
}
4410
}

ChartControlsThemeDemo/ChartControlsThemeDemo/CartesianChart/CartesianChartDemo.xaml

Lines changed: 0 additions & 66 deletions
This file was deleted.

ChartControlsThemeDemo/ChartControlsThemeDemo/CartesianChart/CartesianChartDemo.xaml.cs

Lines changed: 0 additions & 11 deletions
This file was deleted.

ChartControlsThemeDemo/ChartControlsThemeDemo/ChartControlsThemeDemo.csproj

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,13 @@
4747

4848
<!-- Images -->
4949
<MauiImage Include="Resources\Images\*" />
50+
<MauiImage Update="Resources\Images\choice.png">
51+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
52+
</MauiImage>
5053
<MauiImage Update="Resources\Images\dotnet_bot.png" Resize="True" BaseSize="300,185" />
54+
<MauiImage Update="Resources\Images\chart.png">
55+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
56+
</MauiImage>
5157

5258
<!-- Custom Fonts -->
5359
<MauiFont Include="Resources\Fonts\*" />
@@ -56,46 +62,37 @@
5662
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
5763
</ItemGroup>
5864

65+
<ItemGroup>
66+
<None Remove="Resources\Images\chart.png" />
67+
<None Remove="Resources\Images\choice.png" />
68+
</ItemGroup>
69+
5970
<ItemGroup>
6071
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
6172
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
6273
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
6374
<PackageReference Include="Syncfusion.Maui.Buttons" Version="*" />
64-
<PackageReference Include="Syncfusion.Maui.Charts" Version="26.1.39" />
65-
<PackageReference Include="Syncfusion.Maui.SunburstChart" Version="26.1.39" />
75+
<PackageReference Include="Syncfusion.Maui.Charts" Version="*" />
76+
<PackageReference Include="Syncfusion.Maui.NavigationDrawer" Version="26.1.39" />
77+
<PackageReference Include="Syncfusion.Maui.SunburstChart" Version="*" />
6678
</ItemGroup>
6779

6880
<ItemGroup>
69-
<MauiXaml Update="CartesianChart\CartesianChartDemo.xaml">
70-
<Generator>MSBuild:Compile</Generator>
71-
</MauiXaml>
7281
<MauiXaml Update="CartesianChart\SfCartesianChartThemeKeys.xaml">
7382
<Generator>MSBuild:Compile</Generator>
7483
</MauiXaml>
75-
<MauiXaml Update="CircularChart\CircularChartDemo.xaml">
76-
<Generator>MSBuild:Compile</Generator>
77-
</MauiXaml>
7884
<MauiXaml Update="CircularChart\SfCircularChartThemeKeys.xaml">
7985
<Generator>MSBuild:Compile</Generator>
8086
</MauiXaml>
81-
<MauiXaml Update="FunnelChart\FunnelChartDemo.xaml">
82-
<Generator>MSBuild:Compile</Generator>
83-
</MauiXaml>
8487
<MauiXaml Update="FunnelChart\SfFunnelChartThemeKeys.xaml">
8588
<Generator>MSBuild:Compile</Generator>
8689
</MauiXaml>
87-
<MauiXaml Update="PyramidChart\PyramidChartDemo.xaml">
88-
<Generator>MSBuild:Compile</Generator>
89-
</MauiXaml>
9090
<MauiXaml Update="PyramidChart\SfPyramidChartThemeKeys.xaml">
9191
<Generator>MSBuild:Compile</Generator>
9292
</MauiXaml>
9393
<MauiXaml Update="SunburstChart\SfSunburstChartThemeKeys.xaml">
9494
<Generator>MSBuild:Compile</Generator>
9595
</MauiXaml>
96-
<MauiXaml Update="SunburstChart\SunburstChartDemo.xaml">
97-
<Generator>MSBuild:Compile</Generator>
98-
</MauiXaml>
9996
</ItemGroup>
10097

10198
</Project>

ChartControlsThemeDemo/ChartControlsThemeDemo/ChartControlsThemeDemo.csproj.user

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,21 @@
66
<ActiveDebugProfile>Windows Machine</ActiveDebugProfile>
77
</PropertyGroup>
88
<ItemGroup>
9-
<MauiXaml Update="CartesianChart\CartesianChartDemo.xaml">
10-
<SubType>Designer</SubType>
11-
</MauiXaml>
129
<MauiXaml Update="CartesianChart\SfCartesianChartThemeKeys.xaml">
1310
<SubType>Designer</SubType>
1411
</MauiXaml>
15-
<MauiXaml Update="CircularChart\CircularChartDemo.xaml">
16-
<SubType>Designer</SubType>
17-
</MauiXaml>
1812
<MauiXaml Update="CircularChart\SfCircularChartThemeKeys.xaml">
1913
<SubType>Designer</SubType>
2014
</MauiXaml>
21-
<MauiXaml Update="FunnelChart\FunnelChartDemo.xaml">
22-
<SubType>Designer</SubType>
23-
</MauiXaml>
2415
<MauiXaml Update="FunnelChart\SfFunnelChartThemeKeys.xaml">
2516
<SubType>Designer</SubType>
2617
</MauiXaml>
27-
<MauiXaml Update="PyramidChart\PyramidChartDemo.xaml">
28-
<SubType>Designer</SubType>
29-
</MauiXaml>
3018
<MauiXaml Update="PyramidChart\SfPyramidChartThemeKeys.xaml">
3119
<SubType>Designer</SubType>
3220
</MauiXaml>
3321
<MauiXaml Update="SunburstChart\SfSunburstChartThemeKeys.xaml">
3422
<SubType>Designer</SubType>
3523
</MauiXaml>
36-
<MauiXaml Update="SunburstChart\SunburstChartDemo.xaml">
37-
<SubType>Designer</SubType>
38-
</MauiXaml>
3924
</ItemGroup>
4025
<ItemGroup>
4126
<None Update="App.xaml">

ChartControlsThemeDemo/ChartControlsThemeDemo/CircularChart/CircularChartDemo.xaml

Lines changed: 0 additions & 40 deletions
This file was deleted.

ChartControlsThemeDemo/ChartControlsThemeDemo/CircularChart/CircularChartDemo.xaml.cs

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)