Click here to Skip to main content
15,167,425 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Mohammad Dayyan18-Apr-09 10:18
MemberMohammad Dayyan18-Apr-09 10:18 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Braulio Dez18-Apr-09 10:38
MemberBraulio Dez18-Apr-09 10:38 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Mohammad Dayyan18-Apr-09 10:47
MemberMohammad Dayyan18-Apr-09 10:47 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Braulio Dez19-Apr-09 9:33
MemberBraulio Dez19-Apr-09 9:33 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Mohammad Dayyan19-Apr-09 10:12
MemberMohammad Dayyan19-Apr-09 10:12 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Braulio Dez19-Apr-09 10:28
MemberBraulio Dez19-Apr-09 10:28 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Mohammad Dayyan19-Apr-09 10:46
MemberMohammad Dayyan19-Apr-09 10:46 
QuestionToggleButton with Images [SOLVED - sort of] Pin
#realJSOP14-Apr-09 10:58
mva#realJSOP14-Apr-09 10:58 
I'm trying to set up a toggle button that changes the image when the button is checked/no checked. Consider the following XAML:

<style targettype="ToggleButton" x:key="PushPinButton" mode="hold" xmlns:x="#unknown" />        <Setter Property="Template" />
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <Image Source="/CometWPF2;component/Icons/blue_pushpin.png" Margin="0" 
                              VerticalAlignment="Center" HorizontalAlignment="Center" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsChecked" Value="True">
                <Setter Property="Template" />
                    <Setter.Value>
                        <ControlTemplate TargetType="ToggleButton">
                            <Image Source="/CometWPF2;component/Icons/red_pushpin.png" Margin="0" 
                                      VerticalAlignment="Center" HorizontalAlignment="Center" />
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>


The IDE is telling me that the Setter.Value attachable property doesn't exist. I have no idea if I'm doing this anywhere close to correctly...

I did this and it works:

<Image Source="/CometWPF2;component/Icons/blue_pushpin.png" x:Key="PinUp" />
 <Image Source="/CometWPF2;component/Icons/red_pushpin.png" x:Key="PinDown" />
 <Style TargetType="ToggleButton" x:Key="UDPPushPinButton">
     <Setter Property="Content" Value="{DynamicResource PinUp}" />
     <Style.Triggers>
         <Trigger Property="IsChecked" Value="True">
             <Setter Property="Content" Value="{DynamicResource PinDown}" />
         </Trigger>
     </Style.Triggers>
 </Style>


Now I want to get rid of the border that shows up (and remains displayed) when it's clicked.


"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


modified on Tuesday, April 14, 2009 5:11 PM

AnswerRe: ToggleButton with Images Pin
Eslam Afifi14-Apr-09 12:05
MemberEslam Afifi14-Apr-09 12:05 
AnswerRe: ToggleButton with Images [SOLVED - sort of] Pin
DemonPT30-Aug-11 6:07
MemberDemonPT30-Aug-11 6:07 
QuestionVisual Studio 2008/Expression Blend Wierdness [SOLVED!!!] Pin
BlitzPackage14-Apr-09 8:23
MemberBlitzPackage14-Apr-09 8:23 
AnswerRe: Visual Studio 2008/Expression Blend Wierdness Pin
BlitzPackage14-Apr-09 8:53
MemberBlitzPackage14-Apr-09 8:53 
QuestionCanvas or Grid inside Viewport3D? Pin
emptythetill14-Apr-09 6:38
Memberemptythetill14-Apr-09 6:38 
AnswerRe: Canvas or Grid inside Viewport3D? Pin
sivaddrahcir20-Apr-09 9:17
Membersivaddrahcir20-Apr-09 9:17 
QuestionReading a XML file from IsolatedStorage ? [modified] Pin
Mohammad Dayyan13-Apr-09 19:00
MemberMohammad Dayyan13-Apr-09 19:00 
QuestionRe: Reading a XML file from IsolatedStorage ? Pin
Mark Salsbery13-Apr-09 21:08
MemberMark Salsbery13-Apr-09 21:08 
AnswerRe: Reading a XML file from IsolatedStorage ? Pin
Mohammad Dayyan13-Apr-09 22:53
MemberMohammad Dayyan13-Apr-09 22:53 
AnswerRe: Reading a XML file from IsolatedStorage ? Pin
Mohammad Dayyan13-Apr-09 23:34
MemberMohammad Dayyan13-Apr-09 23:34 
QuestionRe: Reading a XML file from IsolatedStorage ? Pin
Mark Salsbery14-Apr-09 7:24
MemberMark Salsbery14-Apr-09 7:24 
AnswerRe: Reading a XML file from IsolatedStorage ? Pin
Mohammad Dayyan14-Apr-09 11:56
MemberMohammad Dayyan14-Apr-09 11:56 
QuestionXAML - TreeView with CheckBoxes Pin
Jack Kril13-Apr-09 14:26
MemberJack Kril13-Apr-09 14:26 
AnswerRe: XAML - TreeView with CheckBoxes Pin
Eslam Afifi13-Apr-09 14:59
MemberEslam Afifi13-Apr-09 14:59 
QuestionClipping To Rounded Corners Pin
#realJSOP13-Apr-09 6:27
mva#realJSOP13-Apr-09 6:27 
AnswerRe: Clipping To Rounded Corners [modified] Pin
Eslam Afifi13-Apr-09 8:42
MemberEslam Afifi13-Apr-09 8:42 
AnswerRe: Clipping To Rounded Corners Pin
Mark Salsbery13-Apr-09 10:45
MemberMark Salsbery13-Apr-09 10:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.