├── OpenStartScreen
├── Down.png
├── Up.png
├── TileInteraction.cs
├── App.xaml.cs
├── App.xaml
├── ProgramCategory.cs
├── ShortcutResolver.cs
├── AssemblyInfo.cs
├── IconExtractor.cs
├── OpenStartScreen.csproj
├── tile.xaml
├── MainWindow.xaml
├── tile.xaml.cs
├── UserCard.cs
├── TileManager.cs
├── AppsScreen.cs
├── GridManager.cs
└── MainWindow.xaml.cs
├── README.md
├── OpenStartScreen.sln
├── .gitattributes
└── .gitignore
/OpenStartScreen/Down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kolejker/OpenStartScreen/HEAD/OpenStartScreen/Down.png
--------------------------------------------------------------------------------
/OpenStartScreen/Up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kolejker/OpenStartScreen/HEAD/OpenStartScreen/Up.png
--------------------------------------------------------------------------------
/OpenStartScreen/TileInteraction.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace OpenStartScreen
8 | {
9 | internal class TileInteraction
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/OpenStartScreen/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Configuration;
2 | using System.Data;
3 | using System.Windows;
4 |
5 | namespace WpfApp3
6 | {
7 | ///
8 | /// Interaction logic for App.xaml
9 | ///
10 | public partial class App : Application
11 | {
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/OpenStartScreen/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/OpenStartScreen/ProgramCategory.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace OpenStartScreen
4 | {
5 | public class ProgramCategory
6 | {
7 | public string Name { get; set; }
8 | public List Items { get; set; }
9 |
10 | public ProgramCategory(string name)
11 | {
12 | Name = name;
13 | Items = new List();
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/OpenStartScreen/ShortcutResolver.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.InteropServices;
3 | using IWshRuntimeLibrary;
4 |
5 | public class ShortcutResolver
6 | {
7 | public static string Resolve(string shortcutPath)
8 | {
9 | if (System.IO.File.Exists(shortcutPath))
10 | {
11 | WshShell shell = new WshShell();
12 | IWshShortcut link = (IWshShortcut)shell.CreateShortcut(shortcutPath);
13 | return link.TargetPath;
14 | }
15 | return null;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/OpenStartScreen/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 |
3 | [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)
10 | )]
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ### OBSELETE, GO USE [THIS](https://github.com/valinet/ExplorerPatcher/wiki/ExplorerPatcher%27s-taskbar-implementation) INSTEAD, ITS THE REAL AND FULL START SCREEN FOR WINDOWS 8
2 |
3 | # OpenStartScreen
4 |
5 | **OpenStartScreen** is an open-source, WPF-based project built with .NET 8.0 that brings back the Windows 8/8.1 Start Screen to Windows 10 and 11.
6 |
7 |
8 |
9 | ## Features to add
10 |
11 | - **MAKE IT REPLACE THE NORMAL START MENU**
12 | - Allow more customizable tile placement
13 | - Live Tiles implementation (either custom or imported from uwp app)
14 | - Smoother animations
15 | - Save tile placement data
16 | - Actual windows 8 menus for tile and app management (on long press)
17 | - Free order of tiles
18 | - Add background and parallax effect
19 | - Add swipe features
20 |
21 |
22 |
--------------------------------------------------------------------------------
/OpenStartScreen.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.10.35027.167
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenStartScreen", "OpenStartScreen\OpenStartScreen.csproj", "{53CD9673-0CBC-4922-8873-469C6E5AE25C}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {53CD9673-0CBC-4922-8873-469C6E5AE25C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {53CD9673-0CBC-4922-8873-469C6E5AE25C}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {53CD9673-0CBC-4922-8873-469C6E5AE25C}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {53CD9673-0CBC-4922-8873-469C6E5AE25C}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {087440F4-5BA3-4A97-9857-240A3039A2E2}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/OpenStartScreen/IconExtractor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Runtime.InteropServices;
4 | using System.Windows.Media.Imaging;
5 |
6 | public class IconExtractor
7 | {
8 | [DllImport("shell32.dll", CharSet = CharSet.Auto)]
9 | public static extern IntPtr ExtractIcon(IntPtr hInst, string lpszExeFileName, int nIconIndex);
10 |
11 | public static Icon Extract(string filePath, int iconIndex)
12 | {
13 | IntPtr hIcon = ExtractIcon(IntPtr.Zero, filePath, iconIndex);
14 | if (hIcon != IntPtr.Zero)
15 | {
16 | return Icon.FromHandle(hIcon);
17 | }
18 | return null;
19 | }
20 |
21 | public static BitmapSource ToBitmapSource(Icon icon)
22 | {
23 | using (var bmp = icon.ToBitmap())
24 | {
25 | var hBitmap = bmp.GetHbitmap();
26 |
27 | try
28 | {
29 | var bitmapSource = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
30 | hBitmap,
31 | IntPtr.Zero,
32 | System.Windows.Int32Rect.Empty,
33 | BitmapSizeOptions.FromEmptyOptions());
34 |
35 | return bitmapSource;
36 | }
37 | finally
38 | {
39 | DeleteObject(hBitmap);
40 | }
41 | }
42 | }
43 |
44 | [DllImport("gdi32.dll")]
45 | [return: MarshalAs(UnmanagedType.Bool)]
46 | private static extern bool DeleteObject(IntPtr hObject);
47 | }
48 |
--------------------------------------------------------------------------------
/OpenStartScreen/OpenStartScreen.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | WinExe
5 | net8.0-windows
6 | enable
7 | enable
8 | true
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | tlbimp
19 | 0
20 | 1
21 | f935dc20-1cf0-11d0-adb9-00c04fd58a0b
22 | 0
23 | false
24 | true
25 |
26 |
27 | tlbimp
28 | 0
29 | 1
30 | 50a7e9b0-70ef-11d1-b75a-00a0c90564fe
31 | 0
32 | false
33 | true
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/OpenStartScreen/tile.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
29 |
30 |
31 |
32 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/OpenStartScreen/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
31 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/OpenStartScreen/tile.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 | using System.Windows.Controls;
3 | using System.Windows.Input;
4 | using System.Windows.Media;
5 | using System.Windows.Media.Imaging;
6 |
7 | namespace OpenStartScreen
8 | {
9 | public partial class Tile : UserControl
10 | {
11 | public static readonly DependencyProperty TileNameProperty =
12 | DependencyProperty.Register("TileName", typeof(string), typeof(Tile), new PropertyMetadata(string.Empty));
13 |
14 | public static readonly DependencyProperty TileImageProperty =
15 | DependencyProperty.Register("TileImage", typeof(ImageSource), typeof(Tile), new PropertyMetadata(null));
16 |
17 | public static readonly DependencyProperty TileBackgroundProperty =
18 | DependencyProperty.Register("TileBackground", typeof(ImageSource), typeof(Tile), new PropertyMetadata(null));
19 |
20 | public static readonly DependencyProperty TileSizeProperty =
21 | DependencyProperty.Register("TileSize", typeof(TileSize), typeof(Tile), new PropertyMetadata(TileSize.Default));
22 |
23 | public Tile()
24 | {
25 | InitializeComponent();
26 | UpdateGradientBrush();
27 |
28 | this.MouseMove += Tile_MouseMove;
29 | }
30 |
31 | private void Tile_MouseMove(object sender, MouseEventArgs e)
32 | {
33 | if (e.LeftButton == MouseButtonState.Pressed)
34 | {
35 | DragDrop.DoDragDrop(this, this, DragDropEffects.Move);
36 | }
37 | }
38 |
39 | private void UpdateGradientBrush()
40 | {
41 | SolidColorBrush accentBrush = SystemParameters.WindowGlassBrush as SolidColorBrush;
42 | if (accentBrush != null)
43 | {
44 | Color baseColor = accentBrush.Color;
45 | Color darkerColor = DarkenColor(baseColor, 0.1);
46 |
47 | var gradientBrush = (LinearGradientBrush)FindResource("TileGradientBrush");
48 | if (gradientBrush != null)
49 | {
50 | gradientBrush.GradientStops[1].Color = baseColor;
51 | gradientBrush.GradientStops[0].Color = darkerColor;
52 | }
53 | }
54 | }
55 |
56 | private Color DarkenColor(Color color, double factor)
57 | {
58 | byte r = (byte)(color.R * (1 - factor));
59 | byte g = (byte)(color.G * (1 - factor));
60 | byte b = (byte)(color.B * (1 - factor));
61 | return Color.FromRgb(r, g, b);
62 | }
63 |
64 | public string TileName
65 | {
66 | get => (string)GetValue(TileNameProperty);
67 | set => SetValue(TileNameProperty, value);
68 | }
69 |
70 | public ImageSource TileImage
71 | {
72 | get => (ImageSource)GetValue(TileImageProperty);
73 | set => SetValue(TileImageProperty, value);
74 | }
75 |
76 | public ImageSource TileBackground
77 | {
78 | get => (ImageSource)GetValue(TileBackgroundProperty);
79 | set => SetValue(TileBackgroundProperty, value);
80 | }
81 |
82 | public TileSize TileSize
83 | {
84 | get => (TileSize)GetValue(TileSizeProperty);
85 | set => SetValue(TileSizeProperty, value);
86 | }
87 |
88 | public double ImageSize => TileSize == TileSize.Large ? 72 : 44;
89 |
90 | private static void OnTileSizeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
91 | {
92 | if (d is Tile tile)
93 | {
94 | tile.UpdateSize();
95 | }
96 | }
97 |
98 | private void UpdateSize()
99 | {
100 | UpdateGradientBrush();
101 | switch (TileSize)
102 | {
103 | case TileSize.Default:
104 | Width = 124;
105 | Height = 124;
106 | break;
107 | case TileSize.Wide:
108 | Width = 248;
109 | Height = 124;
110 | break;
111 | case TileSize.Large:
112 | Width = 248;
113 | Height = 248;
114 | break;
115 | }
116 | }
117 | }
118 |
119 |
120 |
121 | public enum TileSize
122 | {
123 | Default,
124 | Wide,
125 | Large
126 | }
127 | }
--------------------------------------------------------------------------------
/OpenStartScreen/UserCard.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 | using System.Diagnostics;
3 | using System.IO;
4 | using System.Runtime.InteropServices;
5 | using System.Security.Principal;
6 | using System.Windows.Controls;
7 | using System.Windows.Input;
8 | using System.Windows.Media.Imaging;
9 |
10 | public class UserCard : INotifyPropertyChanged
11 | {
12 | private string _username;
13 | private BitmapImage _userProfileImage;
14 |
15 | public string Username
16 | {
17 | get { return _username; }
18 | set
19 | {
20 | _username = value;
21 | OnPropertyChanged(nameof(Username));
22 | }
23 | }
24 |
25 | public BitmapImage UserProfileImage
26 | {
27 | get { return _userProfileImage; }
28 | set
29 | {
30 | _userProfileImage = value;
31 | OnPropertyChanged(nameof(UserProfileImage));
32 | }
33 | }
34 |
35 | public ICommand OpenContextMenuCommand { get; }
36 | public ICommand ChangeAccountPictureCommand { get; }
37 | public ICommand LockCommand { get; }
38 | public ICommand SignOutCommand { get; }
39 |
40 | public UserCard()
41 | {
42 | Username = GetUsername();
43 | UserProfileImage = GetUserProfileImage();
44 |
45 | OpenContextMenuCommand = new RelayCommand(OpenContextMenu);
46 | ChangeAccountPictureCommand = new RelayCommand(ChangeAccountPicture);
47 | LockCommand = new RelayCommand(Lock);
48 | SignOutCommand = new RelayCommand(SignOut);
49 | }
50 |
51 | private string GetUsername()
52 | {
53 | return WindowsIdentity.GetCurrent().Name.Split('\\')[1];
54 | }
55 |
56 | private BitmapImage GetUserProfileImage()
57 | {
58 | string userImagePath = GetUserProfilePicturePath();
59 | if (File.Exists(userImagePath))
60 | {
61 | return LoadImage(userImagePath);
62 | }
63 | else
64 | {
65 | string defaultImagePath = @"C:\ProgramData\Microsoft\User Account Pictures\user-192.png";
66 | if (File.Exists(defaultImagePath))
67 | {
68 | return LoadImage(defaultImagePath);
69 | }
70 | }
71 | return null;
72 | }
73 |
74 | private BitmapImage LoadImage(string imagePath)
75 | {
76 | BitmapImage bitmap = new BitmapImage();
77 | bitmap.BeginInit();
78 | bitmap.UriSource = new Uri(imagePath);
79 | bitmap.CacheOption = BitmapCacheOption.OnLoad;
80 | bitmap.EndInit();
81 | return bitmap;
82 | }
83 |
84 | private string GetUserProfilePicturePath()
85 | {
86 | string profilePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
87 | string imagePath = Path.Combine(profilePath, "AppData", "Roaming", "Microsoft", "Windows", "AccountPictures");
88 | if (Directory.Exists(imagePath))
89 | {
90 | var files = Directory.GetFiles(imagePath, "*.jpg");
91 | if (files.Length > 0)
92 | {
93 | return files[0];
94 | }
95 | }
96 | return null;
97 | }
98 |
99 | private void OpenContextMenu(object parameter)
100 | {
101 | if (parameter is Button button)
102 | {
103 | button.ContextMenu.PlacementTarget = button;
104 | button.ContextMenu.Placement = System.Windows.Controls.Primitives.PlacementMode.Bottom;
105 | button.ContextMenu.IsOpen = true;
106 | }
107 | }
108 |
109 | [DllImport("user32.dll")]
110 | private static extern bool LockWorkStation();
111 |
112 | private void Lock(object parameter)
113 | {
114 | LockWorkStation();
115 | }
116 |
117 | [DllImport("user32.dll", SetLastError = true)]
118 | private static extern bool ExitWindowsEx(uint uFlags, uint dwReason);
119 |
120 | private const uint EWX_LOGOFF = 0x00000000;
121 |
122 | private void SignOut(object parameter)
123 | {
124 | ExitWindowsEx(EWX_LOGOFF, 0);
125 | }
126 |
127 | private void ChangeAccountPicture(object parameter)
128 | {
129 | Process.Start(new ProcessStartInfo("ms-settings:yourinfo") { UseShellExecute = true });
130 | }
131 |
132 | public event PropertyChangedEventHandler PropertyChanged;
133 |
134 | protected void OnPropertyChanged(string propertyName)
135 | {
136 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
137 | }
138 | }
139 |
140 | public class RelayCommand : ICommand
141 | {
142 | private readonly Action