Skip to content

Commit 70f9e9a

Browse files
Merge pull request #5 from SyncfusionExamples/TASK-849795_Sample_for_volcanoes
TASK-849795_ Updated the sample to .NET 8
2 parents 87648a3 + 062098d commit 70f9e9a

File tree

6 files changed

+41
-35
lines changed

6 files changed

+41
-35
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
4-
VisualStudioVersion = 17.7.34024.191
4+
VisualStudioVersion = 17.8.34525.116
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MostActiveVolcanoes", "MostActiveVolcanoes\MostActiveVolcanoes.csproj", "{DB111C21-BFD7-4CA9-9D6A-E03E8658F510}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MostActiveVolcanoes", "MostActiveVolcanoes\MostActiveVolcanoes.csproj", "{FDA4D2BA-F8D1-48D7-B1EF-23E702C85A35}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|Any CPU = Debug|Any CPU
1111
Release|Any CPU = Release|Any CPU
1212
EndGlobalSection
1313
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{DB111C21-BFD7-4CA9-9D6A-E03E8658F510}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{DB111C21-BFD7-4CA9-9D6A-E03E8658F510}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{DB111C21-BFD7-4CA9-9D6A-E03E8658F510}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{DB111C21-BFD7-4CA9-9D6A-E03E8658F510}.Release|Any CPU.Build.0 = Release|Any CPU
14+
{FDA4D2BA-F8D1-48D7-B1EF-23E702C85A35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{FDA4D2BA-F8D1-48D7-B1EF-23E702C85A35}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{FDA4D2BA-F8D1-48D7-B1EF-23E702C85A35}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{FDA4D2BA-F8D1-48D7-B1EF-23E702C85A35}.Release|Any CPU.Build.0 = Release|Any CPU
1818
EndGlobalSection
1919
GlobalSection(SolutionProperties) = preSolution
2020
HideSolutionNode = FALSE
2121
EndGlobalSection
2222
GlobalSection(ExtensibilityGlobals) = postSolution
23-
SolutionGuid = {C51928C1-29CC-442A-A6F4-DFCA2CCF1435}
23+
SolutionGuid = {4430DA34-1CB3-4B24-B8D3-6F477154B060}
2424
EndGlobalSection
2525
EndGlobal
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Configuration;
1+
using System.Configuration;
42
using System.Data;
5-
using System.Linq;
6-
using System.Threading.Tasks;
73
using System.Windows;
84

95
namespace MostActiveVolcanoes
@@ -14,4 +10,5 @@ namespace MostActiveVolcanoes
1410
public partial class App : Application
1511
{
1612
}
13+
1714
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
using System.Windows;
22

33
[assembly: ThemeInfo(
4-
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
5-
//(used if a resource is not found in the page,
6-
// or application resource dictionaries)
7-
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
8-
//(used if a resource is not found in the page,
9-
// app, or any theme specific resource dictionaries)
4+
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
5+
//(used if a resource is not found in the page,
6+
// or application resource dictionaries)
7+
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
8+
//(used if a resource is not found in the page,
9+
// app, or any theme specific resource dictionaries)
1010
)]

MostActiveVolcanoes/MostActiveVolcanoes/MainWindow.xaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,31 @@
55
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
66
xmlns:local="clr-namespace:MostActiveVolcanoes"
77
xmlns:chart="clr-namespace:Syncfusion.UI.Xaml.Charts;assembly=Syncfusion.SfChart.WPF"
8-
mc:Ignorable="d"
9-
Title="MainWindow" Height="450" Width="800">
10-
8+
mc:Ignorable="d">
9+
1110
<Grid>
1211
<Grid.DataContext>
1312
<local:VolcanoesData x:Name="viewModel"/>
14-
</Grid.DataContext>
13+
</Grid.DataContext>
1514

1615
<Border Margin="30" Padding="10" BorderThickness="1.5" CornerRadius="10" BorderBrush="#8d8794">
1716
<chart:SfChart>
1817

1918
<chart:SfChart.Resources>
20-
<local:CountryCodeToNameConverter x:Key="CountryCodeConverter"/>
19+
<local:CountryCodeToNameConverter x:Key="CountryCodeConverter"/>
2120

2221
<Geometry x:Key="PathData">M76.6454 39.9309C103.228 13.5478 116.52 0.356277 133 0.356277C149.48 0.356277 162.772 13.5478 189.355 39.931L266 116H0L76.6454 39.9309Z</Geometry>
2322
<Geometry x:Key="PathData1">M52,0 C49.2,0 46.7,1.9 45.6,4.5 L45,4.5 C42.4,4.5 40.3,6.5 40,9.1 C38.1,9.6 36.6,11.5 36.6,13.7 C36.6,14.2 36.7,14.6 36.8,15 L36.6,15 C35.3,15 34.2,16.1 34.2,17.5 C34.2,18.9 35.3,20 36.6,20 C37.8,20 38.8,19 39,17.8 C39.6,18.2 40.4,18.4 41.2,18.4 C43,18.4 44.5,17.3 45.3,15.8 C46,16.3 46.9,16.6 47.9,16.6 C49.7,16.6 51.2,15.5 51.9,14 C56,13.8 59.1,11.3 59.1,7.5 C59,3.4 55.8,0 52,0 L52,0 Z</Geometry>
2423
<Geometry x:Key="PathData2">M58.6,61 L37.4,24 L31,24 L19.5,44.1 L14.4,37.2 L-0.5,61 L58.6,61 Z</Geometry>
2524
<Geometry x:Key="PathData3">M43.1,35.5 L39.1,40.2 L34.2,37.2 L30.2,40.2 L25.3,35.2</Geometry>
2625

2726
<DataTemplate x:Key="seriesTemplate">
28-
<Canvas>
27+
<Canvas>
2928
<Path Canvas.Left="{Binding RectX}" Canvas.Top="{Binding RectY}" Width="{Binding Width}" Height="{Binding Height}"
30-
Fill="{Binding Interior}" Stretch="Fill" Data="{StaticResource PathData}">
31-
</Path>
32-
</Canvas>
33-
</DataTemplate>
29+
Fill="{Binding Interior}" Stretch="Fill" Data="{StaticResource PathData}">
30+
</Path>
31+
</Canvas>
32+
</DataTemplate>
3433
</chart:SfChart.Resources>
3534

3635
<chart:SfChart.Header>
@@ -46,8 +45,8 @@
4645
</chart:SfChart.SecondaryAxis>
4746

4847
<chart:ColumnSeries ItemsSource="{Binding Data}" XBindingPath="Country" YBindingPath="Count"
49-
CustomTemplate="{StaticResource seriesTemplate}" Interior="#FF6600"
50-
SegmentSelectionBrush="#6BFF6600" SelectedIndex="{Binding SelectedIndex, Mode=TwoWay}">
48+
CustomTemplate="{StaticResource seriesTemplate}" Interior="#FF6600"
49+
SegmentSelectionBrush="#6BFF6600" SelectedIndex="{Binding SelectedIndex, Mode=TwoWay}">
5150
</chart:ColumnSeries>
5251

5352
<chart:SfChart.Behaviors>
@@ -68,13 +67,13 @@
6867
<RowDefinition Height="Auto"/>
6968
<RowDefinition Height="Auto"/>
7069
</Grid.RowDefinitions>
71-
70+
7271
<Grid Grid.Row="0" Grid.Column="0">
7372
<Path Data="{StaticResource PathData1}" Fill="#FF6600"/>
7473
<Path Data="{StaticResource PathData2}" Fill="#FF6600"/>
7574
<Path Data="{StaticResource PathData3}" Fill="#FF6600"/>
7675
</Grid>
77-
76+
7877
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="5,20,0,0" Width="100">
7978
<TextBlock Text="{Binding Country, Converter={StaticResource CountryCodeConverter}}" FontWeight="SemiBold" FontSize="12.5"/>
8079
<TextBlock Text="{Binding Count, StringFormat=' : {0}'}" FontWeight="SemiBold" FontSize="12.5"/>
@@ -94,4 +93,5 @@
9493
</chart:SfChart>
9594
</Border>
9695
</Grid>
96+
9797
</Window>

MostActiveVolcanoes/MostActiveVolcanoes/MainWindow.xaml.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
using Syncfusion.UI.Xaml.Charts;
1+
using System.Text;
22
using System.Windows;
3+
using System.Windows.Controls;
4+
using System.Windows.Data;
5+
using System.Windows.Documents;
6+
using System.Windows.Input;
7+
using System.Windows.Media;
8+
using System.Windows.Media.Imaging;
9+
using System.Windows.Navigation;
10+
using System.Windows.Shapes;
311

412
namespace MostActiveVolcanoes
513
{
@@ -13,4 +21,4 @@ public MainWindow()
1321
InitializeComponent();
1422
}
1523
}
16-
}
24+
}

MostActiveVolcanoes/MostActiveVolcanoes/MostActiveVolcanoes.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
<PropertyGroup>
44
<OutputType>WinExe</OutputType>
5-
<TargetFramework>net6.0-windows</TargetFramework>
5+
<TargetFramework>net8.0-windows</TargetFramework>
66
<Nullable>enable</Nullable>
7+
<ImplicitUsings>enable</ImplicitUsings>
78
<UseWPF>true</UseWPF>
89
</PropertyGroup>
910

0 commit comments

Comments
 (0)