|
Rants belong in the lounge or the soapbox, not here. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
fjparisIII wrote: I was hoping to elicit thoughtful responses.
Then ask a question, don't rant. The forums are for questions. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
I think one type is programming is no more, or less, difficult than another. It's all about understanding the tools, techniques, environment, etc. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
I think, as originally stated, you should move this to the lounge. It would be a better place to have such a discussion since, once again, the forums are for questions and don't seem to have any, only opinions and a need to discuss your difficulty in keeping up with the body of knowledge in this career field.
fjparisIII wrote: I've been a professional programmer undoubtedly for more years than you've been alive
I wouldn't be so arrogant and make such assumptions. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi.
I'm building a SL aplication and at the begining it worked fine. Bute now i change all the basic control properties(like Color, MArgins,Size, etc..) from the MyPage.xaml to App.xaml where i defined the Styles declaration. With this change my application does not run anymore. When i try to run the application, it stopes and the Visual Web Developer 2008 ExpressEdition goes down and dissapear.
Any ideas to solve that?
(Excuse my english but i don't speak better than this )
Thanks
Regards Jonatan_556
|
|
|
|
|
Your xaml has some sort of a problem.
If you can paste some of your xaml code here, someone may be able to help you out.Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
Hi
Before i send you my xaml code i decided to saw it again carefully and slowly and i found the problem and fixed it.
Thanks any way
Regards Jonatan
|
|
|
|
|
jonatan_556 wrote: i found the problem and fixed it
Ok. That's great.
Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
Hi,
I would like to implement a pop-up on screen keyboard which can be used to interact with a textbox through a touchscreen. I've found a load of WPF examples online but they all cause Security Exceptions when used in Partial Trust (as they use keyboard events).
Can anyone point me at a resource which will provide this functionality in a partial-trust XBAP?
Regards
Richard
|
|
|
|
|
I use animations all the time in WPF, but they seem to work completely different in Silverlight, principally because the elements being animated don't have a BeginAnimation method. So, given the element being animated, how can I find the Storyboard defining the animation?
|
|
|
|
|
fjparisIII wrote: Storyboard defining the animation
Not quite sure I understand your question.
What you need to do is create a Storyboard - see here[^].Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
I thought it was clear that I had created my Storyboard in XAML. This is what I had before I made my first post:
<navigation:Page.Resources>
<Storyboard x:Name="image01fadeIn">
<DoubleAnimation
Storyboard.TargetName="image01"
Storyboard.TargetProperty="Opacity"
From="0" To="1"
Duration="0:0:0.5"
Completed="imag01FadeInAnimation_Completed"
>
</DoubleAnimation>
</Storyboard>
</navigation:Page.Resources>
Now I'm getting an event where I have a reference to the element I want to start the above animation on. Given the reference to that the element (image01), how do I find the above Storyboard so I can start the animation? It was simple in WPF, because I could create the animation in code and use BeginAnimation() right there in the code. But in Silverlight, apparently you have to create the Storyboard in a XAML resource.
Maybe my question should be: how would I replace the above XAML with in-line C# code?
|
|
|
|
|
Your code in C# will look something very similar to -
Storyboard sb = new Storyboard();<br />
DoubleAnimation objAnimation = new DoubleAnimation();<br />
objAnimation.From = 0;<br />
objAnimation.To = 1;<br />
objAnimation.Duration = new Duration(new TimeSpan(500));<br />
objAnimation.Completed +=new EventHandler(imag01FadeInAnimation_Completed);<br />
Storyboard.SetTargetProperty(objAnimation, new PropertyPath("(Opacity)"));<br />
Storyboard.SetTarget(objAnimation, image1);<br />
sb.Children.Add(objAnimation);<br />
sb.Begin();<br /> Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
Exactly. Just after I posted my reply, I woke up and banged the side of my head with the palm of my hand. I work too many hours in the day and my brain stops working after about 12 hours of headscratching at my desk. My original post was written after 16 hours at the keyboard. Then when I woke up this morning I was still thinking I didn't have a clue. But my brain started waking up at the very end to my reply to your first answer. Then I sat down and wrote the following code (amazingly similar to yours):
ImageBeingDisplayed.Source = BitmapImage;
DoubleAnimation fadeInAnimation = new DoubleAnimation();
fadeInAnimation.From = 0;
fadeInAnimation.To = 1;
fadeInAnimation.Duration = TimeSpan.FromSeconds(.5);
fadeInAnimation.Completed += new EventHandler(fadeInAnimation_Completed);
Storyboard storyboard = new Storyboard();
Storyboard.SetTarget(fadeInAnimation, ImageBeingDisplayed);
Storyboard.SetTargetProperty(fadeInAnimation, new PropertyPath("Image.Opacity"));
storyboard.Children.Add(fadeInAnimation);
storyboard.Begin();
Then I wrote the fadeInAnimation_Completed event as follows:
void fadeInAnimation_Completed(object sender, EventArgs e)
{
Storyboard storyboard = (Storyboard)sender;
storyboard.Stop();
string imageName = Storyboard.GetTargetName(storyboard);
Image image = FindName(imageName) as Image;
if (image != null)
{
image.Opacity = 1;
}
}
I don't know whether all this will work because the first block of code is in a WebClient.DownloadDataCompleted event handler, which inexplicably does not exist in Silverlight (I'm trying to port my WPF application to Silverlight), so my Silverlight code does not compile. I asked how to solve that problem in a post immediately preceding the post that started this thread.
|
|
|
|
|
Hi All,
I have developed a simple WPF application, where I want to send key (i.e. F5) so that all controls gets filled with updated data from DB. I have already written code for this and it works fine when i press F5.
What i want to do now is that I want some way to send F5 key through code so that after doing some action it does F5 through code. [I cannot directly call the method which performs repaint task because I am in another class]
Any help?
Thanks,
AksharRoop
|
|
|
|
|
|
Does this works for WPF window as well?
Because when i tried using this it gives error that your application is not set to handle window messages?
I cannot change structure of application because drag-drop framework is designed such that there are different classes, so when item is moved from Window, it is handled by framework class and once processed I want framework to send key.
|
|
|
|
|
Well... I didn't verify that it would or would not work. I thought "why would it not?" The message about the application not handling window messages is ridiculous. Every window in Windows must send and receive Windows messages on some level. That is the way Windows works. I also tried using SendWait like the error suggests but that doesn't work.
The only thing I can think of is to have some class with a static/shared event and method that raises that event. Then your window that needs the refresh could register to that event and the class that needs to send the refresh could call the method that sends the event. I hope that is not too confusing. It doesn't seem like a great solution but it will work.
|
|
|
|
|
Hi All,
I'm working on my first Silverlight application and I have a need to scan directories local to the web site. However, due to SIlverlight running on the client I'm figuring that the only way to do this is via a Silverlight enabled WCF service running back on the server.
This way the client silverlight app can 'phone home'?
Is that a fair assumption? Or is there a better way? This is all silverlight 3.
Cheers,
|
|
|
|
|
That's pretty much true except you could pass in parameters to the silverlight app before it starts running, as an alternative.
|
|
|
|
|
Ahhh, a kind of web version of:
static void Main(string[] args)
|
|
|
|
|