Skip to content

Commit 5fc7a6c

Browse files
Merge pull request #2 from NatarajanSF4844/Warnings
Warnings
2 parents f2c6b03 + 7ef90ea commit 5fc7a6c

File tree

10 files changed

+33
-40
lines changed

10 files changed

+33
-40
lines changed

TreeMapPositionTheLegend/TreeMapPositionTheLegend/App.xaml.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ public partial class App : Application
55
public App()
66
{
77
InitializeComponent();
8+
}
89

9-
MainPage = new AppShell();
10+
protected override Window CreateWindow(IActivationState? activationState)
11+
{
12+
return new Window(new MainPage());
1013
}
1114
}
1215
}

TreeMapPositionTheLegend/TreeMapPositionTheLegend/AppShell.xaml

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

TreeMapPositionTheLegend/TreeMapPositionTheLegend/AppShell.xaml.cs

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

TreeMapPositionTheLegend/TreeMapPositionTheLegend/Behaviour/LegendPlacementBehaviour.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ protected override void OnDetachingFrom(ContentPage sampleView)
7272
/// <param name="e">The event args.</param>
7373
private void OnComboBoxSelectionChanged(object? sender, Syncfusion.Maui.Inputs.SelectionChangedEventArgs e)
7474
{
75+
if(treeMap == null || comboBox == null)
76+
{
77+
return;
78+
}
79+
7580
if (comboBox.SelectedIndex == 0)
7681
{
7782
treeMap.LegendSettings.Placement = LegendPlacement.Top;

TreeMapPositionTheLegend/TreeMapPositionTheLegend/MainPage.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
FontAttributes="Bold" />
2424

2525
<editors:SfComboBox x:Name="comboBox"
26+
x:DataType="local:LegendPlacementsViewModel"
2627
Grid.Row="2"
2728
HeightRequest="50"
2829
WidthRequest="250"
@@ -36,6 +37,7 @@
3637
</editors:SfComboBox>
3738

3839
<treemap:SfTreeMap x:Name="treeMap"
40+
x:DataType="local:PopulationViewModel"
3941
Grid.Row="1"
4042
Margin="8"
4143
DataSource="{Binding PopulationDetails}"
@@ -71,7 +73,6 @@
7173
</treemap:TreeMapRangeBrushSettings>
7274
</treemap:SfTreeMap.LeafItemBrushSettings>
7375
</treemap:SfTreeMap>
74-
7576
</Grid>
7677

7778
<ContentPage.Behaviors>

TreeMapPositionTheLegend/TreeMapPositionTheLegend/Model/LegendPlacements.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ namespace TreeMapPositionTheLegend
88
{
99
public class LegendPlacements
1010
{
11-
public string PlaceName { get; set; }
11+
public string? PlaceName { get; set; }
1212
}
1313
}

TreeMapPositionTheLegend/TreeMapPositionTheLegend/Model/PopulationDetails.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ public class PopulationDetails
44
{
55
public PopulationDetails()
66
{
7+
Continent = string.Empty;
8+
Country = string.Empty;
79
}
810
public string Country { get; set; }
911
public string Continent { get; set; }

TreeMapPositionTheLegend/TreeMapPositionTheLegend/TreeMapPositionTheLegend.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
5-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
4+
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
5+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>
66
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
77
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
88

@@ -59,9 +59,9 @@
5959
<ItemGroup>
6060
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
6161
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
62-
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
63-
<PackageReference Include="Syncfusion.Maui.Inputs" Version="25.1.39" />
64-
<PackageReference Include="Syncfusion.Maui.TreeMap" Version="25.1.39" />
62+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="*" />
63+
<PackageReference Include="Syncfusion.Maui.Inputs" Version="*" />
64+
<PackageReference Include="Syncfusion.Maui.TreeMap" Version="*" />
6565
</ItemGroup>
6666

6767
</Project>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<IsFirstTimeProjectOpen>False</IsFirstTimeProjectOpen>
5+
<ActiveDebugFramework>net9.0-windows10.0.19041.0</ActiveDebugFramework>
6+
<ActiveDebugProfile>Windows Machine</ActiveDebugProfile>
7+
<SelectedPlatformGroup>Emulator</SelectedPlatformGroup>
8+
<DefaultDevice>pixel_5_-_api_34</DefaultDevice>
9+
</PropertyGroup>
10+
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net9.0-android|AnyCPU'">
11+
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
12+
</PropertyGroup>
13+
</Project>

TreeMapPositionTheLegend/TreeMapPositionTheLegend/ViewModel/LegendPlacementsViewModel.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Collections.ObjectModel;
4-
using System.Linq;
5-
using System.Text;
6-
using System.Threading.Tasks;
7-
using TreeMapPositionTheLegend;
1+
using System.Collections.ObjectModel;
82

93
namespace TreeMapPositionTheLegend
104
{

0 commit comments

Comments
 (0)