WPF update other UI control from cyrrent window.

In our application sometimes we need that when we perform any cloud operation the it will take effect to other
UI control. hare is the sample:
  
private void LoadWMSComboInBuildingUI()
        {
            try
            {
                BuildingSetup obj;
                foreach (Window objWindow in Application.Current.Windows)
                {
                    string[] splitedNamespace = (objWindow.ToString()).Split('.');
                    string aClassNameFromCollection = splitedNamespace[splitedNamespace.Length - 1];
                    if (aClassNameFromCollection == "BuildingSetup")
                    {
                        obj = (BuildingSetup)objWindow;
                        obj.buildingTypecomboBox.Items.Clear();
                        BBuildingSetup ObjBBuildingSetup = new BBuildingSetup( foreach (EBuildingSetup objEclient in ObjBBuildingSetup.GetAllBuildingTYpe())
                        {
                                         obj.buildingTypecomboBox.Items.Add(objEclient.BuildingType);
                        }
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Combobox reloading problem", "Client Info", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }





Thank you.

Popular posts from this blog

WPF Crystal Report Viewer Using SAP

ASP.NET MVC razor SAP Crystal report