Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Drawing a selection rectangle on Left mouse button (Read 18996 times)
tusharpateluk
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 37
Joined: Sep 3rd, 2008
Drawing a selection rectangle on Left mouse button
Oct 22nd, 2008 at 9:12am
Print Post  
As per the Programmer's guide, selection rectangle is drawn only when you hold control key and left mouse button or else it is drawn when you set the RightButtonActions or MiddleButtonActions to Select.

Is it possible to drawn selection rectangle without holding the Control key and dragging the mouse holding leftbutton.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Drawing a selection rectangle on Left mouse bu
Reply #1 - Oct 22nd, 2008 at 12:08pm
Print Post  
Setting Diagram.Behavior = Modify should let you do that.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
tusharpateluk
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 37
Joined: Sep 3rd, 2008
Re: Drawing a selection rectangle on Left mouse bu
Reply #2 - Oct 22nd, 2008 at 12:15pm
Print Post  
Diagram.Behavior = Modify is already set. Diagram canvas allows mutiple selection also. But selection rectangle is not shown on the screen. It appears only when I hold control key
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Drawing a selection rectangle on Left mouse bu
Reply #3 - Oct 22nd, 2008 at 1:16pm
Print Post  
That was a bug. With this version the selection should work correctly when Behavior = Modify:

https://mindfusion.eu/_temp/wpf_selfix.zip

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
tusharpateluk
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 37
Joined: Sep 3rd, 2008
Re: Drawing a selection rectangle on Left mouse bu
Reply #4 - Oct 22nd, 2008 at 1:44pm
Print Post  
I have replaced the dll file and designer give me following error
Could not load type 'System.Windows.Media.Effects.Effect' from assembly 'PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at System.Signature._GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, IntPtr fieldHandle, IntPtr methodHandle, IntPtr declaringTypeHandle)
   at System.Signature.GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, RuntimeFieldHandle fieldHandle, RuntimeMethodHandle methodHandle, RuntimeTypeHandle declaringTypeHandle)
   at System.Signature..ctor(RuntimeMethodHandle methodHandle, RuntimeTypeHandle declaringTypeHandle)
   at System.Reflection.RuntimeMethodInfo.get_Signature()
   at System.Reflection.RuntimeMethodInfo.GetParametersNoCopy()
   at System.Reflection.RuntimePropertyInfo.GetIndexParameters()
   at MS.Internal.Xaml.ReflectionTypeNode.BuildProperties()
   at MS.Internal.Xaml.ReflectionTypeNode.Find(Identifier name, Boolean includeAttachable)
   at MS.Internal.Xaml.XmlElement.ConvertAttributes(XamlObjectElement objectElement, XamlElement parent, TypeNode typeNode, PrefixScope scope, IParseContext context)
   at MS.Internal.Xaml.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider)
   at MS.Internal.Xaml.XmlElement.ConvertChildrenToXaml(XamlElement result, PrefixScope scope, IParseContext context, IMarkupSourceProvider provider, Boolean childrenAsString)
   at MS.Internal.Xaml.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider)
   at MS.Internal.Xaml.XmlElement.ConvertChildrenToXaml(XamlElement result, PrefixScope scope, IParseContext context, IMarkupSourceProvider provider, Boolean childrenAsString)
   at MS.Internal.Xaml.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider)
   at MS.Internal.Xaml.XmlElement.ConvertChildrenToXaml(XamlElement result, PrefixScope scope, IParseContext context, IMarkupSourceProvider provider, Boolean childrenAsString)
   at MS.Internal.Xaml.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider)
   at MS.Internal.Xaml.XmlElement.ConvertChildrenToXaml(XamlElement result, PrefixScope scope, IParseContext context, IMarkupSourceProvider provider, Boolean childrenAsString)
   at MS.Internal.Xaml.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider)
   at MS.Internal.Xaml.XmlElement.ConvertChildrenToXaml(XamlElement result, PrefixScope scope, IParseContext context, IMarkupSourceProvider provider, Boolean childrenAsString)
   at MS.Internal.Xaml.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider)
   at MS.Internal.Xaml.XmlElement.ConvertChildrenToXaml(XamlElement result, PrefixScope scope, IParseContext context, IMarkupSourceProvider provider, Boolean childrenAsString)
   at MS.Internal.Xaml.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider)
   at MS.Internal.Xaml.XmlElement.ConvertChildrenToXaml(XamlElement result, PrefixScope scope, IParseContext context, IMarkupSourceProvider provider, Boolean childrenAsString)
   at MS.Internal.Xaml.XmlElement.ConvertToXaml(XamlElement parent, PrefixScope parentScope, IParseContext context, IMarkupSourceProvider provider)
   at MS.Internal.DocumentTrees.Markup.XamlSourceDocument.FullParse(Boolean convertToXamlWithErrors)
   at MS.Internal.DocumentTrees.Markup.XamlSourceDocument.ConvertToSkeleton()
   at Microsoft.Windows.Design.Documents.MarkupDocumentManager.BuildSkeleton(IMarkupSo
urceProvider source)
   at Microsoft.Windows.Design.Documents.MarkupDocumentManager.<>c__DisplayClass4.<Loa
d>b__0()
   at Microsoft.Windows.Design.ServiceManager.PublishProxy`1.PublishService(Type serviceType)
   at Microsoft.Windows.Design.EditingContext.DefaultServiceManager.GetService(Type serviceType)
   at Microsoft.Windows.Design.EditingContext.DefaultServiceManager.Subscribe(Type serviceType, SubscribeServiceCallback callback)
   at Microsoft.Windows.Design.ServiceManager.Subscribe[ServiceType](SubscribeServiceCallback`1 callback)
   at MS.Internal.SelectionTracking.SelectionTracker..ctor(EditingContext context)
   at MS.Internal.Designer.VSDesigner.Load()
   at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load()
   at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedV
iew view)
   at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(Isolated
DesignerFactory factory, IsolatedView view)
   at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(Isolated
DesignerFactory factory, IsolatedView view)
   at MS.Internal.Host.Isolation.IsolatedDesigner.Load()
   at MS.Internal.Designer.DesignerPane.LoadDesignerView()


Please help
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Drawing a selection rectangle on Left mouse bu
Reply #5 - Oct 22nd, 2008 at 2:46pm
Print Post  
You might have to install SP1 of VS2008 and .NET 3. The Effect class was added by SP1.
  
Back to top
 
IP Logged
 
tusharpateluk
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 37
Joined: Sep 3rd, 2008
Re: Drawing a selection rectangle on Left mouse bu
Reply #6 - Oct 22nd, 2008 at 3:32pm
Print Post  
Thanks It worked.

Diagram canvas shows Trial Version. We have a license copy. Can you please tell me how can i get the updated copy of the WPFDiagram with the above fix.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Drawing a selection rectangle on Left mouse bu
Reply #7 - Oct 22nd, 2008 at 5:44pm
Print Post  
Could you remind me the name of your company? You might add an email address at the company domain to your forum profile, so I know you are our licensed customer for next fixes...
  
Back to top
 
IP Logged
 
tusharpateluk
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 37
Joined: Sep 3rd, 2008
Re: Drawing a selection rectangle on Left mouse bu
Reply #8 - Nov 6th, 2008 at 1:46pm
Print Post  
Selection rectangle is appearing properly now.
But found one problem while working on it.

Sometimes the Selection rectangle effect appears when it shouldn’t. 

I have a custom property control and when you select a diagram node, its property is displayed in right panel. At this point the focus is in the text box of the custom property control.  Moving off the textbox will bring up the warning “It should be unique” – this is fine.

However depending on how you move off of the textbox will dictate whether the strange Selection rectangle effect takes place.  E.g. If you are in the textbox (i.e. it has focus) and you click the canvas, then you are presented with the “It should be unique” warning – click the ok button to get rid of this and as you move the mouse around you will see a Selection rectangle effect.

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Drawing a selection rectangle on Left mouse bu
Reply #9 - Nov 7th, 2008 at 8:24am
Print Post  
Probably this happens because the warning message box steals the mouse capture from the control. Try doing the following before showing the warning:

if (diagram.Interaction != null)
{
     diagram.Interaction.Cancel();
     diagram.Interaction = null;
}

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
tusharpateluk
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 37
Joined: Sep 3rd, 2008
Re: Drawing a selection rectangle on Left mouse bu
Reply #10 - Nov 7th, 2008 at 10:43am
Print Post  
Thanks so much. It worked
  
Back to top
 
IP Logged
 
IgorS
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 13
Joined: Sep 22nd, 2008
Re: Drawing a selection rectangle on Left mouse bu
Reply #11 - Nov 26th, 2008 at 8:29am
Print Post  
Hi, Stoyan.
It seems that this version still doesn't work correctly with Behavior = DrawLinks. Nodes are selected, but selection rectangle is not always visible.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Drawing a selection rectangle on Left mouse bu
Reply #12 - Nov 26th, 2008 at 10:43am
Print Post  
Right, this version should also fix the DrawLinks case:
https://mindfusion.eu/_temp/wpf_selfix.zip
  
Back to top
 
IP Logged
 
IgorS
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 13
Joined: Sep 22nd, 2008
Re: Drawing a selection rectangle on Left mouse bu
Reply #13 - Nov 27th, 2008 at 3:33pm
Print Post  
I'm afraid you missunderstood me. I tried this wpf_selfix version. Everything is ok in it with Behavior = Modify. But when I set Behavior = DrawLinks and try to draw a selection rectangle, nodes are selected, but I can't usually see the rectangle, it is "invisible". Then I draw it with ctrl button pressed and it is ok. After that I try again without ctrl button and voilà, rectangle is visible. And I can draw them while there are selected nodes. It get's invisible again after I deselect all the nodes. Strange behaviour Smiley The same situation was in 2.0 release.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Drawing a selection rectangle on Left mouse bu
Reply #14 - Nov 27th, 2008 at 3:44pm
Print Post  
We've reused the archive file name. That's a new wpf_selfix.zip, containing an updated set of assemblies that should fix the DrawLinks behavior too. Or have you tried them and found it's still buggy?

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint