WPF-Forge/Forge.Forms

Wiki topics

edongashi opened this issue · 5 comments

  • Annotations
  • Control layout
  • ModelState API
  • Themes and styles
  • Building custom controls
  • Form building internals
  • XML
  • Hooks and interceptors
  • DynamicDataGrid
  • Environments
  • Binding syntax
  • Validation

Do you have an example of how to show a dialogue with background dimmed from code? I had a look at the demo but can't figure it out.

I added this code to the XAML

<materialDesign:Card Grid.Row="0" 
                                     Grid.RowSpan="2"
                                     Grid.Column="0" 
                                     Margin="8"
                                     VerticalAlignment="Center">
                    <ScrollViewer VerticalScrollBarVisibility="Auto">
                        <controls:DynamicForm Margin="16,16,16,8" Model="{Binding DynamicFormDialogModel}" />
                    </ScrollViewer>
                </materialDesign:Card>

Then added a model DynamicFormDialogModel in the view model. This works but it doesn't dim the background like this
image

is adding XAML code <controls:DynamicForm necessary?

is it possible to just create the class and call the dialog from the view model?
something like the following

Login LoginDialog = new Login();
LoginDialog.Username = "John";
var dialgResult = await Forge.Forms.Show.Dialog(LoginDialog);
//dialogResult contains the username and password

Hey, yeah we have exactly that, there is a demo item with dialogs for reference.

Syntax is like this Show.Dialog().For<Login>() plus overloads. Show.Dialog and Window accept additional settings related to the hosting component.

@edongashi thanks will give this ago. I sent you a message from your website.

Just saw it, ill respond in email. I'll also send you a slack invite of the project chat