|
Does the exception come back to the callback or the instigator of the call? I was pretty sure it is the callback!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
It should come back to the callback. In this example, once the async call has been issued, the code would fall out of the call method.
|
|
|
|
|
Arkiboys says the callback is never returned so I'm guessing the exception may be thrown in the GetSetting method. Putting some exception handling in place may resolve his issue.
"You get that on the big jobs."
|
|
|
|
|
In this case, the exception would be caught by the UnhandledException handler. I believe that I told him to catch it there at some point in this thread.
|
|
|
|
|
My Disjointed ,scatterbrained ,unstructured ,cheap Skate ,Self learning program is going well thank you. My cool Gage user control is my first real attempt to Implement Custom dependency Properties. I made a currentVal DP. that returns an int that the progressBar part of my control Binds to , works good , Now I want the TextBlock part of my control to bind to the same currentVal . With 2 day's of research study , I choose ValueConverter. My Goal is to
use lot's of these usercontrols in a window with no window codeBehind events and assignment's ,
just Data Context. So Do you Think I'm taking the right approach , most specifically with ValueConverter Inside of userControl. ?
I probably clean up nice.
|
|
|
|
|
From what I understand, yes, your approach sounds good...
You're binding to a value - which is the progress.
You want to display it both as a progress bar and a number.
I'm not sure why you couldn't just bind your textblock to the same property, in this particular case, but your approach is exactly what I use; have a single property and bind using valueConverters if the property isn't in the format I need it.
The example I choose to discus this was with a Clock using MVVM.
My ViewModel has properties of Hour, Minute and Second (integers).
For a digital clock, binding is easy.
But if you want an analogue clock? Create a value converter to convert each of them from an integer to an angle.
The ViewModel determines the information to be displayed, and the View (with its associated ValueConverter) determines how it is to be displayed.
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
Yes this approach looks quite ok to me.
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.
|
|
|
|
|
Hi i am Nilesh Kshetre My Question is how to Insert Video (Through WebCam)In SqlServer2008 In silverlight Apllication. And How to Show
|
|
|
|
|
Try doing some research first, there are many samples here on CodeProject and elsewhere.
I must get a clever new signature for 2011.
|
|
|
|
|
Hi,
Using silverlight 4, at present I click on the cell I require and then do ctrl + c to copy to clipboard.
This copies all row into the column instead of the cell I want.
How can this be solved please?
Thanks
|
|
|
|
|
This[^] might help you.
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.
|
|
|
|
|
|
hi i am now working in silverlight so please send me code of how to insert video(webcam) in database (sqlserver2008) and how to show in web Page
|
|
|
|
|
Try searching for it, or writing your own. No-one here is just going to send you code on demand.
I must get a clever new signature for 2011.
|
|
|
|
|
uhh story a video into a database yaak.
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi,
Somehow it takes ~5 sec to open my Silverlight web site at 1st visit. I built it using Visual Studio 2008 and Expression Blend 3. In deployment, I compiled and then uploaded the folder to the hosting. This my first Silverlight application. I believe I didn't do anything particularly smart or stupid. Here is the [link^].
How do I shorten the first open time? Thanks!
Best,
Jun
modified on Sunday, February 27, 2011 10:48 AM
|
|
|
|
|
It takes time to download the app the first time, then it gets cached on the local PC.
|
|
|
|
|
Thanks.
Is there a way to speed up the first request? It's a shame that the performance of my web site is so poor and I dare not show it to others.
Best,
Jun
|
|
|
|
|
There are some ways.
1) Break your app into smaller xap's and load the other xap's on demand.
2) Make sure copylocal is set to false in your projects (except the first one that loads).
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.
|
|
|
|
|
I have just started using VS2010 and have written the tiniest possible WPF program using a MediaElement, with an openFileDialog to load a Uri filename into the Source property of the MediaElement.
It works fine with a .WMV file, but any other sort of file (.MPG, .AVI, even .JPG) causes a message to come up "Debugger detected - please close it down and restart".
My research so far indicates that it is some sort of clash between video codecs, the most common theory being something to do with Nero 6/7 and the DivX codec. I do have Nero 6 installed, but I've checked in Control Panel | Sounds and Audio Devices | Video Codecs, and although I have a whole list Video Compression Codecs, none is called DivX or anything with Nero in the name.
I could uninstall Nero 6, but I do use it, and it seems a bit drastic for what must be basically a bug somewhere that needs fixing.
I have also downloaded GraphEdit, which seems to be the diagnostic tool of choice for this problem, but not being an expert in video codecs I haven't the faintest idea what to do with it now that I've got it. (I tried Graph | Insert Filters, but there are a million of them to choose from!)
I am running XP pro, and my program is in C# under VS2010.
I would really appreciate some help.
(NB This problem has obviously been around for a while - I'm finding posts about it from as early as 2005 - but no solutions!)
Dave
|
|
|
|
|
Those video formats are not supported in Silverlight
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Sorry, in which bit of my post did I mention Silverlight? I'm using WPF, and anyway this is obviously not a problem of what formats are supported - and if you read the documentation they quite clearly ARE supported.
Dave
|
|
|
|
|
For the benefit of anyone reading this, after much searching I did eventually find the solution. It does seen to be a problem caused by Nero (anyone who wants a more technical discussion might like to look at my thread here[^], which was mostly over my head). I finally found the solution here[^], which was to rename c:\Program Files\Common Files\Ahead\DSFilter\NeVideo.ax to something else. This fixed it immediately, didn't even need a reboot. I don;t know whether this classes as a "bug" or a "feature" in Nero 6, or whether it has been fixed in later versions. By all accounts it only affects programs when they are being debugged, so shouldn't be a problem for the released version. Hope this helps someone else.
Dave
|
|
|
|
|
Hello CP, a few days ago I read a very interesting article about using XAML differently (And Now for XAML Completely Different) which I thought was a really cool way to use the XamlReader so I decided to implement a behaviour tree this way because I'm currently toying around with some game AI logic.
I've implemented all the behavior tree specific logic now however I'm stuck with how to bind the XAML together with the game lib to execute different functions and check for different conditions.
Here's an example of what my XAML looks like for a small behavior tree which doesn't work:
<Root
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns="clr-namespace:XamlBT.BT;assembly=XamlBT"
>
<Root.Child>
<Sequence>
<Execute Function="{d:Binding StaticFuncs.Func}" />
</Sequence>
</Root.Child>
<Root.Condition>
<IfNot State="{d:Binding StaticFuncs.B}"/>
</Root.Condition>
</Root>
and my Execute class looks like this:
public class Execute : DependencyObject, INode
{
public bool Evaluate()
{
if (Function != null)
{
return Function();
}
return false;
}
public int Priority { get; set; }
public Func<bool> Function
{
get { return (Func<bool>)GetValue(StateProperty); }
set { SetValue(StateProperty, value); }
}
public static readonly DependencyProperty StateProperty = DependencyProperty.Register(
"Function", typeof(Func<bool>), typeof(Execute), new PropertyMetadata(null));
}
Right now the above code fails without ever resolving any of the properties
What I would like to be able todo is to bind a static methode which returns a bool and takes no parameters (or at the very least a static Func<bool> property but that is less desirable because it means repetetive code) to a Execute node's delegate or Func<bool> property so i would avoid lots wrapping functions into node types... Anyone that have a solution to my problem or maybe even a completly different aproach?
Thanks in advance and sorry for the rather bad English, especially the explenation because English is not my native language and the kind of English i'm used to talking doesn't involve explaining code intentions
|
|
|
|
|
Is there any way to force the client's brower to update the cache of a silverlight application after I have updated it? It doesn't happen automatically for some reason.
Brent
|
|
|
|