Download presentation
Presentation is loading. Please wait.
Published byJocelyn Hayes Modified over 10 years ago
1
Pimp My Listbox Rainer Stropek cubido business solutions gmbh
5
enter the the presentation name in the footer field5 18.10.2007
7
Window StackPanel TextBlock TextBox ElementBaum
8
Logischer und Border AdornerDecorator AdornerLayer ContentPresenter String... (ScrollViewer, Grid, Rectangle, ScrollBar, etc.) StackPanel TextBlock TextBox Window
11
[ContentPropertyAttribute("Items")] [LocalizabilityAttribute(LocalizationCategory.None, Readability=Readability.Unreadable)] [StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=typeof(FrameworkElement))] public class ItemsControl : Control, IAddChild [ContentPropertyAttribute("Items")] [LocalizabilityAttribute(LocalizationCategory.None, Readability=Readability.Unreadable)] [StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=typeof(FrameworkElement))] public class ItemsControl : Control, IAddChild Ein Text! Ein Text!
12
DEMO... Füllen einer Listbox im XAML-Code
13
<Page... xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sysio="clr-namespace:System.IO;assembly=mscorlib" Margin="10"> <ObjectDataProvider ObjectType="{x:Type sysio:DirectoryInfo}" MethodName="GetFiles" x:Key="Files"> [...]\Images <ListBox ItemsSource="{Binding Source={StaticResource Files}}" /> <Page... xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sysio="clr-namespace:System.IO;assembly=mscorlib" Margin="10"> <ObjectDataProvider ObjectType="{x:Type sysio:DirectoryInfo}" MethodName="GetFiles" x:Key="Files"> [...]\Images <ListBox ItemsSource="{Binding Source={StaticResource Files}}" />
14
DEMO... Füllen einer Listbox mit Data Binding
16
Resourcen...... Lokale Resourcen............ Resourcen in Windows oder Pages............ Resourcen in app.xaml
17
Styles <ListBox Grid.Column="0" Grid.Row="1" ItemsSource="{Binding Source={StaticResource Files}}"> <ListBox Grid.Column="0" Grid.Row="1" ItemsSource="{Binding Source={StaticResource Files}}">
18
DEMO... Styling der Listbox
19
Templates FrameworkTemplateDataTemplateControlTemplateItemsPanelTemplate
21
Data Trigger......
22
DEMO... Data Template mit Data Trigger
23
Control Template <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" /> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
24
DEMO... Control Template mit Trigger
25
Ein Text!... Ein Text!...
27
DEMO… ListBox mit WrapPanel statt StackPanel 27
29
DEMO... ItemsPanelTemplate, individuelles Panel
30
Custom Controls Logik Design
31
DEMO... Custom Control
32
enter the the presentation name in the footer field32 18.10.2007
33
r.stropek@cubido.at oder rainer@software-architects.atrainer@software-architects.at Karin Huber, Rainer Stropek Software Architects
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.