Custom dialog view not binding to vm
See original GitHub issueHi,
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:
- Created 2 years ago
- Comments:5
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.)
that works for me, awesome thanks