I've recently been using the MVVM light toolkit for Silverlight 4.
I really like the EventToCommand behaviour that is included, it makes life a lot easier. One thing I've been wondering about is if setting PassEventArgsToCommand="True" is bad practice as it will tie a particular RelayCommand to a particular event in the View.
E.g. If ...
BitmapImage bitmapImage = new BitmapImage(new Uri("arka_projects_as_logo.png", UriKind.Relative));
Image uiElement = new Image() { Source = bitmapImage };
ScaleTransform t = new ScaleTransform() { ScaleX = 0.2, ScaleY = 0.2 };
WriteableBitmap writeableBitmap = new WriteableBitmap(uiElement,t);
I want to insert the result of this conver...
Hi All,
In my SL4 App I have a Parent Page where I'm displaying a datagrid.
I open the ChildWindow when the user selects a particular Row in the grid and clicks on Open button using the following code.
cwEditProduct ChildWin = new cwEditProduct(productId);
ChildWin.Closed += new EventHandler(ChildWin_Closed);
ChildWin.Show();
and Whe...
We have a Silverlight 4 client connecting to RIA services. It's based on the standard "Business Application" Silverlight application in VS 2010. The objects we send to the client over RIA services are EF 4 entities that are POCO objects generated from our edmx by T4. Our RIA service is a LinqToEntitiesDomainService<> of our linq reposito...
Hello,
Trying to implement a simple print in SL4. I have a DataGrid that I would like to print out, but thus far whatever I try to print out comes out as a blank page in the printer. It also seems to take about 30-60 seconds to actually print out (but that could be an unrelated issue).
My code is fairly straightforward:
private void M...
Suppose I have entity Person with properties typeid and salary. I build a business rule for this two properties like:
public static partial class MyRules
{
public static ValidationResult Rule1(Person p, ValidationContext context)
{
if ((p.typeid == 1) && ((p.salary == null))
{
...
I've implemented a drag and drop that is mostly working in my Silverlight 4 app. Once the users have dropped the shapes onto the canvas, I wanted to use Size & Child Decorators. I've tried to implement the sample code. Code below is problem section of much larger app.
xmal -
<ScrollViewer Grid.RowSpan="1" Grid.Row="2" Grid.ColumnSpa...
I have a TextBlock control, which is data bound to DateTime property.
The text displayed something like this:
Thursday, October 21, 2010
I need to switch UI Culture on the fly, using something like this:
Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture
= new CultureInf...
What is the best / good approach to bind Silverlight 4 TreeView control to a hierarchical data set returned by a WCF service, please?
Thanks,
Iegres.
...
Hi,
I have a small custom object defined as:
public class TimeSeriesDefinition
{
public int classID;
public DateTime startTime;
public DateTime endTime;
}
I'm passing a List classIDs, a List startTimes, and a List endTimes into an RIA Domain Service function. As a matter of organization, I was grouping these values into...
I am trying to implement reordering rows in a Silverlight DataGrid. For this I am extending the default DataGridDragDropTarget, and I need to override and implement the following method:
protected override DataGridRow ContainerFromIndex(DataGrid itemsControl, int index)
{
}
How can I get the DataGridRow from the DataGrid and the Inde...
I'm writing a windows phone 7 app. I have "fatal exception" handling code where I know for sure that the app is totally busted and there's no point in continuing. (I'm hoping I never get here...). Since there's nothing more my app can do other than quit I want the user to be able to close the app.
But I noticed there is no System.E...
In the source code of AutoCompleteBox (downloadable from Microsoft) I found the following:
/// <summary>
/// Called when the selected item is changed, updates the text value
/// that is displayed in the text box part.
/// </summary>
/// <param name="newItem">The new item.</param>
private void OnSelectedItemChanged(object newItem)
{
st...
Hi All,
I am currently working of automation of Office 2007 application, which is in windows forms .NET 2.0 with Office Interop library.
I would like to know, if can I use Silverlight 4 to make it web application and give users a full-fledged web-page where they can edit the document/excel sheet/presentation ? Also, would I be able to ...
Hi,
I have a Silverlight 4 application. The MainPage which is the RootVisual of the application has many controls on it - one of which is a user control called VideoPlayerView. What I would like is when a user clicks on the fullscreen icon on this control, for this control to "pop out" of the page and go full screen (i.e. all the other ...
I have a XAMl string table that is working a treat when i need to refer to it from my controls in XAML.
However I could also do with being able to access it for use in other sections of code - such as validation messages in my model. As you cannot add a resource file to a silverlight I beed to use this.
someone must know what i need to...
I'm completely new at silverlight, and trying to do things "the right way".
Problem is: I have an XML that I need to get from a web server, and I need to display that data in a datagrid.
I've searched around and I've managed to get the following:
say my XML looks like:
<customers>
<customer>
<name>A Person</name>
...
Why MVVM Model? What are the advantages and disadvantages?
Can you give me some links where I can understand easily, I know silverlight, but feeling very difficult to understand MVVM model.
Please provide some links , it will be very helps for newbies like me.
...
Anyone released any Silverlight 4.0 out-of-browser app yet? does it compare to AIR 2.0?
Question about Silverlight 4, it has some webview-like control where I can write HTML+CSS right? What rendering engine does it use? What ver of CSS does it support? IE? IE7?
Planning to learn either Adobe AIR or Silverlight, but have not decided...
Does Windows phone 7 have an OCR API?
...