|
<Window x:Class="CBR.Views.OptionsViewExtended"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Files="clr-namespace:CBR.Core.Files;assembly=CBR.Core"
xmlns:Converters="clr-namespace:CBR.Components.Converters"
Title="OptionsViewExtended" Height="500" Width="500" WindowStyle="ToolWindow">
<Window.Resources>
<DataTemplate x:Key="BookTypeTemplate" DataType="{x:Type Files:FileExtension }">
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="3*"/>
</Grid.ColumnDefinitions>
<CheckBox Margin="15,5,15,5" IsChecked="{Binding IsChecked}" Command="{Binding CheckCommand}" VerticalAlignment="Center" />
<Image Grid.Column="1" Width="24" Source="{Binding Icon}" />
<StackPanel Grid.Column="2" Margin="5">
<TextBlock Text="{Binding Extension}" />
<TextBlock Text="{Binding ToDisplay}" />
</StackPanel>
</Grid>
</DataTemplate>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TabControl TabStripPlacement="Left" Name="tabGroup">
<TabItem Header="Properties" Name="tabItemProperties">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel Orientation="Vertical" Margin="10">
<TextBlock Style="{StaticResource SubTitleLabel}" Margin="5">Dynamic properties</TextBlock>
<Label Margin="5" HorizontalAlignment="Stretch">Existing properties</Label>
<StackPanel Margin="5">
<ListBox ItemsSource="{Binding Dynamics}" Name="lbProperties" MinHeight="100" />
<Button Style="{StaticResource CBROnWhiteButtonStyle}" Margin="30,10,30,10" ToolTip="Delete an existing property and save the settings automatically"
Content="Delete..." Command="{Binding DeletePropertyCommand}" CommandParameter="{Binding ElementName=lbProperties, Path=SelectedValue}" />
</StackPanel>
<TextBlock Style="{StaticResource SubTitleLabel}" Margin="5">Add new property</TextBlock>
<StackPanel>
<Label Margin="5" HorizontalAlignment="Stretch">Property name</Label>
<TextBox Margin="30,0,30,0" ToolTip="Type the new property name here" Name="tbProperty"></TextBox>
<Button Style="{StaticResource CBROnWhiteButtonStyle}" Margin="30,10,30,10" ToolTip="Add a new property and save the settings automatically" Content="Add..."
Command="{Binding AddPropertyCommand}" CommandParameter="{Binding ElementName=tbProperty, Path=Text}" />
</StackPanel>
</StackPanel>
</ScrollViewer>
</TabItem>
<TabItem Header="Registering" Name="tabItemRegister">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel Orientation="Vertical" Margin="10">
<TextBlock Style="{StaticResource SubTitleLabel}" Margin="5">Registering file type</TextBlock>
<TextBlock Margin="5" HorizontalAlignment="Stretch" Text="Registering a file type consist of associating a programme and an icon to a certain type of file" TextWrapping="WrapWithOverflow" />
<ItemsControl ItemsSource="{Binding FileTypes}" ItemTemplate="{StaticResource BookTypeTemplate}" />
</StackPanel>
</ScrollViewer>
</TabItem>
</TabControl>
<Button Grid.Row="1" Style="{StaticResource CBROnWhiteButtonStyle}" Content="Close" Margin="10" Name="btnClose" Click="btnClose_Click" />
</Grid>
</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.
WPF and MVVM fan, I practice C # in all its forms from the beginning of the NET Framework without mentioning C ++ / MFC and other software packages such as databases, ASP, WCF, Web & Windows services, Application, and now Core and UWP.
In my wasted hours, I am guilty of having fathered C.B.R. and its cousins C.B.R. for WinRT and UWP on the Windows store.
But apart from that, I am a great handyman ... the house, a rocket stove to heat the jacuzzi and the last one: a wood oven for pizza, bread, and everything that goes inside
https://guillaumewaser.wordpress.com/
https://fouretcompagnie.wordpress.com/