Skip to content

Conversation

@hez2010
Copy link
Member

@hez2010 hez2010 commented Feb 24, 2025

Expander is buggy and its OnApplyTemplate is not usable. Retarget it to ContentControl and remove the unused titlebar and expand (enlarge) features.

Resolves the missing styles and crashing issue.

@0x5bfa
Copy link
Member

0x5bfa commented Feb 24, 2025

If you you like this SG for BladeItem for the sake of the simplicity:)
We use this in other controls like here.

[DependencyProperty<Brush>("CloseButtonBackground")]
[DependencyProperty<Visibility>("CloseButtonVisibility")]
[DependencyProperty<bool>("IsOpen", nameof(OnIsOpenPropertyChanged), DefaultValue = "true")]
[DependencyProperty<Brush>("CloseButtonForeground", DefaultValue = "(Brush)Colors.Black")]
public partial class BladeItem {}

protected virtual void OnIsOpenPropertyChanged(bool oldValue, bool newValue) {}

This is not well-made but it's because WCT Labs now has a much better SG and analyzers for this using partial props.

@hez2010
Copy link
Member Author

hez2010 commented Feb 24, 2025

If you you like this SG for BladeItem for the sake of the simplicity:)

Nope. This would hide those properties from being seen by other source generators. Today a source generator cannot see anything generated by another source generator.

@yaira2 yaira2 changed the title Fixes: Retarget BladeView to ContentControl Code Quality: Retarget BladeView to ContentControl Feb 24, 2025
@yaira2 yaira2 added the ready for review Pull requests that are ready for review label Feb 24, 2025
Copy link
Member

@yaira2 yaira2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed ready for review Pull requests that are ready for review labels Feb 24, 2025
@yaira2 yaira2 merged commit 2382d81 into files-community:main Feb 24, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to merge Pull requests that are approved and ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants