-
Notifications
You must be signed in to change notification settings - Fork 3
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
ShowDialog #1
Comments
I removed the call to "window.Show()" completely in the So then it comes down to getting more WPF controls ported over to the Fabulous.WPF.View module. |
Oh great! Fabulous expects a single root by default. But if you found a way that suits you that's awesome. :)
For that, you will need to run the generator project with the following arguments
Once you do that, a file called {
"type": "System.Windows.Controls.Border",
"properties": [
]
}, This will make the generator generates a wrapper for Border without any property.
After compiling everything, you will be able to use it: View.Border(
cornerRadius = System.Windows.CornerRadius(15)
) This a mostly trial-and-error process. |
Also, there are quite a few values you can override in |
The View.Border is generating, and I can assign properties.
Property metadata:
|
Could you try to declare When a type is declared, the Generator automatically replaces the type (when required by a property) by |
It worked! I had to put UIElement above FrameworkElement though or else the generated code was in the wrong order. |
I am unsurprisingly stuck on the DockPanel.Dock attached property. I don't know how it would be possible for child elements to display attached properties in their c'tors; it seems like a more reasonable approach might be for View.DockPanel c'tor to have "childrenTop", "childrenLeft", "childrenRight" and "childrenLeft" lists in addition to "children". Then anything in "childrenTop", for example, could be added to the DockPanel's Dock dependency property. |
On second thought, the "LastChildFill" property requires there be one list. Maybe Children could be a list of a Dock discriminated union:
Then DockPanel Children could be a |
Sorry, I should have looked at what already exists in Fabulous for attached properties (Grid / .GridRow method)! |
First off, I love the idea of having a Fabulous.WPF that doesn't have the baggage of Xamarin for apps that only need to target WPF. This is very cool!
I have been doing a lot of Revit add-ins where I often need to load a window with ShowDialog. Any thoughts on how to load this way? I made a very quick attempt (without knowing what I was doing) to change WPFHost.SetRootView to call ShowDialog, but the blocking nature of the modal window caused issues (it seems to be preventing something else from initializing). The window loaded, but when I clicked a button I got "do no call dispatch during initialization"; so I am assuming that the modal window blocked initialization.
Maybe there could be a different way to run the app as a modal window.
The text was updated successfully, but these errors were encountered: