How to set a WPF C# window above desktop wallpaper and under desktop icons

  .net-core, c++, window, windows, wpf

I want to create a live wallpaper application with WPF and want to create a window playing a video/image

I want to set the window below the desktop icons as it will appear as wallpaper by removing the title bar.

In short i want to set window as it will appear as wallpaper below app icons.

This is my first project so i dont know much about WPF.

MainWindow.xaml code

<Window x:Class="WpfApp1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp1"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
    </Grid>
</Window>

MainWindow.xaml.cs code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WpfApp1
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
    }
}

This is the startup code we get after creating a new WPF project.

I want to make this window appear below App icons.

Source: Windows Questions

LEAVE A COMMENT