{"id":1881,"date":"2017-10-03T11:30:34","date_gmt":"2017-10-03T11:30:34","guid":{"rendered":"https:\/\/mindfusion.eu\/blog\/?p=1881"},"modified":"2021-01-23T16:41:35","modified_gmt":"2021-01-23T16:41:35","slug":"photo-album-in-wpf-with-the-diagram-control","status":"publish","type":"post","link":"https:\/\/mindfusion.dev\/blog\/photo-album-in-wpf-with-the-diagram-control\/","title":{"rendered":"Photo Album in WPF with the Diagram Control"},"content":{"rendered":"<p>In this blog post we will build a photo album application. The application shows pictures organized in folders and allows the user to add new pictures, new folders as well add\/delete\/rearrange the photos that are already added to the folders.<\/p>\n<p>Here is a screenshot of the application:<\/p>\n<div id=\"attachment_1886\" style=\"width: 780px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/mindfusion.dev\/blog\/wp-content\/uploads\/2017\/10\/wpf-photo-album.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1886\" class=\"size-full wp-image-1886\" src=\"https:\/\/mindfusion.dev\/blog\/wp-content\/uploads\/2017\/10\/wpf-photo-album.png\" alt=\"Photo Album with the WPF Diagram Control\" width=\"770\" height=\"637\" srcset=\"https:\/\/mindfusion.dev\/blog\/wp-content\/uploads\/2017\/10\/wpf-photo-album.png 770w, https:\/\/mindfusion.dev\/blog\/wp-content\/uploads\/2017\/10\/wpf-photo-album-300x248.png 300w, https:\/\/mindfusion.dev\/blog\/wp-content\/uploads\/2017\/10\/wpf-photo-album-768x635.png 768w, https:\/\/mindfusion.dev\/blog\/wp-content\/uploads\/2017\/10\/wpf-photo-album-363x300.png 363w\" sizes=\"auto, (max-width: 770px) 100vw, 770px\" \/><\/a><p id=\"caption-attachment-1886\" class=\"wp-caption-text\">Photo Album with the WPF Diagram Control<\/p><\/div>\n<p>The app is built with the <a href=\"https:\/\/mindfusion.dev\/wpf-diagram.html\">diagramming for WPF component.<\/a><\/p>\n<p><strong>I. General Settings<\/strong><\/p>\n<p>We create a new WPF application in Visual Studio. There, in the main window, the Window.Resources section we add a new item &#8211; a context menu:<\/p>\n<pre id=\"line1\"> &lt;<span class=\"start-tag\">contextmenu<\/span> <span class=\"attribute-name\">x:key<\/span>=\"<a class=\"attribute-value\">ContextMenu<\/a>\"&gt;\n<span id=\"line254\"><\/span>         &lt;<span class=\"start-tag\">menuitem<\/span> <span class=\"attribute-name\">x:name<\/span>=\"<a class=\"attribute-value\">FolderMenuItem<\/a>\" <span class=\"attribute-name\">header<\/span>=\"<a class=\"attribute-value\">Add new folder<\/a>\" <span class=\"attribute-name\">click<\/span>=\"<a class=\"attribute-value\">AddFolderMenuItem_Click<\/a>\"&gt;\n<span id=\"line255\"><\/span>         &lt;<span class=\"start-tag\">menuitem<\/span> <span class=\"attribute-name\">x:name<\/span>=\"<a class=\"attribute-value\">ImageMenuItem<\/a>\" <span class=\"attribute-name\">header<\/span>=\"<a class=\"attribute-value\">Add new image<\/a>\" <span class=\"attribute-name\">click<\/span>=\"<a class=\"attribute-value\">AddImageMenuItem_Click<\/a>\"&gt;\n<span id=\"line256\"><\/span> &lt;\/<span class=\"end-tag\">menuitem<\/span>&gt;&lt;\/<span class=\"end-tag\">menuitem<\/span>&gt;&lt;\/<span class=\"end-tag\">contextmenu<\/span>&gt;<\/pre>\n<p>The context menu shows up every time we right-click on a node.<\/p>\n<p>We leave the default Grid layout panel and add there a ScrollViewer. The ScrollViewer would hold the diagram. Let&#8217;s add a XAML mapping to the Diagram class in the Window element:<\/p>\n<pre>xmlns:diag=\"http:\/\/mindfusion.dev\/diagramming\/wpf\" xmlns:common=\"http:\/\/mindfusion.dev\/common\/wpf\" \n<\/pre>\n<p>We need a reference to the common namespace as well because the Diagram class uses it. Now, in the ScrollViewer we can add the markup for the Diagram:<\/p>\n<pre id=\"line1\">&lt;<span class=\"start-tag\">diag:diagram<\/span> <span class=\"attribute-name\">x:name<\/span>=\"<a class=\"attribute-value\">diagram<\/a>\" <span class=\"attribute-name\">bounds<\/span>=\"<a class=\"attribute-value\">0, 0, 1000, 1000<\/a>\" <span class=\"attribute-name\"> DefaultShape<\/span>=\"<a class=\"attribute-value\">Ellipse<\/a>\" <span class=\"attribute-name\">aligntogrid<\/span>=\"<a class=\"attribute-value\">False<\/a>\" <span class=\"attribute-name\">behavior<\/span>=\"<a class=\"attribute-value\">Modify<\/a>\" <span class=\"attribute-name\">NodeModified<\/span>=\"<a class=\"attribute-value\">diagram_NodeModified<\/a>\" <span class=\"attribute-name\">NodeClicked<\/span>=\"<a class=\"attribute-value\">diagram_NodeClicked<\/a>\"&gt;\n&lt;\/<span class=\"end-tag\">diag:diagram<\/span>&gt;<\/pre>\n<p>The application needs reference to the following MindFusion.Diagramming libraries:<\/p>\n<ul>\n<li>MindFusion.Diagramming.Wpf<\/li>\n<li>MindFusion.Common.Wpf<\/li>\n<li>MindFusion.Licensing<\/li>\n<\/ul>\n<p><strong>II. Styling<\/strong><\/p>\n<p>In the code-behind file we create a <a href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/flowchartnet\/index.htm?T_MindFusion_Diagramming_Theme_Members.htm\">Theme<\/a> and add two <a href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/flowchartnet\/index.htm?T_MindFusion_Diagramming_Style.htm\">Style<\/a>-s to it: one for the links and one for the nodes.<\/p>\n<pre> \/\/create a new theme\n Theme theme = new Theme();\n\n \/\/create a style for the links\n Style linkStyle = new Style();\n linkStyle.Setters.Add(new Setter(DiagramLink.BrushProperty, new SolidColorBrush(Color.FromRgb(245, 245, 240))));\n linkStyle.Setters.Add(new Setter(DiagramLink.StrokeProperty, new SolidColorBrush(Color.FromRgb(191, 191, 191))));\n linkStyle.Setters.Add(new Setter(DiagramLink.HeadStrokeProperty, new SolidColorBrush(Color.FromRgb(191, 191, 191))));\n \/\/register the style with the theme\n theme.RegisterStyle(typeof(DiagramLink), linkStyle);\n<\/pre>\n<p>The link style sets the brush and stroke for the links as well the stroke for the link&#8217;s head. The brush is used to fill the head shape of the link. Finally we register the style with the theme. Here is what the node style looks like:<\/p>\n<pre>\/\/create a style for the nodes\nStyle nodeStyle = new Style();\nnodeStyle.Setters.Add(new Setter(ShapeNode.StrokeProperty, new SolidColorBrush(Color.FromRgb(191, 191, 191))));\nnodeStyle.Setters.Add(new Setter(ShapeNode.FontFamilyProperty, new FontFamily(\"Lato\")));\n\/\/register the style with the theme\ntheme.RegisterStyle(typeof(ShapeNode), nodeStyle);\n<\/pre>\n<p>We specify the stroke that would outline each node and the font that would be used when labels on nodes are painted. The final step is to assign the new Theme to the <a href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/flowchartnet\/index.htm?P_MindFusion_Diagramming_Diagram_Theme_0.htm\">Theme<\/a> property of the diagram:<\/p>\n<pre> \/\/assign the theme\n  diagram.Theme = theme;\n<\/pre>\n<p>We also change the default head shape of the link and its size:<\/p>\n<pre> \/\/set link styling\n diagram.LinkHeadShapeSize = 12;\n diagram.LinkHeadShape = ArrowHeads.Triangle;\n<\/pre>\n<p><strong>III. Create Diagram Items<\/strong><\/p>\n<p>When you run the application it shows a diagram that is a tree with folders and images. We will create this diagram in code. First, we create a new array that would hold the names of the folders:<\/p>\n<pre>string[] labels = new string[] {\"Images\", \"Events\", \"Family\", \"Tourism\",\n                \"Autoexibition 2014 Detroit\", \"Depeche Mode Concert 2016\", \"Third March\",\n                \"Lia`s birthday\", \"New year 2017\", \"Sam`s graduation\",\n                \"Brazil and Argentina\", \"Italy 2013\", \"Summer 2017\"};\n             \n<\/pre>\n<p>Then we must create a node for each label:<\/p>\n<pre> \/\/create the initial nodes for the album\n for(int i = 0; i &lt; labels.Length; i++)\n   {\n     var node = CreateFolder(labels[i]);\n     diagram.Nodes.Add(node);\n   }\n<\/pre>\n<p>Each node is created by calling the CreateFolder method. This method creates and styles a DiagramNode. It sets a Folder image as background for the node and adjusts its text alignment. The node is drawn transparent:<\/p>\n<pre> \/\/creates a new folder with the specified text.\n private ShapeNode CreateFolder(string text)\n    {\n       var node = new ShapeNode();\n       node.Text = text;\n       node.Tag = \"Folder\";\n       node.Transparent = true;\n       node.TextAlignment = TextAlignment.Center;\n       node.TextVerticalAlignment = AlignmentY.Center;\n       node.Expandable = true;\n       BitmapImage image = this.FindResource(\"Folder\") as BitmapImage;\n       node.Image = image;\n       node.ResizeToFitImage();\n       return node;\n     }\n<\/pre>\n<p>Note that we use the <a href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/flowchartnet\/index.htm?P_MindFusion_Diagramming_DiagramItem_Tag_0.htm\">Tag<\/a> property of a <a href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/flowchartnet\/index.htm?T_MindFusion_Diagramming_DiagramItem.htm\">DiagramItem<\/a> to assign the text &#8220;Folder&#8221;. We will use this identification string later in the sample, to recognize that the user has clicked on a folder.<br \/>\nThe image is declared as a resource in XAML, in the Window.Resources section:<\/p>\n<pre id=\"line1\">&lt;<span class=\"start-tag\">bitmapimage<\/span> <span class=\"attribute-name\">x:key<\/span>=\"<a class=\"attribute-value\">Folder<\/a>\" <span class=\"attribute-name\">urisource<\/span>=\"<a class=\"attribute-value\">Folder.png<\/a>\"&gt;\n<span id=\"line342\"><\/span>&lt;\/<span class=\"end-tag\">bitmapimage<\/span>&gt;<\/pre>\n<p>Each major folder has subfolders and they contain images. The subfolders with images are located in the Images directory. We declare a global variable that points to the Images folder:<\/p>\n<pre> private const string path = @\".\\Images\";\n<\/pre>\n<p>Then we need to cycle through all directories in &#8220;Images&#8221; and create subfolders for them.<\/p>\n<pre> int length = 0;\n \/\/ reads the initial subfolders for the album \n string[] subfolders = System.IO.Directory.GetDirectories(path);\n string[] folders = new string[9];\n<\/pre>\n<p>Once we have the subfolders we must cycle through their subfolders as well because each one has several subfolders in it. Those second level subfolders actually contain the images:<\/p>\n<pre> \/\/goes one level deeper into the hierarchy\n for (int i = 0; i &lt; subfolders.Length; i++)\n    {\n       string[] subsubfolders = System.IO.Directory.GetDirectories(subfolders[i]);\n       for(int j = 0; j &lt; subsubfolders.Length; j++)\n       {\n          folders[length] = subsubfolders[j];\n          length++;\n        }\n    }\n<\/pre>\n<p>Once we&#8217;ve created nodes for each folder it is time to create the nodes that represent the images:<\/p>\n<pre> \/\/loads the images for each folder\n for(int i = 0; i &lt; folders.Length; i++)\n    {\n      string[] filenames = System.IO.Directory.GetFiles(folders[i]);\n      LoadImages(filenames, diagram.Nodes.GetAt(i + 4) as ShapeNode);\n    }\n<\/pre>\n<p>We go through all folders that actually contain images and use a new method LoadImages to create <a href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/flowchartnet\/index.htm?T_MindFusion_Diagramming_DiagramNode.htm\">DiagramNode<\/a>-s for each image file. The LoadImages method needs the names of the files that would be places in the children nodes and the parent node:<\/p>\n<pre>private void LoadImages(string[] filenames, DiagramNode parent)\n  {\n     for (int i = 0; i &lt; filenames.Length; i++)\n     {\n         var node = CreateImage(filenames[i]);\n         diagram.Nodes.Add(node);\n         diagram.Factory.CreateDiagramLink(parent, node);\n      }\n   }\n<\/pre>\n<p>The method creates an Image node and adds it to the collection of diagram nodes accessible through the <a href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/flowchartnet\/index.htm?P_MindFusion_Diagramming_Diagram_Nodes_0.htm\">diagram.Nodes<\/a> property. hen it creates a link from the parent to the new node. Note that when we create diagram items through the diagram.Factory helper object they are added automatically to the respective nodes or links collections. Now let&#8217;s look at the CreateImage method:<\/p>\n<pre>private ShapeNode CreateImage(string path)\n  {\n      var node = new ShapeNode();\n      \/\/customize the node appearance\n      node.Shape = Shapes.RoundRect;\n      node.Brush = new SolidColorBrush(Color.FromRgb(245, 245, 240));\n      node.Tag = \"\";\n      \/\/assign the image\n      Uri imageUri = new Uri(path, UriKind.Relative);\n      BitmapImage image = new BitmapImage(imageUri);\n      node.Image = image;\n      return node;\n   }\n<\/pre>\n<p>The method creates a node and applies some styling to it. It gets the relative Uri to the image and assigns it to the node.Image property.<\/p>\n<p>The last thing to do is to create links between the three major subfolders and the root folder:<\/p>\n<pre>\/\/create links between the root and all subfolders\ndiagram.Factory.CreateDiagramLink(diagram.Nodes.GetAt(0) as ShapeNode, diagram.Nodes.GetAt(1) as ShapeNode);\ndiagram.Factory.CreateDiagramLink(diagram.Nodes.GetAt(0) as ShapeNode, diagram.Nodes.GetAt(2) as ShapeNode);\ndiagram.Factory.CreateDiagramLink(diagram.Nodes.GetAt(0) as ShapeNode, diagram.Nodes.GetAt(3) as ShapeNode);\n<\/pre>\n<p>Then we have to create links between those subfolders and their subfolders in similar way:<\/p>\n<pre>diagram.Factory.CreateDiagramLink(diagram.Nodes.GetAt(1) as ShapeNode, diagram.Nodes.GetAt(4) as ShapeNode);\ndiagram.Factory.CreateDiagramLink(diagram.Nodes.GetAt(1) as ShapeNode, diagram.Nodes.GetAt(5) as ShapeNode);\n..........\n<\/pre>\n<p><strong>IV. Arrange the Diagram<\/strong><\/p>\n<p>We use the <a href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/flowchartnet\/index.htm?T_MindFusion_Diagramming_Layout_TreeLayout.htm\">TreeLayout<\/a> algorithm to arrange our nodes in the right order. This layout is the perfect match for what we want &#8211; a hierarchy of nodes that is exactly a tree.<\/p>\n<pre>private void Rearrange()\n  {\n     if (layout == null)\n     {\n        layout = new TreeLayout(diagram.Nodes.GetAt(0),\n        TreeLayoutType.Centered,\n        false,\n        TreeLayoutLinkType.Cascading3, TreeLayoutDirections.TopToBottom,\n        40, 20, true, new Size(15, 15));\n      }\n      layout.Arrange(diagram);\n   }\n<\/pre>\n<p>The <a href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/flowchartnet\/index.htm?T_MindFusion_Diagramming_Layout_TreeLayout.htm\">TreeLayout<\/a> like all other automatic layouts available in MindFusion diagramming controls is pretty easy to use. It requires the call of a single <a href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/flowchartnet\/index.htm?M_MindFusion_Diagramming_Layout_TreeLayout_Arrange_1_Diagram.htm\">Arrange<\/a> method that takes as a parameter the instance of the diagram being arranged. The constructor lets you customize the layout, in our case we use <a href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/flowchartnet\/index.htm?C_MindFusion_Diagramming_Layout_TreeLayout_TreeLayout_ctor_10_DiagramNode_TreeLayoutType_Boolean_TreeLayoutLinkType_TreeLayoutDirection_Single_Single_Boolean_Single_Single.htm\">this TreeLayout constructor.<\/a> The constructor requires the root node, the TreeLayoutType, the next argument specifies if links are reversed, then comes the TreeLayoutLinkType, the TreeLayoutDirections and several numbers that indicate level distance, node distance and whether root position is kept. The last argument is the margins between the tree and the diagram&#8217;s bounding rectangle.<\/p>\n<p>We call the Rearrange method every time we modify the diagram &#8211; when nodes are added\/deleted or modified.<\/p>\n<p><strong>V. Events<\/strong><\/p>\n<p>We handle the <a href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/flowchartnet\/index.htm?E_MindFusion_Diagramming_Diagram_NodeClicked.htm\">NodeClicked<\/a> event, which we use to show the context menu:<\/p>\n<pre>private void diagram_NodeClicked(object sender, NodeEventArgs e)\n   {\n      \/\/gets the node that was clicked\n      SelectedNode = e.Node as ShapeNode;\n      if (e.MouseButton == MindFusion.Diagramming.Wpf.MouseButton.Right &amp;&amp; SelectedNode.Tag.ToString().Length &gt; 0)\n       {\n         \/\/renders the context menu\n         ContextMenu cm = this.FindResource(\"ContextMenu\") as ContextMenu;\n         cm.Placement = System.Windows.Controls.Primitives.PlacementMode.Mouse;\n         cm.IsOpen = true;\n        }\n    }\n<\/pre>\n<p>The important part in this code is to get the selected node. We will need it to specify the parent node for any new folders or image nodes that we create. Then, based on the menu selected by the user we either create a new folder node or a new image node calling the CreateFolder or CreateImage method that we listed above.<\/p>\n<p>What happens when the user modifies a node? That happens when the user drags a node from one folder into another folder. In this case the diagram link between the former parent and the node is deleted and a new one is created &#8211; between the new parent and the node:<\/p>\n<pre>private void diagram_NodeModified(object sender, NodeEventArgs e)\n {\n   \/\/gets the nodes at the specified mouse position\n   if (diagram.GetNodesAt(e.MousePosition).Count != 1)\n    {\n      ShapeNode child = e.Node as ShapeNode;\n      ShapeNode parent = null;\n      bool parentIsFolder = false;\n     \n      foreach (ShapeNode node in diagram.GetNodesAt(e.MousePosition))\n           {\n               \/\/check if the node is a folder\n               if (node.Tag.ToString().Length &gt; 0 &amp;&amp; node != child)\n               {\n                   parent = node;\n                   parentIsFolder = true;\n               }\n           }\n           \/\/removes the current link between the node and its parent\n           if (parentIsFolder)\n           {\n               if (child.IncomingLinks.GetAt(0) as DiagramLink != null)\n                   diagram.Links.Remove(child.IncomingLinks.GetAt(0) as DiagramLink);\n           }\n           \/\/creates a new link\n           diagram.Factory.CreateDiagramLink(parent, child);\n       }\n          Rearrange();\n      }\n<\/pre>\n<p>Remember that we have assigned &#8220;Folder&#8221; to the Tag property of all nodes that are folders. We use this to identify them and to move the node from one folder to the other.<\/p>\n<p>And with this our tutorial is over, here is a screenshot from the final application:<\/p>\n<div id=\"attachment_1885\" style=\"width: 606px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/mindfusion.dev\/blog\/wp-content\/uploads\/2017\/10\/wpf-photo-album-user-interaction.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1885\" class=\"size-full wp-image-1885\" src=\"https:\/\/mindfusion.dev\/blog\/wp-content\/uploads\/2017\/10\/wpf-photo-album-user-interaction.png\" alt=\"Photo Album App with the WPF Diagram: User Interaction\" width=\"596\" height=\"475\" srcset=\"https:\/\/mindfusion.dev\/blog\/wp-content\/uploads\/2017\/10\/wpf-photo-album-user-interaction.png 596w, https:\/\/mindfusion.dev\/blog\/wp-content\/uploads\/2017\/10\/wpf-photo-album-user-interaction-300x239.png 300w, https:\/\/mindfusion.dev\/blog\/wp-content\/uploads\/2017\/10\/wpf-photo-album-user-interaction-376x300.png 376w\" sizes=\"auto, (max-width: 596px) 100vw, 596px\" \/><\/a><p id=\"caption-attachment-1885\" class=\"wp-caption-text\">Photo Album App with the WPF Diagram: User Interaction<\/p><\/div>\n<p>The link to download the sample is below:<\/p>\n<p align=\"center\"><a title=\"WPF Diagram: Photoalbum\" href=\"https:\/\/mindfusion.dev\/samples\/wpf\/diagram\/Photoalbum.zip\">Download Wpf Diagramming Sample: Photoalbum<\/a><\/p>\n<p>About Diagramming for WPF: This is the right tool to create flowcharts in WPF that always meet your requirements. The library offers more than 100 predefined node shapes, extensive event set and more than 15 exporters and importers. Each diagram that you build has a completely customizable look through styles, themes and appearance properties for each part of the flowchart. The numerous samples and detailed documentation help you learn quickly how to integrate the component into your own application. You can download the trial version, which has no feature restrictions and does not expire from the <a href=\"https:\/\/mindfusion.dev\/wpf-diagram.html\">WPF Diagram Page on MindFusion website.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog post we will build a photo album application. The application shows pictures organized in folders and allows the user to add new pictures, new folders as well add\/delete\/rearrange the photos that are already added to the folders. &hellip; <a href=\"https:\/\/mindfusion.dev\/blog\/photo-album-in-wpf-with-the-diagram-control\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[95,74],"tags":[],"class_list":["post-1881","post","type-post","status-publish","format-standard","hentry","category-diagramming-2","category-sample-code"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3RlKs-ul","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/posts\/1881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/comments?post=1881"}],"version-history":[{"count":6,"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/posts\/1881\/revisions"}],"predecessor-version":[{"id":2647,"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/posts\/1881\/revisions\/2647"}],"wp:attachment":[{"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/media?parent=1881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/categories?post=1881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/tags?post=1881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}