Click here to Skip to main content
15,353,587 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: How Do I fix this runtime error? Pin
#realJSOP15-Apr-09 10:18
mva#realJSOP15-Apr-09 10:18 
GeneralRe: How Do I fix this runtime error? Pin
#realJSOP16-Apr-09 4:36
mva#realJSOP16-Apr-09 4:36 
GeneralRe: How Do I fix this runtime error? Pin
#realJSOP16-Apr-09 5:01
mva#realJSOP16-Apr-09 5:01 
GeneralRe: How Do I fix this runtime error? Pin
Mark Salsbery16-Apr-09 9:53
MemberMark Salsbery16-Apr-09 9:53 
QuestionWebMonthView Control in CLR Pin
GomathiR15-Apr-09 1:49
MemberGomathiR15-Apr-09 1:49 
AnswerRe: WebMonthView Control in CLR Pin
Mark Salsbery15-Apr-09 7:15
MemberMark Salsbery15-Apr-09 7:15 
GeneralRe: WebMonthView Control in CLR Pin
GomathiR15-Apr-09 19:46
MemberGomathiR15-Apr-09 19:46 
GeneralRe: WebMonthView Control in CLR Pin
Mark Salsbery16-Apr-09 9:38
MemberMark Salsbery16-Apr-09 9:38 
QuestionModify a XML file in Silverlight 2 ? Pin
Mohammad Dayyan14-Apr-09 18:01
MemberMohammad Dayyan14-Apr-09 18:01 
AnswerRe: Modify a XML file in Silverlight 2 ? Pin
Braulio Dez18-Apr-09 9:11
MemberBraulio Dez18-Apr-09 9:11 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Mohammad Dayyan18-Apr-09 9:18
MemberMohammad Dayyan18-Apr-09 9:18 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Braulio Dez18-Apr-09 9:38
MemberBraulio Dez18-Apr-09 9:38 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Mohammad Dayyan18-Apr-09 9:47
MemberMohammad Dayyan18-Apr-09 9:47 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Braulio Dez19-Apr-09 8:33
MemberBraulio Dez19-Apr-09 8:33 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Mohammad Dayyan19-Apr-09 9:12
MemberMohammad Dayyan19-Apr-09 9:12 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Braulio Dez19-Apr-09 9:28
MemberBraulio Dez19-Apr-09 9:28 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Mohammad Dayyan19-Apr-09 9:46
MemberMohammad Dayyan19-Apr-09 9:46 
QuestionToggleButton with Images [SOLVED - sort of] Pin
#realJSOP14-Apr-09 9:58
mva#realJSOP14-Apr-09 9: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 11:05
MemberEslam Afifi14-Apr-09 11:05 
AnswerRe: ToggleButton with Images [SOLVED - sort of] Pin
DemonPT30-Aug-11 5:07
MemberDemonPT30-Aug-11 5:07 
QuestionVisual Studio 2008/Expression Blend Wierdness [SOLVED!!!] Pin
BlitzPackage14-Apr-09 7:23
MemberBlitzPackage14-Apr-09 7:23 
AnswerRe: Visual Studio 2008/Expression Blend Wierdness Pin
BlitzPackage14-Apr-09 7:53
MemberBlitzPackage14-Apr-09 7:53 
QuestionCanvas or Grid inside Viewport3D? Pin
emptythetill14-Apr-09 5:38
Memberemptythetill14-Apr-09 5:38 
AnswerRe: Canvas or Grid inside Viewport3D? Pin
sivaddrahcir20-Apr-09 8:17
Membersivaddrahcir20-Apr-09 8:17 
QuestionReading a XML file from IsolatedStorage ? [modified] Pin
Mohammad Dayyan13-Apr-09 18:00
MemberMohammad Dayyan13-Apr-09 18:00 

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.