silverlight-2.0

Simpler Explanation of How to Make Call WCF Service without Adding Service Ref

女生的网名这么多〃 提交于 2019-12-05 07:07:57
问题 In Understanding WCF Services in Silverlight 2, the author, David Betz, explains how to call a web service without adding a service reference in the client application. I have a couple of weeks experience with WCF, so the article was over my head. In particular, although the author gave a lot of code snippets, but does not say what goes where. In the article, he provides two different code snippets for the web.config file, but does not clarify what's going on. Looking at the source code there

Setting initial control focus in Silverlight

a 夏天 提交于 2019-12-05 04:10:55
I'm looking for a way to automatically set the initial focus on a Silverlight UserControl to a specific control. I have a login page with a user name textbox and I'd like to have it so that as soon as the user goes to the page their cursor is already positioned and waiting in the username textbox instead of having to make them click the box. I tried calling .Focus in the UserControl's Loaded event but with no success. Anyone know how to do this? I whipped up a quick SL3 app and it is difficult to have the initial focus go to the UserControl let alone to a control within the Silverlight control

Change background color of Datagrid Header in Silverlight

夙愿已清 提交于 2019-12-05 02:57:03
I want to change background color of Datagrid header in Silverlight. David Padbury Although the DataGrid does not expose a Header Background property, it does have a property for the ColumnHeaderStyle. Using the technique that DaniCE has previously suggested for a single column we can replace the header template for all header columns including the empty space on the right hand side. The down side with replacing the entire template for a header is that we lose the sorting arrows and separators which are present in the default header template. Fortunately we can use a template browser to

How to get the Silverlight XAP copied to the clientbin on build

我怕爱的太早我们不能终老 提交于 2019-12-04 15:28:43
问题 I am just getting started with Silverlight and have recently added a Silverlight project to an established solution. In this particular scenario my solution included an existing ASP.NET web site (not application) which Visual Studio kindly offered to integrated my Silverlight application into, which I accepted. So everything is fine and all, and the Silverlight XAP is being copied to the web site's ClientBin directory. Now I have decided to start a new ASP.NET MVC web application that will

What's the most portable way to make a Silverlight & Regular .NET REST client

大兔子大兔子 提交于 2019-12-04 14:12:32
问题 I'm trying to get a Server application to expose some status information using WCF. In particular I'm after using WCF services with RESTful "API". I'm hitting somewhat of a wall when it comes to consuming the REST api from a silverlight app/page that I want to have as an additional type of client... So far I've been successful in defining a status interface: public static class StatusUriTemplates { public const string Status = "/current-status"; public const string StatusJson = "/current

How do I pin one control below another in Silverlight?

有些话、适合烂在心里 提交于 2019-12-04 04:07:55
问题 I have a project that uses a DataGrid with a custom template so that I can add a special row to the bottom of the data rows. I would like this special row to be pinned under the last row but not as part of the ScrollViewer , such that it remains pinned under the last row until the bottom of the special row hits the bottom of the data grid, then I would like the rows region to size to the space inbetween and scroll accordingly, with the special row always visible. So far, I have my special row

How to get the Silverlight XAP copied to the clientbin on build

微笑、不失礼 提交于 2019-12-03 09:36:04
I am just getting started with Silverlight and have recently added a Silverlight project to an established solution. In this particular scenario my solution included an existing ASP.NET web site (not application) which Visual Studio kindly offered to integrated my Silverlight application into, which I accepted. So everything is fine and all, and the Silverlight XAP is being copied to the web site's ClientBin directory. Now I have decided to start a new ASP.NET MVC web application that will eventually replace the older (non-MVC) web site. But I cannot for the life of me figure out what Visual

What's the most portable way to make a Silverlight & Regular .NET REST client

谁说我不能喝 提交于 2019-12-03 08:08:43
I'm trying to get a Server application to expose some status information using WCF. In particular I'm after using WCF services with RESTful "API". I'm hitting somewhat of a wall when it comes to consuming the REST api from a silverlight app/page that I want to have as an additional type of client... So far I've been successful in defining a status interface: public static class StatusUriTemplates { public const string Status = "/current-status"; public const string StatusJson = "/current-status/json"; public const string StatusXml = "/current-status/xml"; } [ServiceContract] public interface

Silverlight Error “Layout Cycle Detected Layout could not complete” when using custom control

牧云@^-^@ 提交于 2019-12-03 05:59:17
问题 I'm building a custom control in Silverlight by deriving from ContentControl and doing some special formatting to put a dropshadow behind the contents. I've nearly got it working but have recently ran into a bizarre error. It works fine if it contains anything besides a Border, or a Grid/Stackpanel/etc that does not have an explicitly defined height and width. I get a JavaScript error in IE, and the text says: Runtime Error 4008... Layout Cycle Detected... Layout Could Not Complete. If I

Binding Silverlight UserControl custom properties to its' elements

假装没事ソ 提交于 2019-12-03 01:46:27
I'm trying to make a simple crossword puzzle game in Silverlight 2.0. I'm working on a UserControl-ish component that represents a square in the puzzle. I'm having trouble with binding up my UserControl's properties with its' elements. I've finally (sort of) got it working (may be helpful to some - it took me a few long hours), but wanted to make it more 'elegant'. I've imagined it should have a compartment for the content and a label (in the upper right corner) that optionally contains its' number. The content control probably be a TextBox, while label control could be a TextBlock. So I