trying to see if I can just get the selected index and bind to it... doesn't seem to be working though ...
49 lines
3.1 KiB
XML
49 lines
3.1 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
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"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
x:Class="SPTInstaller.CustomControls.PreCheckDetails">
|
|
<Panel>
|
|
<StackPanel DataContext="{Binding RelativeSource={RelativeSource AncestorType=UserControl}}">
|
|
<Label Content="Testing"/>
|
|
<Label Content="{Binding PreChecks[SelectedIndex].Name}"/>
|
|
<Label Content="{Binding PreChecks[SelectedIndex].State}"/>
|
|
<Label Content="{Binding SelectedIndex}"/>
|
|
</StackPanel>
|
|
<!-- show when nothing is selected -->
|
|
<!-- <Label Content="Select a Pre-Check to see more info" FontSize="20" -->
|
|
<!-- HorizontalAlignment="Center" VerticalAlignment="Center" -->
|
|
<!-- IsVisible="{Binding PreCheckName, RelativeSource={RelativeSource AncestorType=UserControl}, Converter={x:Static StringConverters.IsNullOrEmpty}}" -->
|
|
<!-- /> -->
|
|
<!-- -->
|
|
<!-- ~1~ selected precheck details @1@ -->
|
|
<!-- <Grid RowDefinitions="10, *, Auto, 10" ColumnDefinitions="10, 10, *, 10" -->
|
|
<!-- IsVisible="{Binding PreCheckName, RelativeSource={RelativeSource AncestorType=UserControl}, Converter={x:Static StringConverters.IsNotNullOrEmpty}}" -->
|
|
<!-- > -->
|
|
<!-- <Rectangle Grid.Row="1" Grid.Column="1" Width="3" Fill="{Binding BarColor, RelativeSource={RelativeSource AncestorType=UserControl}}" HorizontalAlignment="Left"/> -->
|
|
<!-- -->
|
|
<!-- <StackPanel Grid.Row="1" Grid.Column="2" HorizontalAlignment="Left"> -->
|
|
<!-- <Label Content="{Binding PreCheckName, RelativeSource={RelativeSource AncestorType=UserControl}}" -->
|
|
<!-- FontSize="20" -->
|
|
<!-- /> -->
|
|
<!-- <Rectangle Height="1" Fill="Gray" Margin="0 10"/> -->
|
|
<!-- <TextBlock Text="{Binding Details, RelativeSource={RelativeSource AncestorType=UserControl}}" -->
|
|
<!-- TextWrapping="Wrap" -->
|
|
<!-- /> -->
|
|
<!-- </StackPanel> -->
|
|
<!-- -->
|
|
<!-- <Button Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Classes="yellow" -->
|
|
<!-- IsVisible="{Binding ShowAction, RelativeSource={RelativeSource AncestorType=UserControl}}" -->
|
|
<!-- CornerRadius="15" -->
|
|
<!-- Margin="0 10" -->
|
|
<!-- Command="{Binding ActionCommand, RelativeSource={RelativeSource AncestorType=UserControl}}" -->
|
|
<!-- Content="{Binding ActionButtonText, RelativeSource={RelativeSource AncestorType=UserControl}}" -->
|
|
<!-- HorizontalContentAlignment="Center" VerticalContentAlignment="Center" -->
|
|
<!-- HorizontalAlignment="Stretch" -->
|
|
<!-- /> -->
|
|
<!-- -->
|
|
<!-- </Grid> -->
|
|
</Panel>
|
|
</UserControl>
|