Click here to Skip to main content
15,892,643 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: LINQ Pin
Pete O'Hanlon5-Aug-09 1:28
mvePete O'Hanlon5-Aug-09 1:28 
GeneralRe: LINQ Pin
sunil.n.cs5-Aug-09 1:50
sunil.n.cs5-Aug-09 1:50 
GeneralRe: LINQ Pin
Pete O'Hanlon5-Aug-09 2:13
mvePete O'Hanlon5-Aug-09 2:13 
GeneralRe: LINQ Pin
sunil.n.cs5-Aug-09 3:11
sunil.n.cs5-Aug-09 3:11 
QuestionHow can I set my dynamic images in random position? Pin
Kunal Chowdhury «IN»3-Aug-09 21:13
professionalKunal Chowdhury «IN»3-Aug-09 21:13 
AnswerRe: How can I set my dynamic images in random position? Pin
Christian Graus3-Aug-09 22:47
protectorChristian Graus3-Aug-09 22:47 
QuestionHow i can add new buttons to my epander control Pin
wasimsharp3-Aug-09 20:40
wasimsharp3-Aug-09 20:40 
AnswerRe: How i can add new buttons to my epander control Pin
Super Lloyd4-Aug-09 0:47
Super Lloyd4-Aug-09 0:47 
Why not restyling the Expander control?
A good starting point is simply to take the default style / template and modify it.
I don't know if there is a well known place to find the Aero template, so I just use Reflector to uncompile the XAML resource file for the WPF UI Control.

For your convenience here is the default aero style of the expander:
<Style x:Key="{x:Type Expander}" TargetType="{x:Type Expander}">
    <Setter Property="Foreground" Value="{DynamicResource {x:Static ControlTextBrush}}" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
    <Setter Property="VerticalContentAlignment" Value="Stretch" />
    <Setter Property="BorderBrush" Value="Transparent" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type Expander}">
                <ControlTemplate.Triggers>
                    <Trigger Property="IsExpanded" Value="true">
                        <Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
                    </Trigger>
                    <Trigger Property="ExpandDirection" Value="Right">
                        <Setter TargetName="ExpandSite" Property="Dock" Value="Right" />
                        <Setter TargetName="HeaderSite" Property="Dock" Value="Left" />
                        <Setter Value="{StaticResource Ó}" TargetName="HeaderSite" Property="Style" />
                    </Trigger>
                    <Trigger Property="ExpandDirection" Value="Up">
                        <Setter TargetName="ExpandSite" Property="Dock" Value="Top" />
                        <Setter TargetName="HeaderSite" Property="Dock" Value="Bottom" />
                        <Setter Value="{StaticResource Ô}" TargetName="HeaderSite" Property="Style" />
                    </Trigger>
                    <Trigger Property="ExpandDirection" Value="Left">
                        <Setter TargetName="ExpandSite" Property="Dock" Value="Left" />
                        <Setter TargetName="HeaderSite" Property="Dock" Value="Right" />
                        <Setter Value="{StaticResource Ô}" TargetName="HeaderSite" Property="Style" />
                    </Trigger>
                    <Trigger Property="IsEnabled" Value="false">
                        <Setter Value="{DynamicResource {x:Static GrayTextBrush}}" Property="Foreground" />
                    </Trigger>
                </ControlTemplate.Triggers>
                <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="3" SnapsToDevicePixels="true">
                    <DockPanel>
                        <ToggleButton Name="HeaderSite" Dock="Top" Margin="1" MinWidth="0" MinHeight="0" Style="{StaticResource Ñ}" FocusVisualStyle="{StaticResource Ò}" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" Foreground="{TemplateBinding Foreground}" Padding="{TemplateBinding Padding}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStyle="{TemplateBinding FontStyle}" FontStretch="{TemplateBinding FontStretch}" FontWeight="{TemplateBinding FontWeight}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                        <ContentPresenter Name="ExpandSite" Dock="Bottom" Visibility="Collapsed" Focusable="false" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" />
                    </DockPanel>
                </Border>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>


A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.

GeneralRe: How i can add new buttons to my epander control Pin
wasimsharp4-Aug-09 1:27
wasimsharp4-Aug-09 1:27 
GeneralRe: How i can add new buttons to my epander control Pin
Super Lloyd4-Aug-09 1:40
Super Lloyd4-Aug-09 1:40 
AnswerRe: How i can add new buttons to my epander control Pin
wasimsharp4-Aug-09 1:56
wasimsharp4-Aug-09 1:56 
QuestionCustom classes in XAML - Assign properties after parents set Pin
Ian Shlasko3-Aug-09 4:15
Ian Shlasko3-Aug-09 4:15 
AnswerRe: Custom classes in XAML - Assign properties after parents set Pin
Super Lloyd4-Aug-09 3:14
Super Lloyd4-Aug-09 3:14 
GeneralRe: Custom classes in XAML - Assign properties after parents set Pin
Ian Shlasko4-Aug-09 12:14
Ian Shlasko4-Aug-09 12:14 
GeneralRe: Custom classes in XAML - Assign properties after parents set Pin
Super Lloyd4-Aug-09 13:06
Super Lloyd4-Aug-09 13:06 
GeneralRe: Custom classes in XAML - Assign properties after parents set Pin
Ian Shlasko4-Aug-09 15:57
Ian Shlasko4-Aug-09 15:57 
QuestionHow can I cache data in WPF application? Pin
Kunal Chowdhury «IN»3-Aug-09 1:06
professionalKunal Chowdhury «IN»3-Aug-09 1:06 
AnswerRe: How can I cache data in WPF application? Pin
Pete O'Hanlon3-Aug-09 1:32
mvePete O'Hanlon3-Aug-09 1:32 
AnswerRe: How can I cache data in WPF application? Pin
Kunal Chowdhury «IN»3-Aug-09 2:43
professionalKunal Chowdhury «IN»3-Aug-09 2:43 
QuestionHow to Give Header in multicolunm TreeView and also implement sorting algo? Pin
sachinjadhavcm2-Aug-09 23:54
sachinjadhavcm2-Aug-09 23:54 
QuestionAdjusting Panels in WPF programatically ? Pin
Krishna Aditya2-Aug-09 20:31
Krishna Aditya2-Aug-09 20:31 
AnswerRe: Adjusting Panels in WPF programatically ? Pin
Christian Graus2-Aug-09 22:02
protectorChristian Graus2-Aug-09 22:02 
QuestionGlobal Styles - Update Pin
#realJSOP2-Aug-09 1:02
mve#realJSOP2-Aug-09 1:02 
QuestionHow to display a document in silverlight? Pin
CBenac31-Jul-09 14:27
CBenac31-Jul-09 14:27 
AnswerRe: How to display a document in silverlight? Pin
Michael Sync31-Jul-09 18:21
Michael Sync31-Jul-09 18:21 

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.