silverlight-3.0

Maintaining session in Silverlight

人盡茶涼 提交于 2019-12-04 18:44:31
I am creating a Silverlight with WCF connectivity. I would like to create and maintain a session after user login in Silverlight and do the following. On successful login, create a session object and store session id, user id, user name, session status On further calls with WCF, the session information needs to be passed from Silverlight to WCF One solution would be to create a session object and pass it as parameter to all methods. Is there any other way of passing the info in all web service calls without passing a member variable? Something similar to persistent Session object in ASP.NET.

Siliverlight 3 Navigation between user controls?

让人想犯罪 __ 提交于 2019-12-04 18:26:32
Im just starting to get to grips with silverlight 3, coming from ASP.NET and Flex. I have followed the new navigation tutorial here and read through the authentication and role management tutorials also. So, i have a main page, which has a frame, inside of the grid, and several views. These are all navigatable and working fine. I see this main page as kind of a master page to my little application i have i mind. So know I want to have a login.xaml UserControl. This will handle all login and once authenticated I want to navigate to the MainPage, and the use its frame to go from there. I dont

How to combine .NET RIA Services with MVVM in Silverlight 3?

懵懂的女人 提交于 2019-12-04 15:24:35
The .NET RIA Services are described as an n-tier framework for Silverlight. I have been wondering what the relation is between this framework and the Model-View-ViewModel pattern. Are they in conflict or can you see the potential for synergic combination? .NET RIA Services and MVVM are synergistic, and aren't in conflict. For example, if I write a Catalog domain service that exposes Products and Categories on the server, and correspondingly have a Catalog domain context on the client... then the following are options to use depending on the scenario: Write a view model that wraps the Catalog

Get Current Client Silverlight Version?

三世轮回 提交于 2019-12-04 11:56:51
I want to know if there is a way of using C# to get the Current Silverlight Version a user is running when opening a client of an app I'm developing. It is for logging purposes. I want to know if they are using Silverlight 3 or 4 on their browsers var dotNetRuntimeVersion = Deployment.Current.RuntimeVersion; var silverlightVersion = Environment.Version.ToString(); Supported in: 5, 4, 3 Using C# only I don't know, but what you could do is detect it with javascript and then send an ajax request to a function which lets the server know what version. http://www.apijunkie.com/APIJunkie/blog/post

XAML: make a ScrollViewer show scrollbars when the ScaleTransform of a child object gets big

空扰寡人 提交于 2019-12-04 05:32:47
I am making a sort of "print preview" control for some documents in my Silverlight 3 application. I have a Canvas (for showing the document) inside of a ScrollViewer, and I have zoom in / zoom out buttons that control the X and Y Scale properties of the ScaleTransform for the Canvas.RenderTransform property. I want the scrollbars of the ScrollViewer to show up when I "zoom in" enough such that the canvas is no longer visible in the ScrollViewer area, but it seems that they only show up depending on the Width/Height of the Canvas itself, regardless of whether it is zoomed in or not. Can anyone

How save canvas as image?

寵の児 提交于 2019-12-04 05:26:13
问题 In my Silverlight application I have Canvas control in ScrollViewer and lot of controls in Canvas. If canvas is too long I can use scrollviewer to see all content. But I also wont to show for client in which part of canvas is he now like in photoshop. I wont to do that be saveing canvas as image and than shoing image on left top corner with red rectangle on veweing part. Is it possible to save canvas as image? If yes how to do that and if now is there any other solutions? Thanks. 回答1: try

How to detect the OS from a silverlight application?

白昼怎懂夜的黑 提交于 2019-12-04 04:13:26
I have a Silverlight3 application that is meant to run on both Windows and Mac OS environments. I would like to know in runtime if my application is running on a Windows or Mac so I can tweak a few things to the way users are accustomed to in their operating system of choice. For example, in Windows it is the norm to use "OK" "Cancel" buttons, while in Mac OS the norm is "Cancel" "OK" buttons (reverse order). Any ideas? NewAgeSolution There are two ways. From Silverlight: string os = Environment.OSVersion.Platform.ToString(); string version = Environment.OSVersion.Version.ToString(); From ASP

Getting Runtime Assemblies in Silverlight 3

谁说我不能喝 提交于 2019-12-04 03:31:14
问题 I am currently writing a framework dll which has an AssemblyHelper. This helper stores Runtime and UserAdded assemblies to easily instantiate new objects. The .NET part of the framework uses: AppDomain MyDomain = AppDomain.CurrentDomain; Assembly[] AssembliesLoaded = MyDomain.GetAssemblies(); _runtimeAssemblies = AssembliesLoaded; This gets me all the assemblies I need. But the problem is I can't use this with Silverlight and I have no idea what to use now. Currently I am using: Assembly[]

How to make ChildWindow blocking

谁说胖子不能爱 提交于 2019-12-03 23:43:21
The ChildWindow is a modal window, but it does not block. Is there any way to make it blocking? I basically want a ShowDialog() method that will call ChildWindow.Show() but then not return until the user has closed the ChildWindow. I tried using Monitor.Enter() to block after ChildWindow.Show(), but the ChildWindow never rendered and the browser just hung. Anyone have any ideas? I don't believe it supports that behavior. You can vote for it on CodePlex. Depending on what you want, you might either look at some of Tim Heuer's workarounds here , or use a different custom control, like the

How to go back to “Base” state using VisualStateManager?

China☆狼群 提交于 2019-12-03 23:41:27
问题 I know we can use VisualStateManager.GoToState(this,"SomeState1",true); to enter into SomeState1 , but now how to go back to the base state, like no state, the state where the control was loaded in. VisualStateManager.GoToState(this,"base",true); // OR VisualStateManager.GoToState(this,"",true); // OR VisualStateManager.GoToState(this,null,true); The problem is if there is no such way to go back to the initial or base state then I will have to always create a first state and in the contructor