I can attach a mouse-click event to a TextBlock object like this:
TextBlock tb = new TextBlock();
tb.Text = "click here";
tb.MouseLeftButtonDown += new MouseButtonEventHandler(tb_MouseLeftButtonDown);
But I would like to instead attach the mouse-click to individual Run objects inside the TextBlock object so that various parts of the T...
I have Silverlight application that calls WCF services. During the call it shows fullscreen animation - spinning circle on top of semi-transparent modal popup. The problem is, if animation is shown, the service calls are often finished with big delays (if at all), especially if there're multiple calls. If I remove one line to .Begin() an...
I am a Silverlight newbie...
I want a page to display elements (button, grid, images) based on the current user security role. Basically, I would like to attach to an element the required security role and have my code being called to decide whether the element will show or not.
Something like (adding an attribute RequiredRole)
<Butto...
It seems I can format a HyperlinkButton in the same way I can format a TextBlock:
HyperlinkButton hyperlinkButton = new HyperlinkButton();
hyperlinkButton.Content = "google";
hyperlinkButton.NavigateUri = new Uri("http://www.google.com");
hyperlinkButton.TargetName = "blank";
hyperlinkButton.Foreground = XamlHelpers.GetColorFromHex("555...
Before I start, I have this code inside of a Custom Usercontrol:
private DependencyProperty _rotation = DependencyProperty.Register("Rotation", typeof(double), typeof(MyControl),
new PropertyMetadata(new PropertyChangedCallback(RotationPropertyChanged)));
public double Rotation
{
ge...
I am writing a windows-phone 7 application. I've got a page with a list of TextBlock(s) contained in a ListBox. The behavior I want is that upon clicking one of those TextBlock(s) the page is redirected to a different one, passing the Text of that TextBlock as an argument.
This is the xaml code: (here I am binding to a collection of st...
Is there any way to have a listbox populated by both static and dynamic items?
I am writing a windows phone 7 app and would like to have one static listboxItem at the top or bottom and then bind other items from the viewModel. I tried setting both a static listboxItem and then also a dataTemplate but the static item is replaced by th...
My Visual Studio solution has many projects within it, like a DAL, BLL, UI Forms, etc. It is getting quite large and now, my Silverlight project that contains all of the UI controls will be splitting up into other more modular projects. Currently, within my Silverlight project, I have a Resources folder where it has Styles.xaml and oth...
I am currently working on a project that uses the Silverlight 3 SDK and I want to create unit tests for my Silverlight code. I want these tests to not have to run in a browser context. I have referenced the Silverlight Unit Testing binaries that come in the SDK (Microsoft.Silverlight.Testing and Microsoft.VisualStudio.QualityTools.UnitTe...
I am trying to bind a List of objects to an ItemsControl. The object has only two properties: Movie (a string) and Actors (an array of string). I can get the binding to work fine for the Movie. But I can't figure out the binding for the Actors array.
<ItemsControl x:Name="MovieList">
<ItemsControl.ItemTemplate>
<DataTemplat...
Can anyone point me in the right direction of how I can use SSL client-side certificates with Silverlight to access a restful web service?
I can't seem to find anything on how to handle them, or even whether they are supported.
Cheers.
...
Currently I have a Grid with 6 optional fields, one on each row, in a data template bound to my view model.
6 Rows - 2 Columns
Column 0 has the label
Column 1 has the content associated with the label.
In this case I want to collapse the column when the Column 0 label is null.
My plan is to simply create a converter, if content is ...
I have a Silverlight application in which I'm not using XAML. I have a basic application with the following code in Application_Startup:
private void Application_Startup(object sender, StartupEventArgs e)
{
Grid g = new Grid();
g.Children.Add(new Image { Source = new System.Windows.Media.Imaging.BitmapImage(new Uri("http://ss...
Hi all,
I have to change Listbox's control templated in a way that it can look like below image
i have added togglebutton in listboxdatatemplate...
have one stackpanel in listbox style template...
so structure is like
border - stackpanel - grid - itemcontainer[boder-togglerbutton]
now to make first and last item curved... what are th...
hi,
i was trying to create a new silverlight solution using visual studio 2008 and am getting the following error:
Error: this template attempted to load an untrusted component 'Microsoft.VisualStudio.Silverlight, Version=9.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a'. For more information on this problem and how to enable...
Hi,
How to create dynamic checkboxes at run time from the databases values using MVVM pattern. I have set all the table columns as get;set; properties in Model. But not getting how to create the checkboxes using MVVM and where to put what means where to put database connections and functions for that and how to bind the dynamically crea...
hi guys,
My VS2010 doesn't stop at breakpoints inside of silverlight application. It appears that no symbols for it have been loaded during debugging. When I hover over the break point it says "The braekpoint will not currently be hit, no symbols have been loaded".
I have tried all of possible solutions offered by google and have no su...
In our Silverlight 3 project, I am using the ChildWindow control to display several system dialogs. This presents the dialog in a modal window that the user can then drag around if required.
The problem is that it is actually possible for them to drag the ChildWindow off screen, so that it cannot be picked up again and dragged back on ...
Hi,
First off I'm new to XAML so forgive me if I've done something stupid.
I have stripped down my page to the following example XAML (viewable in XamlPad):
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xam...
I'm using Visual Studio 2008, Silverlight 3 and IE 6 (don't ask).
I'm trying to launch and debug the application with F5, but the debugger says my breakpoints won't be hit because the symbols aren't loaded.
My default browser is actually Firefox, but I am setting the Start Action of the project to specifically launch IE and point it at...