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 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Laxmidhar SahooPosted Sep 29, 2018, 10:14 AM