|
<UserControl x:Class="DiagnosticExplorer.Silverlight.Controls.SinkFilter"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ctk="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
mc:Ignorable="d"
d:DesignHeight="41" d:DesignWidth="309">
<UserControl.Resources>
<Storyboard x:Key="sbCollapse">
<DoubleAnimation Storyboard.TargetName="filterGrid" Storyboard.TargetProperty="Width" From="300" To="0" Duration="0:0:0.3" />
</Storyboard>
<Storyboard x:Key="sbExpand">
<DoubleAnimation Storyboard.TargetName="filterGrid" Storyboard.TargetProperty="Width" From="0" To="300" Duration="0:0:0.3" />
</Storyboard>
</UserControl.Resources>
<Grid MouseLeftButtonDown="HandleMouseDown">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Click="ToggleFilterVisible" HorizontalAlignment="Right">
<Button.Template>
<ControlTemplate TargetType="Button">
<Image Cursor="Hand" Width="16" Height="16" Margin="20,0,0,0" Source="{Binding ButtonSource}" />
</ControlTemplate>
</Button.Template>
</Button>
<Grid Grid.Column="1" x:Name="filterGrid" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<CheckBox Grid.Column="0" x:Name="chkLow" IsChecked="True" Background="#AAFFAA" Margin="0,0,0,0" VerticalAlignment="Center" Checked="ResetFilter" Unchecked="ResetFilter" />
<CheckBox Grid.Column="1" x:Name="chkMedium" IsChecked="True" Background="#FFFFAA" Margin="2,0,0,0" VerticalAlignment="Center" Checked="ResetFilter" Unchecked="ResetFilter" />
<CheckBox Grid.Column="2" x:Name="chkHigh" IsChecked="True" Background="#FFAAAA" Margin="2,0,0,0" VerticalAlignment="Center" Checked="ResetFilter" Unchecked="ResetFilter" />
<Border Grid.Column="3" BorderThickness="1" Margin="2" Cursor="Hand" CornerRadius="5" BorderBrush="Gray">
<ctk:DockPanel LastChildFill="True">
<Button Click="RemoveFilter" ctk:DockPanel.Dock="Right" Margin="0,0">
<Button.Template>
<ControlTemplate TargetType="Button">
<Image Source="../Resources/Delete.png" Width="16" Height="16"/>
</ControlTemplate>
</Button.Template>
</Button>
<TextBox Text="{Binding Filter, Mode=TwoWay, UpdateSourceTrigger=Explicit}" Margin="0" Height="16" KeyUp="HandleKeyUp" FontSize="8" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="0" BorderBrush="{x:Null}" />
</ctk:DockPanel>
</Border>
</Grid>
</Grid>
</UserControl>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am a software developer originally from Auckland, New Zealand. I have lived and worked in London since 2005.