silverlight-4.0

How can i navigate one xaml page to another?

◇◆丶佛笑我妖孽 提交于 2019-12-04 02:59:12
i have 2 page i need to navigate mainpage.xaml to login.page xaml but it throws me Object reference not set to an instance of an object. in Root.Children.Clear();.... i added this codes in App.xaml: private void Application_Startup(object sender, StartupEventArgs e) { Grid myGrid = new Grid(); myGrid.Children.Add(new MainPage()); this.RootVisual = myGrid; } and than i adde some codes on main.xaml to navigate to LoginUI.xaml namespace Gen.CallCenter.UI { public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); Grid Root = ((Grid)(this.Parent)); Root.Children

“CreateRiaClientFilesTask” task failed unexpectedly

狂风中的少年 提交于 2019-12-04 02:38:34
This error has started occuring when attempting to build my VS 2010 Silverlight project after some minor changes to my RIA domain services, which are hosted within the Silverlight website application. There appears to be no reason for this error and I cannot understand the access denied part of the error. Things I have tried: 1) Full clean of all projects in the solution and re-build 2) Deletion of all temporary ASP.Net files from the framework folder 3) Removal of linked RIA services from project properties from the class library that is failing, clean, re-build and then re-add linked RIA

INotifyPropertyChanged in UserControl

谁都会走 提交于 2019-12-04 01:37:42
I have a custom control which is inherited from TextBox control. I would like to implement the INotifyPropertyChanged interface in my custom control. public class CustomTextBox : TextBox, INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; protected void NotifyPropertyChanged(string info) { if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(info)); } } My problem is when I try to raised a PropertyChanged event the PropertyChanged event handler is always null. Anybody can help me? the PropertyChanged event handler is alwas null. This

How to wait for state changing transition to finish in Silverlight 4?

白昼怎懂夜的黑 提交于 2019-12-04 00:38:28
I need to change state of a control and then do some action. To be specific, I want to run an animation before a control is hidden. I would like to do something like that: VisualStateManager.GoToState(control, "Hidden", true); // wait until the transition animation is finished ParentControl.Children.Remove(control); The problem is that the transition animation is run asynchronously and thus the control is removed from the visual tree right after the animation is started. So how do I wait for the animation to finish? You can attach a Storyboard.Completed event handler to the Storyboard or

How can I get Silverlight 4 Tools to work in Web Developer 2010 Express?

随声附和 提交于 2019-12-03 23:37:08
I installed Windows 7 . I then installed Web Developer 2010 Express from here with the Web Platform Installer . I then installed the the April 15 release of Silverlight 4 Toolkit from here . I then added this reference : alt text http://www.deviantsart.com/upload/ijk0lm.png Then in my XAML, I reference it like this but it gives me no intellisense and tells me that I am missing an assembly reference : alt text http://www.deviantsart.com/upload/cd4vrj.png update: xmlns:tk="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" doesn't work either, even after a rebuild What do I

Error HRESULT E_FAIL has been returned from a call to a COM component

青春壹個敷衍的年華 提交于 2019-12-03 18:32:17
问题 In Silverlight 4 app; what does this error mean?: "Error HRESULT E_FAIL has been returned from a call to a COM component." It's a very generic error. The VS debugger doesn't point to the exact location of the error when debugging. 回答1: This is kind of an old question, but I figured I'd give my answer since I found this thread by Googling for the exact same problem. In my case, I'd copied some sample XAML from the web to get started with Silverlight Toolkit 4. That sample XAML contained a

Why is WPF loosing terrain with Silverlight 4 coming? [duplicate]

扶醉桌前 提交于 2019-12-03 16:38:01
This question already has answers here : Closed 9 years ago . Possible Duplicates: What does WPF still have to offer over Silverlight 4? Why change from WPF to Silverlight 4 I'm working on a WPF application. We considered using Silverlight instead of WPF, but decided we want a full blown desktop application with the whole unique desktop application feeling and advantages that gives. However, starting today there has been a lot of buzz out there about Silverlight 4 being announced at PDC09, and people stating that there aren't many arguments left to choose WPF over Silverlight (4). So; what's

Silverlight local storage

…衆ロ難τιáo~ 提交于 2019-12-03 16:34:23
As you may know Silverlight has support for local storage. We are looking at creating Sl application that will work in off line mode. This application may require quite a bit of data to be cached on the client side. Obvious solution - use local storage with some sort of XMl based structure won't work as our PoC showed due to performance issues. We are looking at several 3rd party solutions that implement light database engines on top of SL local storage. If you have solved this problem in the past or have any ideas - I would appreciate some pointers and ideas. This is a client side object

Can I define CellTemplate of DataGrid as a Resource so that it can be reused in multiple columns?

纵饮孤独 提交于 2019-12-03 15:22:54
I want a specific template for all my columns in DataGrid. The usual method is I will replicate the entire XAML for DataTemplate multiple times in the DataGrid in each of the Column. Is there any way I can define the CellTemplate globally as a resource and then just pass the the "Path" property of "Binding" to it, so that it displays the correct item from the DataContext ? Is this possible ? Create DataTemplate in App.Xaml file with key/name. <DataTemplate x:Name="myTemplate" TargetType="sdk:DataGridTemplateColumn"> <StackPanel Orientation="Horizontal"> <TextBox Text="{Binding FirstName}"

Attach behaviour to all TextBoxes in Silverlight

和自甴很熟 提交于 2019-12-03 14:34:39
Is it possible to attach behavior to all TextBoxes in Silverlight application? I need to add simple functionality to all text boxes. (select all text on focus event) void Target_GotFocus(object sender, System.Windows.RoutedEventArgs e) { Target.SelectAll(); } You can override the default style for TextBoxes in your app. Then in this style, you can use some approach to apply a behavior with a setter (generally using attached properties). It would something like this: <Application.Resources> <Style TargetType="TextBox"> <Setter Property="local:TextBoxEx.SelectAllOnFocus" Value="True"/> </Style>