Silverlight / WPF - How to access a static variable in silverlight.?

Asked By Ramesh Nalla
09-Feb-12 01:58 AM
Hi All,

Hope you are all doing good.

Iam unable to get the static class property variable in xaml page. Letme explain my requirment i have a login screen with username and password. I want to store employee name in a static class variable to make use of this variable in  another Xaml page. While accessing this variable iam getting an error " object reference is not set to an instace of an object.

for normal asp.net it is working fine.. please find the attached images

            Any help is really arpiciated..

Regards
Ramesh
  srinivasarao replied to Ramesh Nalla
10-Feb-12 03:47 AM
make use of delegates
Create New Account
help
View HTML files in silverlight Silverlight / WPF hi. . how to View HTML files in silverlight? via silverlight how to disable the right click option in html files? i.e)SL html viewer using System.Windows.Controls; using System.Windows.Browser; using System.Net; namespace gfcpaWebsite { public partial class PopupWindow : ChildWindow { public PopupWindow() { InitializeComponent(); } public void SetMessage(string theMessage) { Message.Text = theMessage; } private void no, status = no, menubar = no, resizable = yes"); } } } Create New Account keywords: View, HTML, files, in, silverlight description: p style = border:0px;margin-bottom: 18px; border-image: initial; outline-width: 0px; outline
how to access DataGridTemplateColumn textbox value in CS page in wpf Silverlight / WPF hello frnds DataGridTemplateColumn Header = "Data" Width = "100" > <DataGridTemplateColumn.CellTemplate> <DataTemplate> <StackPanel Orientation = "Horizontal" > <TextBox Name DataGridTemplateColumn Create New Account keywords: how, to, access, DataGridTemplateColumn, textbox, value, in, CS, page, in, wpf description: hello frnds pre class = default prettyprintcodespan class = tagDataGridTemplateColumn / spanspan class = pln / spanspan class = atnHeader / spanspan class = pun = / sp
web service reference info not adding in serviceref.clientconfig in SL Silverlight / WPF hi . . i have created a silverlight application. in silverlight.web application i created web service after that i created a silverlight class library project . now i try to adding the reference of the web service , i added inside the xap Because XAP is actually a zip file follow the steps • Built your Silverlight Project first • Edit your ServiceReferences.ClientConfig file and save it • go to the ClientBin directory reference, info, not, adding, in, serviceref.clientconfig, in, SL description: hi . . i have created a silverlight application. in silverlight.web application i created web service after that i created a silverlight
File uplaod in Silverlight using WCF service Silverlight / WPF Hi All, How do I upload large file in silverlight application using WCF service.?? Thanks, Murali AspNetCompatibilityRequirementsMode (1) Silverlight (1) FileUpload (1) FileStream (1) FileMode (1) Class (1) WPF (1) WCF (1) Hello Murali, using System.Collections.Generic; using System.Linq; using System.Runtime Web; using System.ServiceModel.Activation; using System.IO; namespace FileUploadService { [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)] public class Service1 : IService1 { public void SaveFile(UploadFile UploadFile) { FileStream FileStream = new FileStream( "E: \ FileUpload \ " + UploadFile.FileName
drag and drop row in silverlight datagrid Silverlight / WPF hi. . how to drag and drop row in silverlight datagrid? need ur suggestions with examples. . regards gopal.s Silverlight 2 Solution The first problem you will encounter in Silverlight 2 is determining how / when to initiate the drag operation. The most obvious route is if (content ! = null ) content.MouseLeftButtonDown + = (s, e) = > BeginDrag((FrameworkElement)s, e); } (VisualSearch is a utility class I have written that performs a breadth first search of the visual tree). This appears grid received focus maybe this could help? (Bear with me…) Again, we hit a snag, Silverlight doesn’t provide any direct means to arbitrarily determine the current state of the mouse