Advanced Forum Search Results
-
This page provides few samples for DataGrid, one of them is setting the data source for the grid:
http://msdn2.microsoft.com/en-us/library/cc189058(vs.95).aspx
This is the sample that shows how to bind the DataGrid to data: DataGrid..::.ItemsSource
-
If you're creating a new application, these are the steps to add a DataGrid to it:
1. In VS, click create New Project, select C# (or VB), select Silverlight, Click Silverlight Application on the right then OK
2. Open Page.xaml
3. Drag-drop DataGrid from the toolbox inside the XAML <Grid></Grid> tags, same with Button, etc
Did ...
-
This is how to fix it:
1. Remove the () after OnTick: new EventHandler(OnTick);
2. The OnTick method should take 2 parameters: sender and EventArgs. This is a sample code that compiles:
public partial class Page : UserControl
{
public ...
-
Hi dotnetmac,
What happens when you try creating the controls? Do you get an error message? What is the failure message/dialog/error text that you're seeing?
btw maybe the issue is with System.Windows.Controls.Data because Button is from the System.Windows.Controls namespace.
-
I've had the same error few days ago and spent quite a bit of time investigating it. It seems to appear in several cases. At the end I created a walkthrough and posted it here: Visual Studio 2008 Walkthrough: Creating, Hosting and Using WCF Services with Silverlight 2 Beta 1
My best guesses at the moment for this issue are: 1. either the ...
-
[quote user="jackbond"]
[quote user="Nokola"]DispatcherTimer is probably preferred (easier to read) in this case.[/quote]
I saw your post here and your blog entry. They're a little confusing as you are creating a Timer with the sole purpose of invoking on the ui thread, which is basically the DispatcherTimer's ...
-
DispatcherTimer is probably preferred (easier to read) in this case. The Dispatcher.BeginInvoke is the usual "invoke on UI thread' code that I use so it came first to mind.
-
[quote user="yelong"]
how to call from ui thread?
thanks,
[/quote]
Using the Dispatcher, this is one way to do it:
this.Dispatcher.BeginInvoke(new Action(MyFunction));
private void MyFunction()
{
//... insert code here ...
-
Another way to do it is to use the Dispatcher, so you don't have to create an extra background worker
Action _onTimerAction = new Action(OnTimer);Timer _timer = new Timer(new TimerCallback(delegate(object action) { ...
-
Here's a walkthrough for creating a WCF service and calling it from Silverlight and sample code: http://blogs.msdn.com/nikola/archive/2008/03/12/visual-studio-2008-walkthrough-creating-hosting-and-using-wcf-services-with-silverlight-2-beta-1.aspx