Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

556 compatibility inquiry avaloniaui #851

Open
wants to merge 162 commits into
base: master
Choose a base branch
from

Conversation

vb2ae
Copy link
Member

@vb2ae vb2ae commented Apr 2, 2023

Add Avalonia ui support

Updated dotnet.yml to refine NuGet push pattern. Replaced MessageBinder.SpecialValues.Add with TryAdd in tests. Removed redundant cast in ActionMessage.cs. Switched to ConcurrentDictionary in MessageBinder.cs and improved formatting. Enhanced ViewLocator.cs with custom name formatting and validation methods.
return providedValue;
}

if (CustomConverters.ContainsKey(destinationType)) {
if (CustomConverters.ContainsKey(destinationType))

Check notice

Code scanning / CodeQL

Inefficient use of ContainsKey Note

Inefficient use of 'ContainsKey' and
indexer
.
src/Caliburn.Micro.Platform/ViewLocator.cs Fixed Show fixed Hide fixed
rolled back some changes in viewmodellocator
add NameFormat validation to viewLocator
Added logging statements to various methods in `Screen.cs`,
`ActionMessage.cs`, `NavigationFrame.cs`, and `View.cs` to
log lifecycle events, execution context, content changes,
layout updates, and errors. Moved `elementToUse` assignment
in `ActionMessage.cs` for correct usage. Changed
`NavigationFrame` to inherit from `ContentControl` instead
of `TransitioningContentControl`. Updated `ExecuteOnLoad`
method in `View.cs` to use `Loaded` event for Avalonia.
Modified equality checks in `OnModelChanged` and
`OnContextChanged` methods in `View.cs` to use `==` instead
of `.Equals`. Refactored `SetContentPropertyCore` method in
`View.cs` for readability and added exception logging. Added
new method `GetContentPropertyName` in `View.cs` for
retrieving content property name with improved formatting.
{
Log.Info("Transition completed");
var control = e.To as UserControl;
if (control != null && e.To != e.From)

Check warning

Code scanning / CodeQL

Reference equality test on System.Object Warning

Reference equality for System.Object comparisons (
this
argument has type Object).
#if AVALONIA
public static bool ExecuteOnLoad(FrameworkElement element, EventHandler handler)
{
if (((Control)element).IsLoaded)

Check warning

Code scanning / CodeQL

Cast to same type Warning

This cast is redundant because the expression already has type Control.
if (args.OldValue == args.NewValue) {
static void OnModelChanged(DependencyObject targetLocation, DependencyPropertyChangedEventArgs args)
{
if (args.OldValue == (args.NewValue))

Check warning

Code scanning / CodeQL

Reference equality test on System.Object Warning

Reference equality for System.Object comparisons (
this
argument has type Object).
if (e.OldValue == e.NewValue) {
static void OnContextChanged(DependencyObject targetLocation, DependencyPropertyChangedEventArgs e)
{
if (e.OldValue == (e.NewValue))

Check warning

Code scanning / CodeQL

Reference equality test on System.Object Warning

Reference equality for System.Object comparisons (
this
argument has type Object).
@vb2ae vb2ae requested a review from maxkatz6 November 21, 2024 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compatibility inquiry - AvaloniaUI?
6 participants