Click here to Skip to main content
14,877,782 members

Comments by Renat Khabibulin (Top 9 by date)

Renat Khabibulin 22-Nov-11 20:10pm View
I know difference between Invoke and BeginInvoke :) I ll try to use EventLog to understand what happens...
Renat Khabibulin 22-Nov-11 20:08pm View
In case when I use BeginInvoke() then foreach doesn't ends because I get exception after first result returned because it's navigation properties are NULLs and I am trying to use them. I think that I will have to solve problem of thread safety after I understand why navigation properties are NULL in case of BeginInvoke()
Renat Khabibulin 17-Oct-11 16:28pm View
Just DataGrid...ok, I ll add some sources now
Renat Khabibulin 13-Oct-11 20:13pm View
I remove TwoWay binding from SelectedIndex to prevent changes in DataContext. I have added following code that is called each time DataContext changed:
for (int i = 0; i < Tabs.Count; i++)
if (Tabs[i].IsSelected)
SelectedIndex = i;

SelectedIndex=0 (first tab), but NOTHING IS SELECTED!
Renat Khabibulin 13-Oct-11 19:36pm View
I have tried force OnPropertyChanged("SelectedIndex") after DataContext's changed. Doesn't help. I select any Tab and begin change DataContext's, then while this process somehow SelectedIndex = -1...I just cant understand how...Seems that DataContext is not disconnected with another ListBoxItem where TabControl doesnt't has SelectedItem. And thanks to TwoWay binding, -1 from another ListBoxItem binds to DataContext and then to current TabControl
Renat Khabibulin 13-Oct-11 18:30pm View
You are right, main DataContext contains another DataContext's. But Header and Data (from that contexts) are binded correctly. Problem is only with SelectedItem. I have tried to add SelectedIndex into main DataContext and create TwoWay binding with TabControl.SelectedIndex, but it doesnt help
Renat Khabibulin 5-Apr-11 2:28am View
- The type or namespace name 'BinaryReader' could not be found .......
- The type or namespace name 'FileStream' could not be found ........

if namespace not found, place cursor on missed word and press Alt+Shift+F10. If it is available on any available namespace then VS will show popup with this namespace.
Renat Khabibulin 5-Apr-11 2:26am View
add line

using System.IO;
Renat Khabibulin 4-Apr-11 11:59am View

this article should help you. There is described how to notify subscribers of web service