|
<Window x:Class="FileToIconTest.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:t="clr-namespace:QuickZip.Tools"
Title="FileNameToIconTest" Height="550" Width="550" x:Name="root">
<DockPanel >
<Slider x:Name="slider" Value="50" Maximum="300" Minimum="16" DockPanel.Dock="Top"
ToolTip="{Binding ElementName=slider, Path=Value}"
/>
<DockPanel DockPanel.Dock="Bottom">
<Button Content="Change" Click="Button_Click" />
<TextBlock x:Name="fileName" />
</DockPanel>
<Image Height="{Binding ElementName=slider, Path=Value}" Width="{Binding ActualHeight}" Stretch="Uniform">
<Image.Source>
<MultiBinding Converter="{x:Static t:FileToIconConverter.Instance}">
<Binding ElementName="fileName" Path="Text"/>
<Binding ElementName="slider" Path="Value" />
</MultiBinding >
</Image.Source>
</Image>
</DockPanel>
</Window>
|
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.