KeldorKatarn
Topic Author
Posts: 243
Joined: 30 May 2014, 10:26

Re: Caliburn.Noesis (Caliburn.Micro port)

10 May 2021, 20:11

It is necessary. I also ran into a couple problems implementing my current sample, which is supposed to look a little more beautiful.
The most pressing things that are right now blocking me from getting it to run in Unity are these:

#2016
#2015
#2013
#2008
#2006
#2004
#1041

You can check my feature/conductor_sample branch on my Caliburn.Noesis github to see what I do with them.
https://github.com/VacuumBreather/Calib ... tor_sample

The biggest issues are there trying to create a Brush animation, a custom ItemsControl (can't define its container type) and a custom decorator border (no access to OnRender most importantly).

This is what I'm working on (WIP):
sample_screenshot.jpg
 
KeldorKatarn
Topic Author
Posts: 243
Joined: 30 May 2014, 10:26

Re: Caliburn.Noesis (Caliburn.Micro port)

24 May 2021, 03:32

Added some helper controls for easier transitions. Inspired by MaterialDesignInXamlToolkit but heavily refactored. I didn't enjoy that API.

Examples are in this branch https://github.com/VacuumBreather/Calib ... ransitions
(still waiting for Noesis API to catch up before merging back. This yet again needs the methods which define container element types).
<transitions:Transitioner
            x:Name="Transitioner"
            AutoApplyTransitionOrigins="True"
            BackwardWipe="{transitions:SlideOutWipe}"
            ForwardWipe="{transitions:CircleWipe}"
            IsLooping="True"
            ItemsSource="{Binding Items, Mode=OneWay}"
            SelectedItem="{Binding ActiveItem, Mode=TwoWay}" />
    <UserControl.Resources>

        <Style BasedOn="{StaticResource {x:Type TextBlock}}" TargetType="TextBlock">
            <Setter Property="FontSize" Value="36" />
            <Setter Property="FontWeight" Value="Bold" />
            <Setter Property="Foreground" Value="White" />
        </Style>

        <Style BasedOn="{StaticResource {x:Type transitions:TransitioningContentControl}}" TargetType="transitions:TransitioningContentControl">
            <Setter Property="Margin" Value="10" />
            <Setter Property="HorizontalAlignment" Value="Center" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="TransitionTriggers" Value="IsEnabled" />
            <Setter Property="TransitionDelay" Value="0:0:0.5" />
            <Setter Property="TransitionEffect">
                <Setter.Value>
                    <transitions:SlideTransition
                        ContainerElementName="RootGrid"
                        Direction="Left"
                        Duration="0:0:1">
                        <transitions:SlideTransition.EasingFunction>
                            <ElasticEase
                                EasingMode="EaseOut"
                                Oscillations="3"
                                Springiness="8" />
                        </transitions:SlideTransition.EasingFunction>
                    </transitions:SlideTransition>
                </Setter.Value>
            </Setter>
        </Style>

    </UserControl.Resources>

    <Grid x:Name="RootGrid" Background="OrangeRed">
        <ItemsControl
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            transitions:TransitionSubjectBase.CascadingDelay="0:0:0.5">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal" />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>

            <transitions:TransitioningContentControl>
                <TextBlock Text="Here" />
            </transitions:TransitioningContentControl>

            <transitions:TransitioningContentControl>
                <TextBlock Text="we" />
            </transitions:TransitioningContentControl>

            <transitions:TransitioningContentControl>
                <TextBlock Text="go!" />
            </transitions:TransitioningContentControl>
        </ItemsControl>
    </Grid>        
 
KeldorKatarn
Topic Author
Posts: 243
Joined: 30 May 2014, 10:26

Re: Caliburn.Noesis (Caliburn.Micro port)

25 May 2021, 12:10

All the current feature branches show which APIs are missing and prevent those features from being merged.
I'm deliberately trying to integrate the most useful and commonly used WPF (cool stuff) I can find, to show which APIs need to be added for Noesis
to be fully useable by an experienced WPF developer and allow for further cool WPF libraries to be ported.

The feature branches therefore show very realistic Use Cases for the missing APIs.
 
User avatar
jsantos
Site Admin
Posts: 4822
Joined: 20 Jan 2012, 17:18
Contact:

Re: Caliburn.Noesis (Caliburn.Micro port)

25 May 2021, 12:19

All the current feature branches show which APIs are missing and prevent those features from being merged.
Thanks for this, could you please add all the pending tickets to the Caliburn metaticket (#1038) ?
Also if you could sort by priority that would be super helpful.
 
KeldorKatarn
Topic Author
Posts: 243
Joined: 30 May 2014, 10:26

Re: Caliburn.Noesis (Caliburn.Micro port)

25 May 2021, 13:18

I will try to sort and add them later today :)
 
KeldorKatarn
Topic Author
Posts: 243
Joined: 30 May 2014, 10:26

Re: Caliburn.Noesis (Caliburn.Micro port)

25 May 2021, 14:55

Ok I added a priority to them, which I think is the right order. The Attributes are kind of low down but on the other hand should be incredibly easy to add since they're just meta data marker attributes.

The On<Event> methods and missing constructors and such are however incredibly important. Without those there's basically nothing working that I'm trying to do. And the Source/OriginalSource issue needs to be fixed. A ton of stuff relies on those properties being correct.
 
KeldorKatarn
Topic Author
Posts: 243
Joined: 30 May 2014, 10:26

Re: Caliburn.Noesis (Caliburn.Micro port)

21 Jun 2021, 04:16

Going into summer break with this project :) Hoping for the additional API to get this where it needs to be at the end up summer :)
I might reduce the scope slightly from a few ideas I had initally but I'd like to at least get the windowing and dialog system in there :)
And maybe the transitions.
 
KeldorKatarn
Topic Author
Posts: 243
Joined: 30 May 2014, 10:26

Re: Caliburn.Noesis (Caliburn.Micro port)

14 Jan 2025, 00:21

Back after a long time. I have ported over the latest version of Caliburn, the 5.0 beta.
There seem to be good news. I got all features working with minor issues. I had to use some stuff like TriggerBase from NoesisApp namespace for the API I need.
That probably needs to be corrected for since I'm getting a few errors (despite it all actually working seemingly)

I'll do some final cleanup this week and then show the diff of what I needed to change (not a lot actually). I think we're close to getting this as a feature complete and ready for use library.
I'll turn it into a Unity package.json that can be imported from GitHub, so you guys can test it, once I'm done with the cleanup.

I decided to for now keep it 1:1 in terms of features with the original Caliburn.Micro

I have ideas on how to expand it, with drag&drop features and transitions and some such, but I think I'll put that in an expansion library, and keep this one 1:1 a copy of Caliburn, so I can keep it in lock step with any changes to the Caliburn.Micro repo.
 
KeldorKatarn
Topic Author
Posts: 243
Joined: 30 May 2014, 10:26

Re: Caliburn.Noesis (Caliburn.Micro port)

14 Jan 2025, 01:50

Quick followup before I go to bed: The main issue seems to be the trigger types:

TriggerBase
EventTrigger
TriggerAction

Those seem to be missing some constructors and also seem to have duplicates in the NoesisApp namespace (which happen to have the missing API)

Also RoutedEventArgs has no parameterless constructor, although I'm not sure how relevant that is, I'll post the diff soon, so you can see what I had to change.
I'm getting some type errors due to the NoesisApp thing, so the types are wrong. But overall, we're 95% there.

I haven't tested everything yet but most of the conventions work. Buttons bind via name to methods, parameter conventions are automatically recognized, async methods are wound down via the Caliburn couroutine code (that could eventually be updated to async/await being the core, but I want to keep that in sync with Caliburn.Micro, and it works just fine.

Oh and.. Dispatcher is missing the InvokeAsync method. That would be nice to have. Also you mentioned the main thread dispatcher is shared by all views and stays alive until the application shuts down. If that is so, it would be really nice if there was any static way to access it. But it's not necessary 100%, I found another way to get my dispatcher. But.. something like Application.Current.Dispatcher would be neat and make a few things easier, if a tad coupled.

I'll report back soon, but I'd say a few tiny changes and we can make Caliburn.Noesis official.
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: Caliburn.Noesis (Caliburn.Micro port)

14 Jan 2025, 11:31

Thanks for sharing this and make it publicly available.

Regarding the Trigger questions I want to remark that the classes found in NoesisApp namespace are our implementation for the Microsoft Behaviors extension, and are not compatible with the core ones defined in Noesis namespace. If you need anything that is missing in the core triggers from WPF API please create a ticket in our bugtracker and we will fix it.

Who is online

Users browsing this forum: No registered users and 8 guests