silverlight-4.0

Silverlight is not liking my WCF MessageContract. Why?

流过昼夜 提交于 2019-12-01 05:48:56
问题 I am attempting to upload a file through a Silverlight client using the following MessageContract : [MessageContract] public class CategoryClientFileTransferMC : IDisposable { /// <summary> /// CategoryID - Category identity. /// </summary> [MessageHeader(MustUnderstand = true)] public int CategoryID; /// <summary> /// ID - File identifier. /// </summary> [MessageHeader(MustUnderstand = true)] public string ID; /// <summary> /// Length - File length in bytes. /// </summary> [MessageHeader

Handle to Silverlight UserControl

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 05:40:12
问题 I've a DLL (Player.dll) written in C++ that internally uses Windows GDI. I've an application (basically a video player) written in Windows Forms, that internally calls APIs from Player.dll to render the actual graphics on screen, using p/invoke technique: public class ProxyPlayer { [DllImport("Player.dll", CharSet=CharSet.Unicode, EntryPoint="PlayVideo")] public static extern void Play(int playerHandle, out TWResult result); [DllImport("Player.dll", CharSet=CharSet.Unicode, EntryPoint=

How do I compile C++/CLI code for Silverlight?

我的未来我决定 提交于 2019-12-01 04:47:14
问题 I have a C++/CLI library that I would like to use in a Silverlight application. It is supposed to be possible to write code for Silverlight in any .NET language, but so far I've only worked out how to compile C#. Silverlight does not seem to be able to use DLLs compiled for .NET. I'm using Visual Studio 2010 and Silverlight 4. The only new projects available for Silverlight are C# projects. Porting the code to C# is not a practical option. How do I compile C++/CLI code for Silverlight? 回答1: I

how to give scrolling in textbox?

北城余情 提交于 2019-12-01 04:45:33
i have taken a textbox <TextBox Height="218" HorizontalAlignment="Stretch" Margin="0,56,0,0" Name="txtBox" VerticalAlignment="Top" TextWrapping="Wrap" Text="" GotFocus="txtBox_GotFocus" TextChanged="txtBox_TextChanged" IsTabStop="True" IsEnabled="True" IsHitTestVisible="True" VerticalScrollBarVisibility="Auto" Background="White" FontFamily="Tahoma" /> Now when i enter lot of text in textbox then text scrolled up automatically. I want to show a scrollbar with which user can surf to the whole text. How to do this. There isn't a simple solution to this problem. Additionally, if you are allowing

How to debug a webservice hosted by an IIS in a Silverlight application

廉价感情. 提交于 2019-12-01 04:17:22
Anybody knows how to debug a web service hosted by an IIS in a Silverlight 4.0 application? My IIS version is 7.5 and my operating system is windows 7. Can you please specify the steps on how to? Thank you so much When running the solution (in debug mode, or have symbol files up-to-date). Open the Debug menu then select Attach to process (Or use shortcut CTRL + ALT + P ) Find the process w3wp.exe || WebDev.WebServerxx.EXE (Casini) (Check 'Show processes from all users' when working with IIS App Pool under other account) Click attach Set breakpoint(s) Do your debugging 来源: https://stackoverflow

Silverlight DataGrid row color binding

旧巷老猫 提交于 2019-12-01 04:06:42
问题 I'd like to find a way to bind the background color of rows of a DataGrid to a property of my bound objects. Here is my XAML : <sdk:DataGrid ItemsSource="{Binding MyItems}" /> I'm using the MVVM Light Toolkit with Silverlight 4. 回答1: You can do it by changing a row template: <sdk:DataGrid ItemsSource="{Binding MyItems}"> <sdk:DataGrid.RowStyle> <Style TargetType="sdk:DataGridRow"> <Setter Property="Template"> ... <Rectangle x:Name="BackgroundRectangle" Fill="{Binding ColorPropertyOfItem}" />

How to replace link to hyperlink in RichTextBox (Windows phone)

女生的网名这么多〃 提交于 2019-12-01 01:18:03
I have a text: Download it directly to the <a href="http://itunes.apple.com/fi/app/goalapp/id502461189?ls=1&mt=8">iTunes Store</a> or <a href="https://market.android.com/details?id=com.strikersoft.meramal.se">Android Market</a>. The application is launched for Swedish app store. I know how to show a hyperlink in RichTextBox: http://msdn.microsoft.com/en-us/library/ee681613%28v=vs.95%29.aspx But how can I make this for everyone link in this code? Filip Skakun You should parse the string maybe with something like RegEx or using a library like html agility pack . This extension method should work

How to debug a webservice hosted by an IIS in a Silverlight application

≡放荡痞女 提交于 2019-12-01 00:30:48
问题 Anybody knows how to debug a web service hosted by an IIS in a Silverlight 4.0 application? My IIS version is 7.5 and my operating system is windows 7. Can you please specify the steps on how to? Thank you so much 回答1: When running the solution (in debug mode, or have symbol files up-to-date). Open the Debug menu then select Attach to process (Or use shortcut CTRL + ALT + P ) Find the process w3wp.exe || WebDev.WebServerxx.EXE (Casini) (Check 'Show processes from all users' when working with

Right-click on a Listbox in a Silverlight 4 app

岁酱吖の 提交于 2019-12-01 00:16:29
I am trying to implement what I used to take for granted in Winforms applications. I am a Silverlight noob, so hopefully all this is elementary. I have a listbox in a Silverlight 4 app. I'd like to do the following: Right-click on the listbox Have the item under the location where I click highlight itself I'd like a context menu to popup (with my own items in the context menu) From my research so far, it appears that there is no ContextMenu construct in Silverlight, instead we have to build up a Grid/Canvas structure and attach it to a Popup object, which is what is then popped up. My

Silverlight 4 memory leaks

爱⌒轻易说出口 提交于 2019-11-30 23:59:30
I have a Silverlight 4 application which has a leaky ViewModel class. I have confirmed this by using WinDbg and the !gcroot command on my ViewModel type. I was unable to pin point the exact cause of the memory leak but have attempted to resolve it by using the following line of code in the corresponding view when it is closed: HtmlPage.Window.Navigate(new Uri(MyTopLevelUri)); This forces the app to restart and hence the RootVisual is reinitialised. Now when I use WinDbg I can see that there are no more references holding onto the ViewModel class after the View has closed. However, when I