lepoco / lepoco/wpfui

TitleBar gives an NULLREF exception

Open
#962 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
9.6k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

Getting a nullreff in the class TitleBar.cs
CrashNULLREF

To Reproduce

<ui:FluentWindow x:Class="FancyAI.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:FancyAI"
xmlns:tray="http://schemas.lepo.co/wpfui/2022/xaml/tray"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
WindowCornerPreference="Round"
ExtendsContentIntoTitleBar="True"
WindowBackdropType="Mica"
Background="#55AABBCC"
mc:Ignorable="d"
Title="Fancy AI"
Height="450"
Width="800">

<ui:TitleBar x:Name="TitleBar"
VerticalAlignment="Top"
Height="32"
Title="{Binding ViewModel.ApplicationTitle}"
Grid.Row="0" />

</ui:FluentWindow>

Expected behavior

Show the titlebar...

Screenshots

No response

OS version

Windows 11

.NET version

.net framework 4.8

WPF-UI NuGet version

3.0

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting TitleBar.cs and reproducing the provided FluentWindow/XAML example with WPF-UI 3.0 on Windows 11 and .NET Framework 4.8. Trace the null reference and confirm that the TitleBar renders without the exception; the issue does not identify a test or a more specific expected change.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.