|
Not what I would have done, but whatever works
You could have just called GetAdornerLayer() on the ScrollViewer instead of the TextBlock.
|
|
|
|
|
Hello,
How is it possible to expose a collection (Which gets populated in the windows service) i.e. a queue to a silverlight page using wcf ?
I have not been able to find this on the web anywhere.
Any thoughts please?
Thnk you
|
|
|
|
|
Just expose your data via a web service and have your Silverlight application call it that way.
Just remember that Silverlight can only talk async web services.
|
|
|
|
|
|
New to Silver light stuff getting this error when Installing Silver light tool for Visual Studio 2008
any suggestion ?
Fatal error during Installations
Exe (c:\d291c2132eaf0c9e83a1e7\PurgeSLTCache.exe) succeeded.
Exe (C:\DOCUME~1\MIRZA~1.COM\LOCALS~1\Temp\Silverlight Tools RTW\Silverlight.2.0_Developer.exe) failed with 0x80070643 - Fatal error during installation. .
Exe (c:\d291c2132eaf0c9e83a1e7\PurgeSLTCache.exe) succeeded.
Final Result: Installation failed with error code: (0x80070643), Fatal error during installation
SOFTDEV
Luck in life always exists in the form of an abstract class that cannot be instantiated directly and needs to be inherited by hard work and dedication.
modified on Sunday, January 9, 2011 2:48 AM
|
|
|
|
|
Just reinstalled the latest version and installed this version and again updated to the latest :P
SOFTDEV
Luck in life always exists in the form of an abstract class that cannot be instantiated directly and needs to be inherited by hard work and dedication.
|
|
|
|
|
Hi. Good day to all.
I am stucked with this problem:
I have multiple storyboards, for example, Move1 as the first storyboard name. I used the ControlStoryBoardAction - StoryBoardCompletedTrigger to continue with the next storyboard which is Move2. And this goes on till Move20. Now, I need to have a stop button which will stop whichever storyboard that is playing at the time when the stop button is being clicked. I tried a lot of methods which none works.
Another problem:
I need a repeat button too. I researched on many methods that teaches to refresh the page but it doesn't seem to work in my case.
Any advise on how to go about doing? Thanks!
|
|
|
|
|
For the first problem, the simplest solution would be to run a loop through all the story boards (on clicking the stop button) and stop all the story boards that are running.
Silverlight does not support a page refresh.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
|
|
|
|
|
I have 3 client applications that would like to have one sign on, For example, I have a WPF application that opens an internal browser control. I would like the WPF application to be able to log the person in only once so when the app opens the browser they are authenticated already. Also the reverse should occur. If a user is logged in through the web it will log the person in to the WPF client when it has been opened.
|
|
|
|
|
SSO is based on session state (and probably other things), and can't normally cross browser boundaries. I think the best way to do this is when a user logs on one or the other application, an entry is saved in a database, and all three apps query the database for user status.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
If I've understood the issue correctly, it seems to me that ASP.NET forms authentication would be a possibility.
For example, I've just written a "Silverlight Portal" app, which is (of course) an ASP.NET app, hosting some silverlight controls on various pages. The point of this portal is to provide SSO capabilities for various websites (Actually, different "instances" of the same site, but you get the idea). In the silverlight I'm collecting user info and validating / verifying through WCF RIA services. Once it's determined that the login is OK, I then call out to a javascript function on the hosting page which basically clicks a standard ASP.NET button, which does the standard forms auth. The trick is that for each of the "main" sites, their Forms Auth login URL is set to the page which I host the Login silverlight on - which means that any attempt to navigate directly there causes a redirect back to the portal, which shows the SL login. User clicks Login on this control, it gets "delegated" to the ASP.NET page, adds the forms auth cookie and alles ist gut as they say in Dusseldorf.
Not sure if it would fly in your case however, for two reasons...1. Not sure about the embedded browser, and as mentioned I'm actually redirecting to a single site...
Worth a bash though
C# has already designed away most of the tedium of C++.
|
|
|
|
|
Hello all,
I want to create a ComboBox UI which will look like below: http://dl.dropbox.com/u/7919724/ComboBox_Shapes.png[^]
I have added 3 different shapes of the ComboBox which may look as it is, based on the width of the content.
The first combo item has a bigger width, the second one has the same width as the combo, whereas the third one has smaller width than the combo. Is it possible to create the same shapes? I tried to do some tricks in the template, but as the drop down is inside the popup, I am quite unsure about this. Any idea???
Note that, there will not be any line between the toggle button and the drop down (as shown in the figure).
Waiting for your replies. Thanks in advance.
|
|
|
|
|
Looks like it is probably possible. My first guess is that the edit portion would have a border with thickness 3,3,3,0 or whatever thickness you choose, just have 0 on the bottom to get rid of the bottom border. For the pop up portion, you would need 3,3,3,3 for the thickness and clip the top border to the proper width. Or place a 2nd "white" rectangle over the border and set its width to the width of the combobox to hide the border.
Truth be told, eliminate the 3rd option and your life will be much easier. I don't think I've ever seen a combobox like that anyway. Usually the min width of the drop down is the width of the combobox.
|
|
|
|
|
I will check this and let you know by this weekend. Thanks.
|
|
|
|
|
This should be possible. Take a look at how they make the combo drop down oval shaped here[^].
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
|
|
|
|
|
Hi Abhinav,
Thanks for your response. Yes, the link you provided will give you a oval shaped. That is easy and I can do very easily. But my query is little different. See, the link you provided will produce the below combo box UI when resized: http://dl.dropbox.com/u/7919724/ComboBox_Shapes2.png[^]
Checkout my previous link, where I shown you three different kind of Combo Box UI.
|
|
|
|
|
You could consider using a Path object.
That will give you the shape - I'm just wondering how the combo drop down button would work.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
|
|
|
|
|
That's the most funniest and challenging work buddy. If I use path, we need to resize and position it properly.
Generally it is easy using the border control but the problem comes when we have to remove the middle portion by dynamically getting the toggle button width. I tried to hide the border using another border control placed inside the popup, on top of the base border, but it didn't help me...
I will try the solution that SledgeHammer posted. But quite unsure about the result.
|
|
|
|
|
Kunal_Chowdhury wrote: But quite unsure about the result.
Honestly, I would still be trying out the path.
I do think you have enough material for another article though.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
|
|
|
|
|
Ha ha... Yes I have, but not getting time to write on them. I have a lot of topics suggested by my readers and they are all in queue. In this weekend I have to complete at least one of them. Thanks buddy for following my articles and blog.
|
|
|
|
|
You don't need to "dynamically" get the toggle button width. When you place the "white border" on top just bind its width to the toggle button width and WPF will do everything for you. Path will work too, but like you said, its a lot of hassle. My solution is a lot easier.
|
|
|
|
|
Hello SledgeHammer01,
I tried it once again but couldn't find it out. Can you please look into the source code and try to help me? The Source code is available here: http://dl.dropbox.com/u/7919724/ComboDemo.zip[^]. May be I am missing some silly thing... Appreciate your help.
|
|
|
|
|
Hi, did you get a chance to look into the code? I am sure, I am missing something seriously.
|
|
|
|
|
My TreeView has an associated Item Template
I am trying to add a TreeViewItem tvi to a TreeView by code.
And I am bounding tvi to an instance of class Item
But the Item.Text is not reflected in TreeViewItem Text
What is the reason for this.
Here is the code
DataTemplate
<DataTemplate x:Key="TreeViewHeaderReadTemplate">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Text}" />
</StackPanel>
</DataTemplate>
TreeView
<sdk:TreeView Name="TreeView" ItemTemplate="{StaticResource TreeViewHeaderReadTemplate}">
</sdk:TreeView>
Class Item
public class Item
{
public Item(string text)
{
Text = text;
}
public string Text { get; set; }
}
Code to add TreeViewItem to TreeView
TreeViewItem tvi = new TreeViewItem();
Item item = new Item("Caption");
Tvi.DataContext = item;
TreeView.Items.Add(item);
I am not able to bind “caption” as the text for the treeviewitem.
The following code works for me
TreeView.Items.Add(new Item(“Caption”));
But I specifically need to add a TreeViewItem control and not a Item object
And I need this TreeViewItem to be bound to Item because I need that “Text” property bound.
What am I missing out here ?
|
|
|
|
|
The TreeView uses TreeViewItem(s). You need to add TreeViewItems to the TreeView.Items collection and you can add sub-items to a TreeViewItem.Items collection. To do what you want to do, you would need to set the Header to the Item and then set the template to properly bind.
One word of warning though. You are going to hate yourself in a few months for adding items by hand.
Use data bound collections and hierarchial templates instead.
|
|
|
|