Rank: Newbie Groups: Member
Joined: 7/29/2009 Posts: 1 Points: 3 Location: Uk
|
I need to make some thing like the set/get function in C# an event handler. I have a button what i want is to make the button change the color of a like when clicked the line is created when to rectangular box are connected by dray from the positon of 1 box to the position of the second box (path geometry) <Path Name="PART_ConnectionPath" Stroke="{StaticResource SolidBorderBrush}" StrokeDashArray="{Binding StrokeDashArray}" SnapsToDevicePixels="True" Data="{Binding PathGeometry}"> </Path>
My button function is some thing like this <Button Margin="1" Padding="1" Style="{StaticResource ToolBarButtonBaseStyle}" Command="{x:Static s:DesignerCanvas.AlignLeft}" CommandTarget="{Binding ElementName=MyDesigner}" ToolTip="Align Left"> <Button.Content> <Image Source="Images/AlignObjectsLeft.png" Width="16"/> </Button.Content> </Button> but this but works with the ICOMMAND (RoutedCommand) i tried to define a RoutedCommand fuction too to change the color of the line created at runtime but want possible using XAML the color was define like so in my shared.XAML <SolidColorBrush x:Key="SolidBorderBrush" Color="DarkRed" />
Finnally i guess what i really want is to change the color of the "PART_ConnectionPath" to a different color on the click of a button.
|