How to call a non-static function from a static one? Or get access from a static function to tw_tree?
A non-static field, method, or property "Window1.ReloadT ()" requires an object reference.
Window2
public void TextReload() { Window1.ReloadT(); Window1
public void ReloadT() { tw_tree.ItemsSource = null; } When changing public void ReloadT() to public static void ReloadT() , tw_tree can no longer be used:
A non-static field, method, or property "Window1.tw_tree" requires an object reference.
This is how a static function call normally occurs:
Window2
Window1.SplitArguments(); Window1
public static string[] SplitArguments(){}
<TreeView x:Name="tw_tree"- The TreeView belongs to the Window1 window. How then to access it from the second Window2 window? - codename0082016