silverlight

how to customize the listbox selected item style in silverlight 4

。_饼干妹妹 提交于 2019-12-31 05:36:50
问题 I am having a silverlight listbox in which a list item contains an image, its name and its price. the layout of the list item will be as follows: Under the image the image name will be shown, under the image name the price will be shown. Now the problem is when i select an list item all the three items(image, image name and its price ) are selected. this is the default behavior. Now the requirement is when i select a list item only the image should be selected. please let me know if there is

make line that connects two objects in silverlight

女生的网名这么多〃 提交于 2019-12-31 05:11:15
问题 how can I connect these entity boxes? the boxes are created by clicking a button and they can be dragged. Now I want to connect them with a line or something. 回答1: Here is a quick and dirty implementation: the class that represents the connection: public partial class Connection { public MyBox Box1 { get; set; } public MyBox Box2 { get; set; } public Line Line { get; set; } } To create a new connection I've used a basic form: name of source, destination and a button: <StackPanel Orientation=

To view the silverlight app in fullscreen mode(F11)

心不动则不痛 提交于 2019-12-31 03:54:11
问题 Is there any way to load my silverlight app in F11 mode directly? I have used window.open(url, '_self', 'toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=no,fullscreen=yes', 'true'); HtmlPage.window.invoke("launchPage",url); But the problem is that two instances of my app are opened. One in normal screen and the other in fullscreen. I have tried App.Current.Host.Content.IsFullScreen = true; in the constructor of the App.xaml Still its not working. :( Where am I going wrong

How do I take a bitmap image and save as a JPEG image file on a Windows Phone 7 device?

时光怂恿深爱的人放手 提交于 2019-12-31 03:42:05
问题 I am looking to create a function that takes a BitmapImage and saves it as a JPEG on the local Windows Phone 7 device in isolated storage: static public void saveImageLocally(string barcode, BitmapImage anImage) { // save anImage as a JPEG on the device here } How do I accomplish this? I'm assuming I used IsolatedStorageFile somehow? Thanks. EDIT: Here is what I have found so far... can anyone confirm if this is the correct way to do this? static public void saveImageLocally(string barcode,

How do you change the Silverlight loading screen's background?

穿精又带淫゛_ 提交于 2019-12-31 03:40:07
问题 I'm trying to avoid the default Silverlight loading screen displaying before my applet and was trying to show a blank coloured background, the same colour as my applet's. The aim is to avoid the jarring white and make it look like it's all part of one app drawing. I've discovered SplashScreenSource but I'm not sure how to hook that up to just show a single colour background instead of the loading screen. Any suggestions? 回答1: Add new XAML file to ASP.NET website, in which Silverlight will be

User management in Silverlight, create custom UI or use ASP.NET website administration tool?

倖福魔咒の 提交于 2019-12-31 03:23:07
问题 I'm creating a silverlight for line of business application, and I'm using Forms Authentication. For user management, I'm deciding between using the built-in "ASP.NET Web Site Administration Tool", or create my own custom thing in Silverlight (making this part of the application experience). What are the pros and cons for each of the two approaches? and which do you think would be best? 回答1: I just went through all of this, so I'll give the pros and cons I came up with: ASP.NET Web Site

Silverlight 4 WCF RIA Service Timeout Problem

放肆的年华 提交于 2019-12-31 03:11:09
问题 I have a Silverlight 4 usercontrol that calls a very long running WCF RIA service. As shown below, I am increasing the default timeout period. _domainContext = new WindowsDashboardDomainContext(); // Increase timeout -- this can be a very long running query ((WebDomainClient<WindowsDashboardDomainContext.IWindowsDashboardDomainServiceContract>) _domainContext.DomainClient).ChannelFactory.Endpoint.Binding.SendTimeout = new TimeSpan(99, 0, 0); _domainContext.GetSections( "All", "All", "All" )

Why do I get ProtocolViolationException when I do BeginGetRequestStream

谁都会走 提交于 2019-12-31 02:41:18
问题 I am new to silverlight. I am programming in Visual Studio 2010 for Windows phone. I try to do HttpWebRequest but debugger says ProtocolViolationException. This my code private void log_Click(object sender, RoutedEventArgs e) { //auth thi is my url for request string auth; string login = Uri.EscapeUriString(this.login.Text); string password = Uri.EscapeUriString(this.pass.Password); auth = "https://api.vk.com/oauth/token"; auth += "?grant_type=password" + "&client_id=*****&client_secret=*****

Check internet connection in Silverlight

折月煮酒 提交于 2019-12-31 02:41:11
问题 I'm writing a Silverlight 4 application and would like to check when opening the installed out of browser application, whether there is a valid internet connection (to then download some data from my website). What is the best way to do this? I realise that I could put a try catch around a WebRequest but that seems a bit hacky to me. EDIT : What I meant by valid internet connection is just connected to the internet 回答1: You can just kill two birds with one stone with Application

How to Access a Button present inside a Custom Control, from the implementing page?

你。 提交于 2019-12-31 02:35:31
问题 I have my generic.xaml containing the following code: <ControlTemplate TargetType="local:customVideoControl"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="600"/> <RowDefinition Height="200"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="200"/> <ColumnDefinition Width="200"/> <ColumnDefinition Width="200"/> </Grid.ColumnDefinitions> <MediaElement x:Name="customMediaPlayer" Source="{TemplateBinding CustomMediaSource}" HorizontalAlignment="Center"