This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
This forum is for any questions, comments or feature requests relating to the Mindscape WPF Flow Diagrams toolkit. If you are looking to try out the beta, you can download it from here. We look forward to hearing your feedback and suggestions :)
Jeremy |
|
|
hi Jeremy, I have take a look at the Mindscape WPF Flow Diagrams! Nice work and it is exactly what i need in my project!
I would like to ask whether i can change the flow diagram's symbol? I'm currently doing my project that need a tools to allow user to draw activity diagram, so I would like to ask how if I want to make changes on the symbols? |
|
|
Yes, you can do this by creating a custom style. See the CustomStyle sample which is installed with the product. Please let us know if you have any questions or need any guidance! |
|
|
hi there, I would like to add a custom symbol at the project, but why is the symbol doesn't show up when it is being drag, it can be connected to other symbol, can be selected and can be saved into the XML file, but it is blank... did i less anything at the coding?
this is the DataTemplate of the symbol: <DataTemplate x:Key="EndNodeTemplate"> Please give me some guidance... I'm new to XAML and WPF :) Thanks in advance! |
|
|
It looks from your template as though you are locating the path at (200, 150), with the ellipses centred at (100,150) relative to that. This means that all of your actual content will be clipped unless the node is made very large (around 300x300 pixels). Try removing the Canvas.Left and Canvas.Top properties from your Path element, as these are telling WPF to draw the Path 200 pixels right and 150 pixels down from where you might be expecting. Then change the Center of each Ellipse to something like 30, 30 and see if that improves matters. You might also want to set a Fill and StrokeThickness on the Path so that you can see if it is off centre or whatever. (These can be temporary, just to help you find it in case the transparency is making it look blank.) Another temporary thing you might want to try is using a less complex geometry, and then refining it once you know the shape is showing up. If this doesn't help, a good approach would be to take a copy of the CustomStyle project from the Samples folder, and gradually modify the templates one step at a time -- e.g. changing the Border to a Path, the content to an Ellipse, etc. Then you will either get to your desired result or you will find the step that is causing it not to work. If you're still stuck, please post a test project (you can attach a zip file via the Options tab, or email via the contact form -- please remove all binaries first) that demonstrates the problem and we will look into it for you! |
|
|
Thanks ivan! The problem is solved as I set my ellipses too big and already out of the bound. Now i would like to change the button style. I have write another style for the button but i wonder why it is not applied. Below is the style I've defined for my button.
<LinearGradientBrush x:Key="GrayBlueGradientBrush" StartPoint="0,0" EndPoint="1,1">
Is it because the button is placed inside the Toolbar where the toolbar has its own defined style? how if i would like to change the button style for the toolbar? |
|
|
A locally specified style should override the style defined by the Toolbar control. Can you post the XAML for the <Button> element itself? |
|
|
Here it is, I would like to apply the style on the button GTP. The style is defined in the Window.Resource ResourceDictionary.
<DockPanel> ..... </DockPanel> |
|
|
besides that, how if i would like to place the button at the center of the toolbar? |
|
|
Hmm, that looks okay, and it works for me (though the style's background is applied only to the "normal" state of the button, not the "hot" state). Could you try to reproduce the problem in a small sample app (no need to reference the diagramming assemblies because this is purely a WPF issue) and post it here? (You can attach a zip file via the Options tab.) I don't believe you can centre items on a WPF toolbar. You can centre the toolbar itself by setting HorizontalAlignment="Center" but I don't think that will give you the visual effect you want. A better bet in this case is probably to use a Grid with three columns and place your button in the middle column: <Grid DockPanel.Dock="Bottom"> |
|
|
I've try to apply the style of the button in a new wpf application, it works. But i found out that any changes i made on my project does not work at all, even after i change the button name, add the grid u suggested or even change the menu bar's function name! After I compile the project, it seems like doesn't save the changes made, therefore the style is not applied. y?? attach here is the MainWindow.xaml that cant be updated.... thankssss |
|
|
there is an error " Could not create an instance of type 'DiagramSurface' " after i compile the project, but it can run after that, without updating the xaml changes... |
|
|
I'm a bit confused here. The button declaration in the zip file looks like this: <Button Name="GenerateTP" Click="GTP_Click">Generate</Button> which obviously doesn't have the style applied to it. Are you saying that Visual Studio is not saving changes to MainWindow.xaml? I.e. you add the style declaration, save the file, and... Visual Studio discards your changes? If so then something is pretty badly broken and I think it's beyond me to help! Have you tried editing the XAML file in pure XAML view rather than mixed designer/XAML view? |
|
|
Okay, it sounds like what is happening is that the compilation is failing. So when you run the program, you are running the last version that successfully compiled, which might be hours or days old and does not include your most recent changes (such as styling the button). The reason that compilation is failing will probably be described in the error message, but I would guess it is because your trial licence has expired (though in this case I am surprised that it runs). You may have to drill into the inner exception to confirm this. If this is the case, you need to either remove the DiagramSurface control, purchase a full licence of WPF Flow Diagrams or get an extension to your trial licence. |
|
|
opps sorry i didn't add it just now. but even if i add it, i doesn't work.... can u pls try the application i attach here... did i less anything in the code? |
|
|
ok now i understand y.... so do u mean i hv 2 remove the DiagramSurface control and create my own one? the features of WPF Flow Diagrams says that "you can freely redistribute the WPF Flow Diagram control with your application – no need for runtime licenses"? |
|
|
When I run this the button has the custom gradient style applied correctly. See attached graphic. Can you verify that the Last Modified time of your output EXE is the time when you last built it? Can you provide any more info about the compiler error you are seeing? |
|
|
No, you would only need to remove the DiagramSurface control if you have decided not to purchase WPF Flow Diagrams. If you purchase WPF Flow Diagrams, you will receive an updated compile-time licence, after which your project should build without error. If you're still making up your mind, and your trial licence has expired, you need to arrange for an extended trial licence. You will then be able to build your program again until the extended trial expires. If this is the case, email us (via the contact form) with details of when your trial licence expired (it should be displayed in the error message) and we will send you an extended licence file. Yes, you can freely redistribute the control without runtime licences -- but you still need a *compile-time* licence -- the control itself is not free. |
|
|
Thanks Ivan, actually i need this tool for my assignment. The message displays that the trial is expired on 14 April 2009. I have send my email to you on hoping to get the extended lisence file. Thank you! |
|
|
hi Ivan, I have problem again I would like to add 2 symbols in my project which is a start and an end node. They are succesfully added but then the connection points for all symbols are missing, only one connection point placed at the middle of each symbol. Before adding the two custom symbols, my program run correctly, with connection points of each symbol placed around the symbols, and the save function work well. After adding them, the problems occurred.... I wonder is it because of the "FlowDiagramFormatter"? There is a FlowDiagramFormatter in DemoStyle.xaml. I prefer the style of my action and decision node as stated in DemoStyleNodeTemplates.xaml. I've attached my example below... Please take a look for me ya :) Thanks |
|
|
Add the following attribute to the <ms:FlowDiagramFormatter> declaration in MainWindow.xaml: CalculatorSelector="{StaticResource {x:Static ms:Whalesong.ConnectionPointPositionCalculatorSelectorKey}}" This specifies that the left, top, right and bottom connection points will appear (if they exist) in the middle of their respective sides, which will suffice for your current design. If in future you create a template where a connection point needs to appear off-centre or in the interior of the bounding rectangle, you will need to install your own calculator selector -- see the CustomNodeType for an example of how to do this. |
|
|
Get it! Thanks ivan :) |
|