1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
mon toggle button :
<ToggleButton x:Name="ButtonFilterLocal" Margin="0,0,0,0" IsChecked="{Binding IsOpenLocalFilter, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
<ToggleButton.Template>
<ControlTemplate>
<Image Source="/Apeiron;component/Utils/Images/filter.png" Width="10" Height="10" />
</ControlTemplate>
</ToggleButton.Template>
</ToggleButton>
et mon Popup
<Popup Name="popCountry" Placement="Bottom" IsOpen="{Binding IsOpenLocalFilter, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" PlacementTarget="{Binding ElementName=ButtonFilterLocal}" StaysOpen="False" Width="150">
<Border Background="White" BorderBrush="Gray" BorderThickness="1,1,1,1">
<StackPanel Margin="5,5,5,5">
<ScrollViewer Grid.Row="1" Margin="0,5,0,5"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto" >
<ListView Background="{x:Null}" BorderThickness="0" FontSize="10" Margin="0" SelectionMode="Single"
ItemsSource="{Binding ListLocalFilter , Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, IsAsync=True}" SelectedItem="{Binding SelectedLocalFilter, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsSynchronizedWithCurrentItem="False" Width="auto" Height="100">
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Style.Triggers>
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="IsSelected" Value="True"/>
</Trigger>
</Style.Triggers>
</Style>
</ListView.ItemContainerStyle>
<ListView.View>
<GridView ColumnHeaderContainerStyle="{StaticResource MasqueHeader}">
<GridViewColumn >
<GridViewColumn.CellTemplate >
<DataTemplate>
<CheckBox IsChecked="{Binding IsFiltrer}" Content="{Binding Local}" VerticalContentAlignment="Center" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="Checked" >
<i:InvokeCommandAction Command="{Binding DataContext.IsCheckedSelectionnezToutCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListView}}}" />
</i:EventTrigger>
<i:EventTrigger EventName="Unchecked" >
<i:InvokeCommandAction Command="{Binding DataContext.IsUnCheckedSelectionnezToutCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListView}}}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</CheckBox>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
</ScrollViewer>
<Button HorizontalAlignment="Right" Command="{Binding AppliquezFilterCommand}">
<Button.Template>
<ControlTemplate>
<Image Source="/Apeiron;component/Utils/Images/Ok.png" Width="15" Height="15" RenderOptions.BitmapScalingMode="HighQuality" Stretch="Fill"/>
</ControlTemplate>
</Button.Template>
</Button>
</StackPanel>
</Border>
</Popup> |
Partager