TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
pallavi more
NA
167
5.1k
Multiple object selection
Sep 20 2018 8:54 AM
code for xaml
<Path Style="{StaticResource AB}" ToolTip="AB">
<s:DesignerItem.DragThumbTemplate>
<ControlTemplate>
<Path Style="{StaticResource AB_DragThumb}"/>
</ControlTemplate>
</s:DesignerItem.DragThumbTemplate>
</Path>
<Path Style="{StaticResource BC}" ToolTip="BC">
<s:DesignerItem.DragThumbTemplate>
<ControlTemplate>
<Path Style="{StaticResource BC_DragThumb}"/>
</ControlTemplate>
</s:DesignerItem.DragThumbTemplate>
</Path>
<Path Style="{StaticResource CD}" ToolTip="CD">
<s:DesignerItem.DragThumbTemplate>
<ControlTemplate>
<Path Style="{StaticResource BC_DragThumb}"/>
</ControlTemplate>
</s:DesignerItem.DragThumbTemplate>
</Path>
<Style x:Key="AB" TargetType="Path" BasedOn="{StaticResource FlowChartItemStyle}">
<Setter Property="Data" Value="M 0,0 H 60 V40 H 0 Z"/>
</Style>
<Style x:Key="AB_DragThumb" TargetType="Path" BasedOn="{StaticResource AB}">
<Setter Property="IsHitTestVisible" Value="true"/>
<Setter Property="Fill" Value="White"/>
<Setter Property="Stroke" Value="White"/>
</Style>
<Style x:Key="BC" TargetType="Path" BasedOn="{StaticResource FlowChartItemStyle}">
<Setter Property="Data" Value="M8.890625,7.3609371 L8.890625,15.107031 L10.7816.083282,8.8863277 15.805938,8.6207027 C15.528594,8.3550777 15.134063,8.2222652 7.4078121 z"/>
</Style>
<Style x:Key="BC_DragThumb" TargetType="Path" BasedOn="{StaticResource BC}">
<Setter Property="IsHitTestVisible" Value="true"/>
<Setter Property="Fill" Value="White"/>
<Setter Property="Stroke" Value="White"/>
</Style>
<Style x:Key="CD" TargetType="Path" BasedOn="{StaticResource FlowChartItemStyle}">
<Setter Property="Data" Value="M8.890625,7.3609371 L8.890625,15.107031 L10.783203,15.107031 L10.783203,15.950781 L6.03125,15.950781 z"/>
</Style>
<Style x:Key="CD_DragThumb" TargetType="Path" BasedOn="{StaticResource CD}">
<Setter Property="IsHitTestVisible" Value="true"/>
<Setter Property="Fill" Value="White"/>
<Setter Property="Stroke" Value="White"/>
</Style>
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..
Reply
Answers (
1
)
Application freeze
can i freeze the First top row of datagrid in wpf ?