mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Wait for UI to render before Populating
This commit is contained in:
@@ -27,6 +27,24 @@ namespace DICUI
|
||||
private Options _options;
|
||||
private OptionsWindow _optionsWindow;
|
||||
|
||||
bool _shown;
|
||||
|
||||
protected override void OnContentRendered(EventArgs e)
|
||||
{
|
||||
base.OnContentRendered(e);
|
||||
|
||||
if (_shown)
|
||||
return;
|
||||
|
||||
_shown = true;
|
||||
|
||||
// Populate the list of systems
|
||||
PopulateSystems();
|
||||
|
||||
// Populate the list of drives
|
||||
PopulateDrives();
|
||||
}
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -35,11 +53,7 @@ namespace DICUI
|
||||
_options = new Options();
|
||||
_options.Load();
|
||||
|
||||
// Populate the list of systems
|
||||
PopulateSystems();
|
||||
|
||||
// Populate the list of drives
|
||||
PopulateDrives();
|
||||
}
|
||||
|
||||
#region Events
|
||||
|
||||
Reference in New Issue
Block a user