Welcome Guest Search | Active Topics | Members | Log In | Register

XAML set/get Button Function Options
cypharr
Posted: Wednesday, July 29, 2009 8:15:33 AM
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.
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS


Copyright © 2008 XAMLResX. All rights reserved.
This page was generated in 0.030 seconds.