c# - wpf combobx function operating on a delay -


    private void messagetypemenu_selectionchanged(object sender, selectionchangedeventargs e)     {         string option = messagetypemenu.text;         if (option.equals("errors"))         {             logparser.information = false;             logparser.messages = false;             logparser.errors = true;         }         if (option.equals("information"))         {             logparser.information = true;             logparser.messages = false;             logparser.errors = false;         }         if (option.equals("messages"))         {             logparser.information = false;             logparser.messages = true;             logparser.errors = false;         }     } 

is function supposed update static class depending on selected value. however, operating on delay , im not sure why.

for context, information, messages, , errors 3 different message type logs stored in file parsing. when selected information , hits view or save, should logs of type. however, appears operating on delay.

for example, if load in file of logs , select information, show me whoel file. if switch messages, see information. if switch information, show messages , on. seems combobox looking @ value present when go change this, im not sure why.

in order stay synchronized window, should consider using observable pattern , implement inotifypropertychanged combined bindings. need redesign application since can't implement interfaces on static classes may worth it.

another way using dependency properties.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -