question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom dialog view not binding to vm

See original GitHub issue

Hi,

I am using version 2.5.0.71-nightly

So i have a custom view inheriteted from reactiveusercontrol with a textbox text value bound to Name

i have a viewmodel inherited from viewmodelbase with [Reactive] public string Name { get; set; } (I have foddy installed too)

and i create a new custom dialog like so:

NewObsConnectionViewModel vm = new NewObsConnectionViewModel();
            Window? window = LifetimeHelper.GetMainLifetime().MainWindow;
            DialogResult? result = awaitDialogHelper.CreateCustomDialog(new CustomDialogBuilderParams
{
                Borderless = true,
                ContentHeader = "test",
                Content = vm,
                DialogButtons = new[]
                {
                    new DialogResultButton { Content = "Add", Result = "ok" },
                    new DialogResultButton { Content = "Cancel", Result = "cancel" }
                }}).ShowDialog(window);

even if i new up the usercontrol and set that to the content and the datacontext to the vm i get the same results.

The Dialog actually shows up with the controls etc it just seems that the datacontext isnt being applied?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
appleneko2001commented, Feb 15, 2022

Hi @sabuto ! Thanks for your contribution too🥳 That news was important for me.

Later we will release 3.0. There will have a API breaks on Theming feature and Dialogs. Styles will be changed by following standard of authoring controls (add root border (used for BorderBrush and BorderThickness property, with element name) and panel (allows more elements on root border, with element name) and etc.)

1reaction
sabutocommented, Feb 14, 2022

that works for me, awesome thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

DialogFragment with view model not working with data ...
Dialog consist of one button (custom view). when using view model with data binding, button click is not working when livedata change.
Read more >
WPF MVVM custom dialog binding does not update the ...
Hi, I have implemented a custom dialog based on this Devexpress example. All is working fairly well, UI controls are displaying virtual ...
Read more >
A MVVM way to show and hide CustomDialog · Issue #3446
To show a CustomDialog in VM I must call dialogCoordinator. ... Binding Request to VM's property, trigger it by binding anyother commands.
Read more >
Dialogs In WPF (MVVM)
Dialog window should appear and result variable should have a DialogResult.Undefined value after closing the dialog. PART 3. DIALOG VIEW. Step ...
Read more >
Dialog Service
Create Your Dialog View · Create Your Dialog ViewModel · Register the Dialog · Using the Dialog Service · Register a Custom Dialog...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found