We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to add images to Diagram control from ViewModel in MVVM

Thread ID:

Created:

Updated:

Platform:

Replies:

103994 Jun 14,2012 07:07 AM UTC Jul 2,2012 11:49 AM UTC WPF 3
loading
Tags: Diagram
Ramana Mamidi
Asked On June 14, 2012 07:07 AM UTC

Hi,

How to add custom image to diagram control and I want to remove default filters and groups. How to do removing default filters from viewmodel in mvvm pattern. Presently I am handling the code from code behind.

ex:- Code behind

imageDiagramControl.SymbolPalette.SymbolGroups.Clear();

imageDiagramControl.SymbolPalette.SymbolFilters.Clear();

var group = new SymbolPaletteGroup();

group.Label = "Models";

SymbolPalette.SetFilterIndexes(group, new Int32Collection(new int[] { 0, 0 }));

imageDiagramControl.SymbolPalette.SymbolGroups.Add(group);

var filter = new SymbolPaletteFilter();

filter.Label = "Image";

imageDiagramControl.SymbolPalette.SymbolFilters.Add(filter);

var item1 = new SymbolPaletteItem();

var image = new Image();

var bitMapImage = new BitmapImage();

bitMapImage.BeginInit();

bitMapImage.UriSource = new Uri(@"pack://application:,,,/GuiControls;component/Images/SomeImage.ico");

bitMapImage.EndInit();

image.Stretch = Stretch.Fill;

image.Source = bitMapImage;

item1.Content = image;

group.Items.Add(item1);

 

 

I want this code should move to ViewModel. How can do that?

Thanks,

Ramana


Ramya Thirugnanam [Syncfusion]
Replied On June 19, 2012 08:17 AM UTC

Hi Ramana,

With regards to add images to Diagram control from View Model in MVVM, we are working on your requirement. We will update you with the status of your requirement on June 22nd 2012.

Please let us know if you have any concerns,
Regards,
Ramya


Srinivas Rayudu
Replied On June 28, 2012 04:09 PM UTC

We are using Syncfusion diagram. We have the similar requirement to use diagram control using the MVVM pattern. Is there any update on this?


Ramya Thirugnanam [Syncfusion]
Replied On July 2, 2012 11:49 AM UTC

Hi Ramana,

Sorry for the delay in getting back to you.

With regards to add images to Diagram control from View Model in MVVM, DiagramControl supports MVVM partially.Currently, we do not have a support to achieve your requirement with MVVM. This is already in our feature queue. We will implement this feature in any of your future releases. We will get back to you once this implemented. So please create the Direct-Trac incident, to get quick update and to have better follow up.

Link: http://www.syncfusion.com/account/
please let us know if you have any concerns,
Regards,
Ramya
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;