Click here to Skip to main content
15,891,033 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: WPF DateTime picker Pin
Mark Salsbery24-Apr-09 6:01
Mark Salsbery24-Apr-09 6:01 
Questione.currentTarget in WPF? Pin
emptythetill23-Apr-09 8:52
emptythetill23-Apr-09 8:52 
AnswerRe: e.currentTarget in WPF? Pin
Pete O'Hanlon24-Apr-09 2:11
mvePete O'Hanlon24-Apr-09 2:11 
GeneralRe: e.currentTarget in WPF? Pin
emptythetill24-Apr-09 3:48
emptythetill24-Apr-09 3:48 
GeneralRe: e.currentTarget in WPF? Pin
Pete O'Hanlon24-Apr-09 4:30
mvePete O'Hanlon24-Apr-09 4:30 
QuestionData Binding Problem [modified] Pin
#realJSOP23-Apr-09 7:52
mve#realJSOP23-Apr-09 7:52 
AnswerRe: Data Binding Problem Pin
#realJSOP23-Apr-09 8:35
mve#realJSOP23-Apr-09 8:35 
AnswerRe: Data Binding Problem Pin
Christian Graus23-Apr-09 10:10
protectorChristian Graus23-Apr-09 10:10 
GeneralRe: Data Binding Problem Pin
#realJSOP23-Apr-09 10:21
mve#realJSOP23-Apr-09 10:21 
GeneralRe: Data Binding Problem Pin
Christian Graus23-Apr-09 10:50
protectorChristian Graus23-Apr-09 10:50 
GeneralRe: Data Binding Problem Pin
Mark Salsbery23-Apr-09 11:21
Mark Salsbery23-Apr-09 11:21 
GeneralRe: Data Binding Problem Pin
#realJSOP23-Apr-09 13:50
mve#realJSOP23-Apr-09 13:50 
GeneralRe: Data Binding Problem Pin
#realJSOP24-Apr-09 2:56
mve#realJSOP24-Apr-09 2:56 
GeneralRe: Data Binding Problem Pin
Mark Salsbery24-Apr-09 6:45
Mark Salsbery24-Apr-09 6:45 
GeneralRe: Data Binding Problem Pin
#realJSOP24-Apr-09 10:25
mve#realJSOP24-Apr-09 10:25 
GeneralRe: Data Binding Problem [modified] Pin
Mark Salsbery24-Apr-09 10:52
Mark Salsbery24-Apr-09 10:52 
GeneralRe: Data Binding Problem Pin
#realJSOP25-Apr-09 2:52
mve#realJSOP25-Apr-09 2:52 
GeneralRe: Data Binding Problem Pin
Mark Salsbery25-Apr-09 6:58
Mark Salsbery25-Apr-09 6:58 
QuestionMaking a template for a ListView in WPF ? Pin
Mohammad Dayyan23-Apr-09 4:55
Mohammad Dayyan23-Apr-09 4:55 
QuestionRe: Making a template for a ListView in WPF ? Pin
Mark Salsbery23-Apr-09 7:04
Mark Salsbery23-Apr-09 7:04 
AnswerRe: Making a template for a ListView in WPF ? Pin
Mohammad Dayyan23-Apr-09 7:21
Mohammad Dayyan23-Apr-09 7:21 
GeneralRe: Making a template for a ListView in WPF ? Pin
Mark Salsbery23-Apr-09 7:55
Mark Salsbery23-Apr-09 7:55 
GeneralRe: Making a template for a ListView in WPF ? Pin
Mohammad Dayyan23-Apr-09 8:13
Mohammad Dayyan23-Apr-09 8:13 
GeneralRe: Making a template for a ListView in WPF ? Pin
Mark Salsbery23-Apr-09 8:29
Mark Salsbery23-Apr-09 8:29 
Sure - you can re template the control, but you need to provide
the items presenter to show the items.

Here's a default template for a ListView you can use as a starting place:
<SolidColorBrush x:Key="ListBorder" Color="#828790"/>
<Style x:Key="ListViewStyle1" TargetType="{x:Type ListView}">
    <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
    <Setter Property="BorderBrush" Value="{StaticResource ListBorder}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type ListView}">
                <Border x:Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="1">
                    <ScrollViewer Padding="{TemplateBinding Padding}" Focusable="false">
                        <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </ScrollViewer>
                </Border>
                <ControlTemplate.Triggers>
                    <Trigger Property="IsEnabled" Value="false">
                        <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                    </Trigger>
                    <Trigger Property="IsGrouping" Value="true">
                        <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>


Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Making a template for a ListView in WPF ? Pin
Mohammad Dayyan23-Apr-09 8:45
Mohammad Dayyan23-Apr-09 8: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.