(UTC)
Welcome, Guest. Please
Login
or
Register
News:
Board Index
Help
Search
Login
Register
The MindFusion Forums
›
Flow Diagramming Components
›
WPF
› WPF
(Moderator: Slavcho)
‹
Previous Topic
|
Next Topic
›
Pages:
1
[2]
3
4
Send Topic
Print
WPF (Read 46500 times)
Stoyo
God Member
Offline
MindFusion support
Posts: 13230
Joined: Jul 20
th
, 2005
Re: WPF
Reply #15 -
Oct 15
th
, 2007 at 5:43pm
Print Post
We are using VS2008 C# Express Beta 2 to create the samples. It runs fine side-by-side with VS2005 on the same machine. There was a VS2005 plugin available with an older CTP version of WPF, but newer WPF beta versions support only
VS2008.
Stoyan
IP Logged
Stoyo
God Member
Offline
MindFusion support
Posts: 13230
Joined: Jul 20
th
, 2005
Re: WPF
Reply #16 -
Oct 16
th
, 2007 at 4:54pm
Print Post
This .zip contains six samples that have been ported so far, and an updated assembly that fixes most of the bugs we have found:
https://mindfusion.org/_temp/wpf_samples.zip
IP Logged
Paul Eden
Full Member
Offline
Posts: 128
Joined: Aug 15
th
, 2007
Re: WPF
Reply #17 -
Oct 22
nd
, 2007 at 11:33am
Print Post
Hi there
I was just usig the latest DLLs as per above and found that an exception gets thrown when you attempt to supress node creation in the NodeCreating event off off the Diagram object. Using e.CancelDrag generates the following exception:
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="MindFusion.Diagramming.Wpf"
StackTrace:
at MindFusion.Diagramming.Wpf.Diagram.CancelDrag()
*bulk of dump removed*
«
Last Edit: Nov 20
th
, 2007 at 11:08am by Paul Eden
»
WWW
IP Logged
Stoyo
God Member
Offline
MindFusion support
Posts: 13230
Joined: Jul 20
th
, 2005
Re: WPF
Reply #18 -
Oct 22
nd
, 2007 at 1:03pm
Print Post
Hi,
This version should fix that:
https://mindfusion.org/_temp/MindFusion.Diagramming.Wpf.zip
Stoyan
IP Logged
Paul Eden
Full Member
Offline
Posts: 128
Joined: Aug 15
th
, 2007
Re: WPF
Reply #19 -
Oct 23
rd
, 2007 at 3:35pm
Print Post
Hi Stoyo
Thanks for the fast turnaround on that one
I was just tring to consume the NodeSelected event using the following code, but nothing appears to be happening - I assume I am doing this correctly as similar code in the diagram.Clicked event works as expected.
XAML Code:
<MFWpf:Diagram Margin="0,0,0,0" x:Name="oFlow" EnableLanes="True" EnableShadowEffects="False" NodeSelected="MyNodeSelected" Clicked="NextDemoStage" SelectAfterCreate="False" NodeCreating="NodeCreating"/>
VB Code:
Private Sub MyNodeSelected(ByVal sender As System.Object, ByVal e As MindFusion.Diagramming.Wpf.NodeEventArgs)
Select Case e.MouseButton
Case MouseButton.Right
e.Node.Tag = Microsoft.VisualBasic.InputBox("Set new name", "Set Name", e.Node.Tag)
Case MouseButton.Left
MessageBox.Show(e.Node.Tag)
End Select
End Sub
Many thanks
WWW
IP Logged
Stoyo
God Member
Offline
MindFusion support
Posts: 13230
Joined: Jul 20
th
, 2005
Re: WPF
Reply #20 -
Oct 23
rd
, 2007 at 6:12pm
Print Post
Hi Paul,
I don't think the control sets the MouseButton argument when raising NodeSelected. Selection is done always with the left button anyway.
You might handle NodeClicked if you need to know which button has been pressed, and then check the Selected property if you need to know the selection state of the node.
I hope that helps,
Stoyan
IP Logged
Paul Eden
Full Member
Offline
Posts: 128
Joined: Aug 15
th
, 2007
Re: WPF
Reply #21 -
Oct 24
th
, 2007 at 7:29am
Print Post
Comparing to a normal windows environment I would normally expect to be able to select with either a left or right click, but if the right is not impilmented here, fair enough. My main concern was that the event did not seem to be firing at all rather than the right click not being handled.
NodeClicked was indeed the functionality I required - thanks for correcting me.
Paul
WWW
IP Logged
Paul Eden
Full Member
Offline
Posts: 128
Joined: Aug 15
th
, 2007
Re: WPF
Reply #22 -
Oct 24
th
, 2007 at 8:43am
Print Post
Hi there again
There appears to also be an issue when re-loading and xml file created by the diagram when Tag properties are populated.
Sample below is a excerpt from an xml save - as you can see there seems to be two Tag elements being created, one empty and one populated:
<Diagram Version="12">
<Nodes>
<Node Class="std:ShapeNode" Id="0" Version="1">
<Bounds>10, 7, 50, 50</Bounds>
<ZIndex>0</ZIndex>
<HyperLink>
</HyperLink>
<ToolTip>
</ToolTip>
<Locked>False</Locked>
<Visible>True</Visible>
<Printable>True</Printable>
<Selected>True</Selected>
<Brush Id="0" />
<Pen>
<Brush Id="1" />
<LineJoint>0</LineJoint>
<MiterLimit>10</MiterLimit>
<Width>0.264583333333333</Width>
</Pen>
<Font>
<Name>Microsoft Sans Serif</Name>
<Size>2.90000009536743</Size>
<Unit>3</Unit>
<Bold>False</Bold>
<Italic>False</Italic>
<Underline>False</Underline>
<Strikeout>False</Strikeout>
<GdiCharSet>1</GdiCharSet>
</Font>
<ShadowColor>#FF6E6E8C</ShadowColor>
<ShadowOffsetX>1</ShadowOffsetX>
<ShadowOffsetY>1</ShadowOffsetY>
<Weight>1</Weight>
<IgnoreLayout>False</IgnoreLayout>
<Tag />
<Tag Type="1">test</Tag>
Loading the full file (I can repost if required, it was just too big for all in this post) generates the following exception:
System.FormatException was unhandled
Message="Input string was not in a correct format."
Source="MindFusion.Diagramming.Wpf"
StackTrace:
at MindFusion.Diagramming.Wpf.Diagram.LoadFromXml(XmlDocument document) at
*bulk of dump removed*
«
Last Edit: Nov 20
th
, 2007 at 11:10am by Paul Eden
»
WWW
IP Logged
Stoyo
God Member
Offline
MindFusion support
Posts: 13230
Joined: Jul 20
th
, 2005
Re: WPF
Reply #23 -
Oct 24
th
, 2007 at 9:24am
Print Post
Hi,
Are you handling the SerializeTag event?
Stoyan
IP Logged
Paul Eden
Full Member
Offline
Posts: 128
Joined: Aug 15
th
, 2007
Re: WPF
Reply #24 -
Oct 24
th
, 2007 at 10:51am
Print Post
Hi Stoyan
No, Im not handling that event, but I'm not sure that is the issue (al be it with my limited knowage) - the Tag property gets serialized correctly, in as much as there is the correct data in the second Tag element in the XML. If I manually remove the first empty Tag element from the XML, the xml loads again perfectly. Also, if I set the Tag property to a custom object, this also get serialized correctly and (assuming I remove the first empty Tag element) deserialized when the XML is loaded again.
Regards
Paul
WWW
IP Logged
Stoyo
God Member
Offline
MindFusion support
Posts: 13230
Joined: Jul 20
th
, 2005
Re: WPF
Reply #25 -
Oct 24
th
, 2007 at 12:58pm
Print Post
Hi Paul,
This version should work better:
https://mindfusion.org/_temp/wpf_tags.zip
Stoyan
IP Logged
Stoyo
God Member
Offline
MindFusion support
Posts: 13230
Joined: Jul 20
th
, 2005
Re: WPF
Reply #26 -
Oct 31
st
, 2007 at 11:55am
Print Post
We have added two new sample projects, and also ported all samples to VB.NET. The zip file contains updated version of the control that fixes many bugs:
https://mindfusion.org/_beta/WpfDiagram.zip
Stoyan
IP Logged
Paul Eden
Full Member
Offline
Posts: 128
Joined: Aug 15
th
, 2007
Re: WPF
Reply #27 -
Nov 20
th
, 2007 at 11:16am
Print Post
Hi again
I am(slowly) converting my inital test app from version 4 to the WPF variant - are ControlHost nodes implimeted yet as I couldn't seem to find them.
AlsoI seem to be having an issue with the resizing of the content of the diagram. The ZoomFactor seems to always revert to 100, despite changing it in the designer and at run time. The designer intantly reverts to 100 and any changes at runtime seem to be ingored.
Many thanks
WWW
IP Logged
Stoyo
God Member
Offline
MindFusion support
Posts: 13230
Joined: Jul 20
th
, 2005
Re: WPF
Reply #28 -
Nov 20
th
, 2007 at 12:09pm
Print Post
Hi,
Yes, now you can simply add any WPF control to the Diagram.Nodes collection. Letting the user draw controls interactively should look like
d.Behavior = Behavior.Custom;
d.CustomNodeType = typeof(MyTextBox);
Stoyan
IP Logged
Stoyo
God Member
Offline
MindFusion support
Posts: 13230
Joined: Jul 20
th
, 2005
Re: WPF
Reply #29 -
Nov 20
th
, 2007 at 12:44pm
Print Post
We fixed the ZoomFactor a couple of weeks ago. Please try this version:
https://mindfusion.org/_beta/wpf_zoom.zip
Stoyan
IP Logged
Pages:
1
[2]
3
4
Send Topic
Print
‹
Previous Topic
|
Next Topic
›
Forum Jump »
Board Index
» 10 most recent Posts
» 10 most recent Topics
General
News
Discussion
Flow Diagramming Components
News
Feature Suggestions
Windows Forms
WPF ««
Html Canvas & JavaScript
Blazor
ASP.NET MVC
ASP.NET
Java Swing
ActiveX
.NET MAUI and Xamarin
Android
Cocoa Touch
Bug Reports
Scheduling and Gantt Components
News
Feature Suggestions
Windows Forms
WPF
Silverlight
ASP.NET
Html & JavaScript
Java Swing
.NET Compact Framework
.NET MAUI and Xamarin
Bug Reports
Gauge and Chart Components
News
Feature Suggestions
Windows Forms
WPF
Silverlight
ASP.NET
Html Canvas & JavaScript
Java Swing
Xamarin
Bug Reports
Grid and Spreadsheet Components
News
Feature Suggestions
Windows Forms
WPF
Html & JavaScript
Java Swing
Bug Reports
Virtual Keyboard Components
News
Windows Forms
WPF
Avalonia
Java Swing
Html & JavaScript
Bug Reports
MindFusion.Reporting
News
Feature Suggestions
Windows Forms
WPF
Silverlight
Bug Reports
MindFusion.UI controls
Windows Forms
WPF
ASP.NET
Other MindFusion tools
News
Feature Suggestions
Discussion
Bug Reports
Archived Boards
Silverlight
Universal Windows Platform
« Board Index
‹ Board
The MindFusion Forums
» Powered by
YaBB 2.6.11
!
YaBB Forum Software
© 2000-2024. All Rights Reserved.