Click here to Skip to main content
15,917,645 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: wpf main container Pin
Mycroft Holmes24-Mar-12 13:25
professionalMycroft Holmes24-Mar-12 13:25 
AnswerRe: wpf main container Pin
Abhinav S24-Mar-12 15:54
Abhinav S24-Mar-12 15:54 
GeneralRe: wpf main container Pin
MemberDotNetting30-Mar-12 22:24
MemberDotNetting30-Mar-12 22:24 
Questioncombining a textblock and textblock into one control Pin
Sutton Mehaffey23-Mar-12 19:58
Sutton Mehaffey23-Mar-12 19:58 
AnswerRe: combining a textblock and textblock into one control Pin
Mycroft Holmes23-Mar-12 21:58
professionalMycroft Holmes23-Mar-12 21:58 
GeneralRe: combining a textblock and textblock into one control Pin
Abhinav S24-Mar-12 0:10
Abhinav S24-Mar-12 0:10 
GeneralRe: combining a textblock and textblock into one control Pin
Sutton Mehaffey24-Mar-12 5:37
Sutton Mehaffey24-Mar-12 5:37 
GeneralRe: combining a textblock and textblock into one control Pin
Mycroft Holmes24-Mar-12 13:23
professionalMycroft Holmes24-Mar-12 13:23 
GeneralRe: combining a textblock and textblock into one control Pin
Sutton Mehaffey24-Mar-12 13:49
Sutton Mehaffey24-Mar-12 13:49 
GeneralRe: combining a textblock and textblock into one control Pin
Mycroft Holmes24-Mar-12 16:05
professionalMycroft Holmes24-Mar-12 16:05 
GeneralRe: combining a textblock and textblock into one control Pin
Sutton Mehaffey26-Mar-12 14:27
Sutton Mehaffey26-Mar-12 14:27 
GeneralRe: combining a textblock and textblock into one control Pin
Mycroft Holmes26-Mar-12 15:24
professionalMycroft Holmes26-Mar-12 15:24 
GeneralRe: combining a textblock and textblock into one control Pin
Sutton Mehaffey26-Mar-12 16:01
Sutton Mehaffey26-Mar-12 16:01 
AnswerRe: combining a textblock and textblock into one control Pin
Abhinav S24-Mar-12 0:25
Abhinav S24-Mar-12 0:25 
QuestionPrism and Login Page problem Pin
gio_ab23-Mar-12 3:25
gio_ab23-Mar-12 3:25 
AnswerRe: Prism and Login Page problem Pin
Abhinav S23-Mar-12 17:27
Abhinav S23-Mar-12 17:27 
QuestionWPF C1Flexgrid Pin
Greeshma M J22-Mar-12 20:24
Greeshma M J22-Mar-12 20:24 
AnswerRe: WPF C1Flexgrid Pin
RugbyLeague23-Mar-12 6:51
RugbyLeague23-Mar-12 6:51 
GeneralRe: WPF C1Flexgrid Pin
Greeshma M J25-Mar-12 18:26
Greeshma M J25-Mar-12 18:26 
QuestionUpload images to Server Pin
sudheesh kumar s22-Mar-12 2:51
sudheesh kumar s22-Mar-12 2:51 
QuestionExpander Styling Question Pin
Kevin Marois20-Mar-12 14:13
professionalKevin Marois20-Mar-12 14:13 
AnswerRe: Expander Styling Question Pin
Varsha Ramnani21-Mar-12 0:49
professionalVarsha Ramnani21-Mar-12 0:49 
For Arrow Direction Change you can Use ControlTemplate.Triggers in ToggleButton ControlTemplate

<Color x:Key="Color4">Orange</Color>
<SolidColorBrush x:Key="ToggleButtonUpArrowBrush" Color="{StaticResource Color4}" />	
<ControlTemplate x:Key="ExpanderToggleButton" TargetType="{x:Type ToggleButton}"> 
        <Grid Width="16" Height="16"> 
            <Path Stroke="{StaticResource ToggleButtonArrowBrush}"
                    Data="M 3,4 l 5,5 5,-5" /> 
            <Path Stroke="{StaticResource ToggleButtonArrowBrush}"
                    Data="M 3,7 l 5,5 5,-5" /> 
            <ContentPresenter VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Content="{TemplateBinding Content}" /> 
        </Grid> 
        <ControlTemplate.Triggers>
	     <Trigger Property="IsChecked" Value="true">
                <Setter Property="Data" TargetName="arrow1" Value="M 3,9 l 5,-5 5,5"/>
		<Setter Property="Data" TargetName="arrow2" Value="M 3,6 l 5,-5 5,5"/>
		<Setter Property="Stroke" TargetName="arrow1" Value="{StaticResource ToggleButtonUpArrowBrush}"/>
		<Setter Property="Stroke" TargetName="arrow2" Value="{StaticResource ToggleButtonUpArrowBrush}"/>
             </Trigger>						
	</ControlTemplate.Triggers>
    </ControlTemplate>


And For the Left most Rectangle rather than using a Border use a rectange & use its fill property like
<Style TargetType="Expander">
    <Setter Property="Foreground" Value="{StaticResource ExpanderHeaderTextColor}" />
        <Setter Property="Template">
           <Setter.Value>
           <!-- Control template for Expander -->
                <ControlTemplate TargetType="Expander">
                    <Grid>
                      <Grid.RowDefinitions>
                         <RowDefinition Height="Auto" />
                         <RowDefinition Name="ContentRow" Height="0" />
                      </Grid.RowDefinitions>
                      <!--Header Area-->
                      <Border Name="Border" Grid.Row="0" BorderBrush="{StaticResource ExpanderBorderBrush}"
                                BorderThickness="1">
                      <Grid>
                          <Grid.ColumnDefinitions>
                              <ColumnDefinition Width="20" />
                              <ColumnDefinition Width="*" />
                              <ColumnDefinition Width="20" />
                          </Grid.ColumnDefinitions>
                          <!--Rectangle in the header-->
                         <Rectangle Grid.Row="0" x:Name="LeftPanel" Fill="{StaticResource ExpanderBorderBrush}" Width="10" HorizontalAlignment="Left"/>                          
<!-- The following puts the toggle button in the right hand column, just like I want! -->
                          <ToggleButton Grid.Column="2" IsChecked="{Binding Path=IsExpanded,Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" OverridesDefaultStyle="True" Template="{StaticResource ExpanderToggleButton}"/>
                          <ContentPresenter Grid.Column="1" Margin="5" ContentSource="Header" RecognizesAccessKey="True" />
                            </Grid>
                      </Border>
                      <!--Content Area-->
                      <Border Name="Content"
                                Grid.Row="1"
                                
                                BorderBrush="{StaticResource ExpanderBorderBrush}"
                                BorderThickness="1,0,1,1"
                                CornerRadius="0,0,3,3">
                                <ContentPresenter Margin="4" />
                            </Border>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsExpanded"
                                    Value="True">
                                <Setter TargetName="ContentRow"
                                    Property="Height"
                                    Value="{Binding ElementName=Content,Path=DesiredHeight}" />
                                <Setter TargetName="Border"
                                    Property="BorderBrush"
                                    Value="{StaticResource ExpanderBorderBrush}" />
				<Setter TargetName="LeftPanel" Property="Fill" Value="{StaticResource ToggleButtonUpArrowBrush}"/>                    
                           </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>


Hope this is what you were looking for.
"The difference between who you are and who you want to be is what you want to do.... And what you have to do to get where you want to be
may not be pretty or may not come easy..."

"When I get sad, I stop being sad and be awesome instead." - Barney Stinson (from "How I Met Your Mother") - lewax00

GeneralRe: Expander Styling Question Pin
Abhinav S21-Mar-12 4:14
Abhinav S21-Mar-12 4:14 
GeneralRe: Expander Styling Question Pin
Kevin Marois21-Mar-12 7:25
professionalKevin Marois21-Mar-12 7:25 
QuestionWPF Path Pin
Kevin Marois20-Mar-12 8:44
professionalKevin Marois20-Mar-12 8:44 

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.