Click here to Skip to main content
15,881,882 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Mohammad Dayyan18-Apr-09 9:18
Mohammad Dayyan18-Apr-09 9:18 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Braulio Dez18-Apr-09 9:38
Braulio Dez18-Apr-09 9:38 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Mohammad Dayyan18-Apr-09 9:47
Mohammad Dayyan18-Apr-09 9:47 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Braulio Dez19-Apr-09 8:33
Braulio Dez19-Apr-09 8:33 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Mohammad Dayyan19-Apr-09 9:12
Mohammad Dayyan19-Apr-09 9:12 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Braulio Dez19-Apr-09 9:28
Braulio Dez19-Apr-09 9:28 
GeneralRe: Modify a XML file in Silverlight 2 ? Pin
Mohammad Dayyan19-Apr-09 9:46
Mohammad Dayyan19-Apr-09 9:46 
QuestionToggleButton with Images [SOLVED - sort of] Pin
#realJSOP14-Apr-09 9:58
mve#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
Eslam Afifi14-Apr-09 11:05 
AnswerRe: ToggleButton with Images [SOLVED - sort of] Pin
DemonPT30-Aug-11 5:07
DemonPT30-Aug-11 5:07 
QuestionVisual Studio 2008/Expression Blend Wierdness [SOLVED!!!] Pin
BlitzPackage14-Apr-09 7:23
BlitzPackage14-Apr-09 7:23 
AnswerRe: Visual Studio 2008/Expression Blend Wierdness Pin
BlitzPackage14-Apr-09 7:53
BlitzPackage14-Apr-09 7:53 
QuestionCanvas or Grid inside Viewport3D? Pin
emptythetill14-Apr-09 5:38
emptythetill14-Apr-09 5:38 
AnswerRe: Canvas or Grid inside Viewport3D? Pin
sivaddrahcir20-Apr-09 8:17
sivaddrahcir20-Apr-09 8:17 
QuestionReading a XML file from IsolatedStorage ? [modified] Pin
Mohammad Dayyan13-Apr-09 18:00
Mohammad Dayyan13-Apr-09 18:00 
QuestionRe: Reading a XML file from IsolatedStorage ? Pin
Mark Salsbery13-Apr-09 20:08
Mark Salsbery13-Apr-09 20:08 
AnswerRe: Reading a XML file from IsolatedStorage ? Pin
Mohammad Dayyan13-Apr-09 21:53
Mohammad Dayyan13-Apr-09 21:53 
AnswerRe: Reading a XML file from IsolatedStorage ? Pin
Mohammad Dayyan13-Apr-09 22:34
Mohammad Dayyan13-Apr-09 22:34 
QuestionRe: Reading a XML file from IsolatedStorage ? Pin
Mark Salsbery14-Apr-09 6:24
Mark Salsbery14-Apr-09 6:24 
AnswerRe: Reading a XML file from IsolatedStorage ? Pin
Mohammad Dayyan14-Apr-09 10:56
Mohammad Dayyan14-Apr-09 10:56 
QuestionXAML - TreeView with CheckBoxes Pin
Jack Kril13-Apr-09 13:26
Jack Kril13-Apr-09 13:26 
AnswerRe: XAML - TreeView with CheckBoxes Pin
Eslam Afifi13-Apr-09 13:59
Eslam Afifi13-Apr-09 13:59 
QuestionClipping To Rounded Corners Pin
#realJSOP13-Apr-09 5:27
mve#realJSOP13-Apr-09 5:27 
AnswerRe: Clipping To Rounded Corners [modified] Pin
Eslam Afifi13-Apr-09 7:42
Eslam Afifi13-Apr-09 7:42 
AnswerRe: Clipping To Rounded Corners Pin
Mark Salsbery13-Apr-09 9:45
Mark Salsbery13-Apr-09 9: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.