Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

0x5bfa/TrayIconFlyout

Repository files navigation

Tray Icon Flyout

Empower your app with a flyout for its tray icon in WinUI 2/3.

Installing the package

You can consume this project via NuGet. Use NuGet Package Manager or run the following command in the Package Manager Console:

UWP/WinUI 2

> dotnet add package 0x5BFA.TrayIconFlyout.Uwp --prerelease

WindowsAppSDK/WinUI 3

> dotnet add package 0x5BFA.TrayIconFlyout.WinUI --prerelease

Usage

There are two flyouts are available in this project. One is TrayIconFlyout for the Shell Flyout behavior, and the other is TrayIconMenuFlyout for the Context Menu behavior.

TrayIconFlyout

<me:TrayIconFlyout x:Class="..." ... Width="360">

    <me:TrayIconFlyoutIsland Height="300">
        <!-- Put elements here -->
    </me:TrayIconFlyoutIsland>
    <me:TrayIconFlyoutIsland Height="300">
        <!-- Put elements here -->
    </me:TrayIconFlyoutIsland>

</me:TrayIconFlyout>
if (_trayIconFlyout.IsOpen)
    _trayIconFlyout.Hide();
else
    _trayIconFlyout.Show();

TrayIconMeunFlyout

<me:TrayIconMenuFlyout x:Class="..." ...>

    <MenuFlyoutSubItem Text="Settings">
        <MenuFlyoutSubItem.Icon>
            <FontIcon Glyph="..." />
        </MenuFlyoutSubItem.Icon>
        <MenuFlyoutSubItem.Items>
            <MenuFlyoutItem Text="Theme" />
            <MenuFlyoutItem Text="Language" />
            <MenuFlyoutItem Text="Privacy" />
        </MenuFlyoutSubItem.Items>
    </MenuFlyoutSubItem>
    <MenuFlyoutSeparator />
    <MenuFlyoutItem Text="Exit">
        <MenuFlyoutItem.Icon>
            <FontIcon Glyph="..." />
        </MenuFlyoutItem.Icon>
    </MenuFlyoutItem>

</me:TrayIconMenuFlyout>
if (_trayIconMenuFlyout.IsOpen)
    _trayIconMenuFlyout.Hide();

_trayIconMenuFlyout.Show(e.Point);

Building from the source

  1. Prerequisites
    • Windows 10 (Build 10.0.17763.0) onwards and Windows 11
    • Visual Studio 2022
    • .NET 9/10 SDK
  2. Clone the repo
    git clone https://github.com/0x5bfa/TrayIconFlyout.git
  3. Open the solution
  4. Build the solution

Screenshot

Recording.2025-10-14.235520.mp4

About

Empower your app with a shell flyout that pops up from a tray icon.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors 2

  •  
  •  

Languages