Permalink
Browse files

Trigger data context changed when loading a form to get initial values

  • Loading branch information...
1 parent 2935fcd commit c53c03e3e3491c53b9c9b0a118f04b9764323430 @cwensley cwensley committed Apr 1, 2014
Showing with 3 additions and 0 deletions.
  1. +1 −0 Source/Eto/Forms/Dialog.cs
  2. +1 −0 Source/Eto/Forms/Form.cs
  3. +1 −0 Source/Eto/Forms/ModalWindow.cs
@@ -95,6 +95,7 @@ public DialogResult ShowDialog(Control parent = null)
{
OnPreLoad(EventArgs.Empty);
OnLoad(EventArgs.Empty);
+ OnDataContextChanged(EventArgs.Empty);
OnLoadComplete(EventArgs.Empty);
}
View
@@ -58,6 +58,7 @@ public void Show()
{
OnPreLoad(EventArgs.Empty);
OnLoad(EventArgs.Empty);
+ OnDataContextChanged(EventArgs.Empty);
OnLoadComplete(EventArgs.Empty);
}
@@ -85,6 +85,7 @@ public void ShowModal(Action completed, Control parent = null)
{
OnPreLoad(EventArgs.Empty);
OnLoad(EventArgs.Empty);
+ OnDataContextChanged(EventArgs.Empty);
OnLoadComplete(EventArgs.Empty);
}

0 comments on commit c53c03e

Please sign in to comment.