Click here to Skip to main content
15,912,069 members
Home / Discussions / C#
   

C#

 
AnswerRe: Issues with using C# library in Excel 2007 VBA Pin
TnTinMn6-Jan-14 12:03
TnTinMn6-Jan-14 12:03 
Questionwpf prompbox Pin
Member 93270026-Jan-14 3:40
Member 93270026-Jan-14 3:40 
AnswerRe: wpf prompbox Pin
Pete O'Hanlon6-Jan-14 3:59
mvePete O'Hanlon6-Jan-14 3:59 
QuestionPopulate a DVG from a csv file Pin
JOHNNYDEMICHAEL5-Jan-14 7:45
JOHNNYDEMICHAEL5-Jan-14 7:45 
AnswerRe: Populate a DVG from a csv file Pin
Dave Kreskowiak5-Jan-14 8:27
mveDave Kreskowiak5-Jan-14 8:27 
GeneralRe: Populate a DVG from a csv file Pin
JOHNNYDEMICHAEL5-Jan-14 12:13
JOHNNYDEMICHAEL5-Jan-14 12:13 
GeneralRe: Populate a DVG from a csv file Pin
Dave Kreskowiak5-Jan-14 12:24
mveDave Kreskowiak5-Jan-14 12:24 
GeneralRe: Populate a DVG from a csv file Pin
JOHNNYDEMICHAEL8-Jan-14 0:58
JOHNNYDEMICHAEL8-Jan-14 0:58 
GeneralRe: Populate a DVG from a csv file Pin
Dave Kreskowiak8-Jan-14 2:53
mveDave Kreskowiak8-Jan-14 2:53 
GeneralRe: Populate a DVG from a csv file Pin
JOHNNYDEMICHAEL9-Jan-14 2:28
JOHNNYDEMICHAEL9-Jan-14 2:28 
GeneralRe: Populate a DVG from a csv file Pin
Dave Kreskowiak9-Jan-14 4:25
mveDave Kreskowiak9-Jan-14 4:25 
AnswerRe: Populate a DVG from a csv file Pin
OriginalGriff5-Jan-14 23:03
mveOriginalGriff5-Jan-14 23:03 
AnswerRe: Populate a DVG from a csv file Pin
Eddy Vluggen6-Jan-14 8:13
professionalEddy Vluggen6-Jan-14 8:13 
QuestionReading values from window-form to XNA Pin
larsp7775-Jan-14 0:42
larsp7775-Jan-14 0:42 
AnswerRe: Reading values from window-form to XNA Pin
Ron Beyer5-Jan-14 17:52
professionalRon Beyer5-Jan-14 17:52 
GeneralRe: Reading values from window-form to XNA Pin
larsp7775-Jan-14 22:09
larsp7775-Jan-14 22:09 
GeneralRe: Reading values from window-form to XNA Pin
Ron Beyer6-Jan-14 7:44
professionalRon Beyer6-Jan-14 7:44 
GeneralRe: Reading values from window-form to XNA Pin
larsp7776-Jan-14 8:24
larsp7776-Jan-14 8:24 
GeneralRe: Reading values from window-form to XNA Pin
larsp7773-Feb-14 22:00
larsp7773-Feb-14 22:00 
Questionhow i can auto searching devices and sending file with bluetooth using 32feet ,C#,WPf Pin
h.k_net4-Jan-14 21:32
h.k_net4-Jan-14 21:32 
AnswerRe: how i can auto searching devices and sending file with bluetooth using 32feet ,C#,WPf Pin
Kornfeld Eliyahu Peter4-Jan-14 22:29
professionalKornfeld Eliyahu Peter4-Jan-14 22:29 
QuestionCreating C# TCP listener windows Service Pin
Tobben_4-Jan-14 11:47
Tobben_4-Jan-14 11:47 
AnswerRe: Creating C# TCP listener windows Service Pin
Ron Beyer4-Jan-14 12:00
professionalRon Beyer4-Jan-14 12:00 
QuestionGetting Thread Exception: while using System.Timer Class Pin
Member 99612394-Jan-14 7:16
Member 99612394-Jan-14 7:16 
Hi I am using System.Timer class in my xaml.cs class.
my MainWindow Constructor looks like as below

public MainWindow()
{
Timer timer = new Timer(3000);
InitializeComponent();
timer.Interval = 3.0;
timer.Elapsed += new System.Timers.ElapsedEventHandler(LoadObjectValue);
}

OnButton Click i am starting the Timer

private void Button_Click(object sender, RoutedEventArgs e)
{
timer.Enabled=true;
}

My LoadObjectValue method looks like below
void LoadObjectValue(object sender, ElapsedEventArgs e)
{
dataGrid.ItemsSource = DeviceObjectVM.DeviceObjectCollection; //ObservableCollection
}

But when i am executing i am getting Exception: "Calling Thread can not access the because it owns by the other thread". It looks like my dataGrid is owns by the UI Thread and my Timer is running on the other thread. Which does not have access to dataGrid. How Can i set ItemSource of datagrid using Timer.

Please Help.
AnswerRe: Getting Thread Exception: while using System.Timer Class Pin
Pete O'Hanlon4-Jan-14 8:15
mvePete O'Hanlon4-Jan-14 8:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.