code for xaml
code for C#
base.OnDrop(e);
DragObject dragObject = e.Data.GetData(typeof(DragObject)) as DragObject;
if (dragObject != null && !String.IsNullOrEmpty(dragObject.Xaml))
{
DesignerItem ItemLabel = null;
Object content = XamlReader.Load(XmlReader.Create(new StringReader(dragObject.Xaml)));
((Shape.Path)content).ToolTip = "AB";
((Shape.Path)content).ToolTip = "BC";
((Shape.Path)content).ToolTip = "CD";
if (((Shape.Path)content).ToolTip.ToString() == "AB")
{
content = FindResource("AdditionRectangle");
}
else if (((Shape.Path)content).ToolTip.ToString() == "BC")
{
content = FindResource("MultiplicationRectangle");
}
else if (((Shape.Path)content).ToolTip.ToString() == "CD")
{
content = FindResource("DivisionRectangle");
}
else
{
content = FindResource("SubstractionRectangle");
}
i need different rectangle for every click but getting same addition rectangle..
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Laxmidhar SahooRank #383 · 6.6K reputationPosted Sep 29, 2018, 6:14 AM EDT