|
Like its bastard cousin (WPF), it's main purpose is to slow development to a crawl while you search in vain for answers to your inevitable questions. If and when you ever get your application finished, its secondary purpose kicks in, obfuscating the programs intended purpose and making maintenance more difficult because Microsoft abandoned the framework soon after introducing it (like they're doing to LINQ, and soon, WPF).
"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 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: because Microsoft abandoned the framework soon after introducing it (like they're doing to LINQ, and soon, WPF)
Where did you read that?
Kevin
|
|
|
|
|
I read a blog somewhere today that said Microsoft was pushing silverlight and would soon abandon WPF.
Don't ask me where, because I don't recall (and thought it was kind of absurd myself).
"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 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I know I don't have to state this, but I will anyway -
Silverlight can't replace WPF - they aren't even the same "technologies".
So your frustrations with learning a new framework (which I bet you'll soon
find much more flexible than Windows Forms) has led you to rehashing garbage
you read on the internet?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I tend to lash out at any moving object when I'm pissed off.
Of course, I know that silverlight can't replace WPF, but we all know about Microsoft's tendency toward platform/framework/paradigm abandonment, so I figured I'd ping on it.
"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 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Well, they almsot certainly won't be abandoning LINQ anytime soon. It's part of the core languages. Maybe you're thinking of Linq to SQL vs. Linq to Entities?
As for WF, it is being pushed out to more and more products. Whether anyone is using it or not is another matter.
However, WF and WCF are becoming more intertwined and the new Oslo modelling platform is heavy on WF. My impression is that WF is intended to be analogous to WPF/Silverlight in the following way.
WPF/Silverlight is intended to allow easier partition of work between developer and designer.
WF is intended to allow easier partition of work between developer and business analyst.
There is an Oslo whitepaper that provides an illustration of this scenario.
Kevin
|
|
|
|
|
|
Hi Naren,
WF deals with two kinds of workflow models:
1. Sequential workflow
2. State machine workflow
The main benefit is to visualize your design, because in WF, your workflow diagram (either flowchart or state diagram) is your code. It's easier to change and to document. Every time when you change your diagram, your code will be changed automatically. This way, you can focus on important logical design without having to deal with detailed issues.
Hope this helps a little bit.
Jie
|
|
|
|
|
hi,
i added a windows application to my WF solution. that application i already done with c#.net.
now i have to do the same again in WF? or no need?
because we have to show flow through win forms also.
Thanks & Regards
--Naren
|
|
|
|
|
Hi,
I created one wpf application and published it. When i run it from another system thar doesn't have Dotnet framework installed, it show me an error(Prerequisite- dotnet framework 3.0 &Windows installer). Any idea regarding this.
Gomathi R
|
|
|
|
|
You could deploy it using ClickOnce, which would download the relevant framework, or you could add the framework in as a required resource into the installer for your project, or you could supply the link for the user to download and install the framework.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys
|
|
|
|
|
Hi,
I selected framework as a required resource. But even then the error appears.I created setup. but if we run it using the setup the UI gets collapsed.
Gomathi R
|
|
|
|
|
GomathiR wrote: if we run it using the setup the UI gets collapsed.
I'm not sure what that means. If you're having trouble with the deployment, use ClickOnce and let the user download your application from a central server.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys
|
|
|
|
|
Install .net - I mean if it's a .net application then you're going to need .net installed
|
|
|
|
|
To run applications developed in WPF, u need to install the .NET framework which is available for download. U must download and install it on the target computer to make your application run.
|
|
|
|
|
I create a control in wpf that use treeview and pubulate node by code
Now :
the problem is when I drag the scroll it doesn't work but it work when i use the mouse scroll or when use the arrows of scroll
|
|
|
|
|
using System;<br />
using System.Text;<br />
using System.Collections.Generic;<br />
using System.IO;<br />
using System.Net;<br />
using System.Windows;<br />
using System.Windows.Controls;<br />
using System.Windows.Documents;<br />
using System.Windows.Input;<br />
using System.Windows.Media;<br />
using System.Windows.Media.Animation;<br />
using System.Windows.Shapes;<br />
using System.Xml;<br />
using System.Xml.Linq;<br />
<br />
<br />
namespace SilverlightApplication1<br />
{<br />
public partial class Page : UserControl<br />
{<br />
public Page()<br />
{<br />
InitializeComponent();<br />
<br />
StringBuilder sb = new StringBuilder();<br />
XmlWriterSettings xws = new XmlWriterSettings();<br />
xws.OmitXmlDeclaration = true;<br />
xws.Indent = true;<br />
<br />
using (XmlWriter xw = XmlWriter.Create(sb, xws))<br />
{<br />
XDocument xd = new XDocument(
I tried with this code to wite an XML file to the server (local host). But that VWDExpress doesn't see the XmlWriterSettings and XmlWriter. I think I am using the wrong references. Can anybody tell me in what reference XmlWriterSettings and XmlWriter can be found?
Thanks,
Ranger.
PS, If anybody can get me a sample project I would appreciate it.
|
|
|
|
|
I just discovered that I hadn't included a using System.Xml; line in the header.
But where do you specify the filename of the xml-file you are trying to save?
Ranger.
|
|
|
|
|
using System;<br />
using System.Text;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Xml.Linq;<br />
using System.Xml;<br />
using System.Net;<br />
using System.Windows;<br />
using System.Windows.Controls;<br />
using System.Windows.Documents;<br />
using System.Windows.Input;<br />
using System.Windows.Media;<br />
using System.Windows.Media.Animation;<br />
using System.Windows.Shapes;<br />
using System.IO;<br />
<br />
namespace LinqToXmlSilverlight090322<br />
{<br />
public partial class Page : UserControl<br />
{<br />
public Page()<br />
{<br />
InitializeComponent();<br />
<br />
StringBuilder sb = new StringBuilder("test.xml", 10);<br />
XmlWriterSettings xws = new XmlWriterSettings();<br />
xws.OmitXmlDeclaration = true;<br />
xws.Indent = true;<br />
<br />
using (XmlWriter xw = XmlWriter.Create(sb, xws))<br />
{<br />
<br />
XDocument xd = new XDocument(<br />
new XElement("MyFractals",<br />
new XElement("first",<br />
new XAttribute("range", "1,5"),<br />
new XAttribute("startRe", "1,0"),<br />
new XAttribute("startIm", "-0,7"),<br />
new XAttribute("startColor", "100")<br />
),<br />
new XElement("second",<br />
new XAttribute("range", "0,5"),<br />
new XAttribute("startRe", "0,105"),<br />
new XAttribute("startIm", "-0,6"),<br />
new XAttribute("startColor", "160")<br />
),<br />
new XElement("third",<br />
new XAttribute("range", "0,75"),<br />
new XAttribute("startRe", "0,5"),<br />
new XAttribute("startIm", "0,204"),<br />
new XAttribute("startColor", "60")<br />
)<br />
)<br />
);<br />
<br />
xd.Save(xw);<br />
}<br />
<br />
using (XmlReader reader = XmlReader.Create(new StringReader(sb.ToString())))<br />
{<br />
XDocument xd2 = XDocument.Load(reader);<br />
XElement rt = xd2.Element(XName.Get("MyFractals"));<br />
var xyz = from e in rt.Elements()<br />
select e;<br />
}<br />
}<br />
}<br />
}
Why doesn't this work? There is no test.xml file created and when the program tries to open the xml file (which I manually placed) I get an error message saying 'line 1 character 1 illegal character'.
Is there anybody who could tell me how to get this to work?
Thanks,
Ranger.
|
|
|
|
|
Ranger49 wrote: There is no test.xml file created
The XmlWriter you are using should be writing the XML to the StringBuilder,
not to a file.
In Silverlight 2, the only access you have to the user's local hard disk
is using Isolated Storage:
How to: Save XMLWriter Content to Isolated Storage[^]
Ranger49 wrote: I get an error message saying 'line 1 character 1 illegal character'.
Probably because your StringBuilder has "test.xml" at the beginning of its contents,
which isn't valid XML.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Ok, I see...
What I would want to do is write an XML file with data to the server where the Silverlight application is situated.
Is this possible at all? Or is the only option Isolated Storage on the computer of the person who is viewing the Silverlight application?
Thanks!
Ranger.
|
|
|
|
|
Silverlight runs entirely on the client side.
To write to a server, you'll need to send it to the server.
Here's some info on ways to do that:
Silverlight Networking and Communication[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks...
I will study this.
Ranger
|
|
|
|
|
Thanks ABitSmart And Pete for your answers. I am trying to use RoutedEvent correctly this time. But the RoutingStrategy doesn't work.
MyButtonSimple class has a RoutedEvent which RoutingStrategy is Tunnel.
public class MyButtonSimple: Button
{
// Create a custom routed event by first registering a RoutedEventID
// This event uses the bubbling routing strategy
public static readonly RoutedEvent TapEvent = EventManager.RegisterRoutedEvent(
"Tap", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(MyButtonSimple));
// Provide CLR accessors for the event
public event RoutedEventHandler Tap
{
add { AddHandler(TapEvent, value); }
remove { RemoveHandler(TapEvent, value); }
}
public MyButtonSimple()
{
this.Tap += new RoutedEventHandler(MyButtonSimple_Tap);
}
//Handle the TapEvent
void MyButtonSimple_Tap(object sender, RoutedEventArgs e)
{
Debug.WriteLine("Tag:"+this.Tag.ToString());
}
}
Then I have a Window1 to test MyButtonSimple like this
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApplication1"
Width="300"
Height="300">
<local:MyButtonSimple Width="80"
Height="80"
Tag="OuterButton">
<Canvas Width="60"
Height="60"
PreviewMouseDown="Canvas_PreviewMouseDown">
<local:MyButtonSimple Width="20"
Height="20"
Tag="InnerButton"/>
</Canvas>
</local:MyButtonSimple>
</Window>
private void Canvas_PreviewMouseDown(object sender, MouseButtonEventArgs e)
{
RoutedEventArgs newEventArgs = new RoutedEventArgs(MyButtonSimple.TagEvent);
(sender as Canvas).RaiseEvent(newEventArgs);
}
Well, just as my anticipation, the output window printed "OutterButton". But when I change the RoutingStrategy to RoutingStrategy.Tunnel, which I anticipate to raise the InnerButton ,the output window still printed "OutterButton".
Is it against the routed mechanism? And Many ways I've tried since then(such as raise the event in Canvas_MouseDown), it still printed "OutterButton". And what I wanna see is "InnerButton".
Am I doing wrong angain or the RoutingStrategy doesn't work this way?
|
|
|
|
|
mildred-frontfree wrote: But the RoutingStrategy doesn't work.
No, it works.
When you set it as bubbling, it starts from itself and ends at the root.
When you set it as Tunneling, it starts from the root and ends at itself.
mildred-frontfree wrote: (sender as Canvas).RaiseEvent(newEventArgs);
Remember, you are raising the event from the Canvas.
In your case, when you set it as bubble, it started from Canvas and searched upto the root. It only found OuterButton, which is correct.
When you set it tunneling, it started from the root. It found Outerbutton fired event for it. Continued upto the Canvas and never found anymore MyButtonSimple.
If instead you had raised it from InnerButton, you would have got your desired output.
Try this,
<local:MyButtonSimple Width="100" Height="100" Tag="OuterButton">
<Canvas Width="80" Height="80">
<local:MyButtonSimple Width="60" Height="60" Tag="InnerButton">
<Canvas Width="40" Height="40" PreviewMouseDown="Canvas_PreviewMouseDown">
<local:MyButtonSimple Width="20" Height="20" Tag="MoreInnerButton"/>
</Canvas>
</local:MyButtonSimple>
</Canvas>
</local:MyButtonSimple>
When you set the event as Bubbling, it will print InnerButton and then OuterButton.
When you set the event as Tunneling, it will print OuterButton and then InnerButton.
|
|
|
|
|