Click here to Skip to main content
15,887,585 members
Home / Discussions / WPF
   

WPF

 
AnswerMessage Removed Pin
4-Feb-09 7:57
professionalN_tro_P4-Feb-09 7:57 
GeneralRe: ListBox SelectedItems binding Pin
Gideon Engelberth5-Feb-09 3:02
Gideon Engelberth5-Feb-09 3:02 
QuestionAccessing silverlight application throw outlook addin Pin
AR Reddy3-Feb-09 22:31
AR Reddy3-Feb-09 22:31 
QuestionRe: Accessing silverlight application throw outlook addin Pin
Mark Salsbery4-Feb-09 6:01
Mark Salsbery4-Feb-09 6:01 
QuestionTemplates for calendar control Pin
priyagee3-Feb-09 18:17
priyagee3-Feb-09 18:17 
AnswerRe: Templates for calendar control Pin
Mark Salsbery3-Feb-09 19:18
Mark Salsbery3-Feb-09 19:18 
QuestionIs there any native WPF Multiselect combobox available ? Pin
Member 57039053-Feb-09 8:19
Member 57039053-Feb-09 8:19 
AnswerRe: Is there any native WPF Multiselect combobox available ? Pin
JS 20084-Feb-09 3:17
JS 20084-Feb-09 3:17 
<Style x:Key="MultiSelectComboBox" TargetType="{x:Type ComboBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBox}">
<Grid SnapsToDevicePixels="true" x:Name="MainGrid" Height="Auto" Width="Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="0"/>
</Grid.ColumnDefinitions>
<Popup AllowsTransparency="true" IsOpen="{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}"
Margin="1" x:Name="PART_Popup" Grid.ColumnSpan="2">
<Border x:Name="DropDownBorder" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding Path=ActualWidth, ElementName=MainGrid}">
<ScrollViewer CanContentScroll="true">
<ListBox x:Name="lstBox" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
KeyboardNavigation.DirectionalNavigation="Contained" SelectionMode="Multiple" ItemsSource="{TemplateBinding ItemsSource}"/>
</ScrollViewer>
</Border>
</Popup>
<ToggleButton Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Grid.ColumnSpan="2"
IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{DynamicResource ToggleButtonStyle1}"/>
<ItemsControl IsHitTestVisible="false" ItemsSource="{Binding Path=SelectedItems, ElementName=lstBox}" Margin="4,0,0,0">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel IsItemsHost="True" Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<Style x:Key="ToggleButtonStyle1" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Background="{TemplateBinding Background}" BorderThickness="1,1,1,1" BorderBrush="{TemplateBinding BorderBrush}">
<Grid Width="Auto" Height="Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.884*"/>
<ColumnDefinition Width="0.116*"/>
</Grid.ColumnDefinitions>
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True" Grid.ColumnSpan="2" VerticalAlignment="Center" Margin="0,0,0,0"/>
<Path d:LayoutOverrides="GridBox" HorizontalAlignment="Center" Margin="4,6,4,6" Fill="#FF000000" Stretch="Fill" Stroke="#FF000000" Data="M0.5,0.5 L28.364,0.5 15.314,22.374998 15.314,22.374999 z" x:Name="down" VerticalAlignment="Center" Width="Auto" Height="Auto" Grid.Column="1"/>
<Path d:LayoutOverrides="GridBox" HorizontalAlignment="Center" Margin="4,6,4,6" Fill="#FF000000" Stretch="Fill" Stroke="#FF000000" Data="M9.3139996,0.5 L9.3139996,0.5 18.8,18.4 0.5,18.4 z" x:Name="up" Visibility="Collapsed" VerticalAlignment="Center" Width="Auto" Height="Auto" Grid.Column="1"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Visibility" TargetName="down" Value="Collapsed"/>
<Setter Property="Visibility" TargetName="up" Value="Visible"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="#ADADAD"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>



<Grid x:Name="LayoutRoot">
<ComboBox IsSynchronizedWithCurrentItem="True" x:Name="cmbBox" Style="{DynamicResource MultiSelectComboBox}" VerticalAlignment="Top" Height="29.6" Margin="71.2,52,74.4,0"/>
</Grid>


cmbBox.ItemsSource = new List<string>() { "A", "B", "C", "D", "E", "F", "G", "H", "I" };
AnswerRe: Is there any native WPF Multiselect combobox available ? Pin
schiebel-t6-Feb-09 2:26
schiebel-t6-Feb-09 2:26 
QuestionSimple listbox stuff Pin
Ray Cassick3-Feb-09 7:22
Ray Cassick3-Feb-09 7:22 
AnswerRe: Simple listbox stuff Pin
Mark Salsbery3-Feb-09 15:14
Mark Salsbery3-Feb-09 15:14 
QuestionCan´t catch XamlParseException Pin
Czechtim3-Feb-09 1:01
Czechtim3-Feb-09 1:01 
Questionplotting in WPF Pin
jeshmitha3-Feb-09 0:21
jeshmitha3-Feb-09 0:21 
AnswerRe: plotting in WPF Pin
Pete O'Hanlon3-Feb-09 1:01
mvePete O'Hanlon3-Feb-09 1:01 
QuestionWPF Browser Application ApplicationCommands.Paste Pin
haticeaaaaaa2-Feb-09 21:12
haticeaaaaaa2-Feb-09 21:12 
QuestionUser Controls Rock!!!! Pin
BlitzPackage2-Feb-09 13:06
BlitzPackage2-Feb-09 13:06 
AnswerRe: User Controls Rock!!!! Pin
Mark Salsbery2-Feb-09 16:00
Mark Salsbery2-Feb-09 16:00 
AnswerRe: User Controls Rock!!!! Pin
Pete O'Hanlon2-Feb-09 21:57
mvePete O'Hanlon2-Feb-09 21:57 
GeneralRe: User Controls Rock!!!! Pin
BlitzPackage3-Feb-09 7:27
BlitzPackage3-Feb-09 7:27 
GeneralRe: User Controls Rock!!!! Pin
Pete O'Hanlon3-Feb-09 8:49
mvePete O'Hanlon3-Feb-09 8:49 
AnswerRe: User Controls Rock!!!! Pin
Jammer5-Feb-09 6:46
Jammer5-Feb-09 6:46 
Question"Silverlight" vs "WPF Web Browser App" Pin
devvvy1-Feb-09 16:48
devvvy1-Feb-09 16:48 
AnswerRe: "Silverlight" vs "WPF Web Browser App" Pin
Pete O'Hanlon2-Feb-09 4:56
mvePete O'Hanlon2-Feb-09 4:56 
AnswerRe: "Silverlight" vs "WPF Web Browser App" Pin
salon9-Feb-09 21:55
salon9-Feb-09 21:55 
QuestionDependencyProperty problem Pin
schiebel-t31-Jan-09 7:58
schiebel-t31-Jan-09 7:58 

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.