Click here to Skip to main content
15,884,836 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to show my text box as Process Box(Flow Chart Process Box).Following code change looks of text box but it will be not editable now.Please help.Thanks in advance.



XML
<TextBox Text="It's a TextBox control">
               <TextBox.Style>
                   <Style TargetType="TextBox">
                       <Setter Property="Template">
                           <Setter.Value>
                               <ControlTemplate>
                                   <Path Style="{StaticResource Process}" ToolTip="Process">
                                       <s:DesignerItem.DragThumbTemplate>
                                           <ControlTemplate>
                                               <Path Style="{StaticResource Process_DragThumb}"/>
                                           </ControlTemplate>
                                       </s:DesignerItem.DragThumbTemplate>
                                   </Path>
                               </ControlTemplate>
                           </Setter.Value>
                       </Setter>
                   </Style>
               </TextBox.Style>
           </TextBox>




XML
<Style x:Key="Process" TargetType="Path" BasedOn="{StaticResource FlowChartItemStyle}">
   <Setter Property="Data" Value="M 0,0 H 60 V40 H 0 Z"/>
 </Style>

 <Style x:Key="Process_DragThumb" TargetType="Path" BasedOn="{StaticResource Process}">
   <Setter Property="IsHitTestVisible" Value="true"/>
   <Setter Property="Fill" Value="Transparent"/>
   <Setter Property="Stroke" Value="Transparent"/>
 </Style>
Posted
Comments
Punamchand Dhuppad 23-Jun-14 5:15am    
FlowChartItemStyle ???
Nitin Go 23-Jun-14 5:33am    
i am not using FlowChartItem style.My requiremnt is create editable flow chart,user can edit flow chart boxes at run time.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900