Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
103994 | Jun 14,2012 07:07 AM UTC | Jul 2,2012 11:49 AM UTC | WPF | 3 |
![]() |
Tags: Diagram |
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
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
We are using Syncfusion diagram. We have the similar requirement to use diagram control using the MVVM pattern. Is there any update on this?
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
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.
or the page will be automatically redirected to sign-in page in 10 seconds.