Browse Source

Fix TwoWay bindings on FullPath

pull/14/head
Ionite 1 year ago
parent
commit
8618d36af6
No known key found for this signature in database
  1. 30
      StabilityMatrix/LaunchPage.xaml

30
StabilityMatrix/LaunchPage.xaml

@ -19,8 +19,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Page.Resources> <Page.Resources>
<BooleanToVisibilityConverter x:Key="BoolToVisConverter"/> <BooleanToVisibilityConverter x:Key="BoolToVisConverter" />
<!-- Manually copied style since can't inherit: https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui/Styles/Controls/ComboBox.xaml --> <!-- Manually copied style since can't inherit: https://github.com/lepoco/wpfui/blob/main/src/Wpf.Ui/Styles/Controls/ComboBox.xaml -->
<ControlTemplate TargetType="{x:Type ComboBoxItem}" x:Key="SelectPackageDropDownStyle"> <ControlTemplate TargetType="{x:Type ComboBoxItem}" x:Key="SelectPackageDropDownStyle">
<Grid> <Grid>
@ -58,10 +58,8 @@
VerticalAlignment="Top" VerticalAlignment="Top"
d:DataContext="{d:DesignInstance Type=models:InstalledPackage, d:DataContext="{d:DesignInstance Type=models:InstalledPackage,
IsDesignTimeCreatable=True}"> IsDesignTimeCreatable=True}">
<TextBlock Margin="0,5,0,5" Text="{Binding DisplayName}" /> <TextBlock Margin="0,5,0,5" Text="{Binding DisplayName, Mode=OneWay}" />
<TextBlock Margin="0,0,0,5"> <TextBlock Margin="0,0,0,5" Text="{Binding FullPath, Mode=OneWay}" />
<Run Text="{Binding FullPath}"/>
</TextBlock>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Grid> </Grid>
@ -186,7 +184,7 @@
<TextBlock <TextBlock
Margin="0,5,0,5" Margin="0,5,0,5"
Name="NameTextBlock" Name="NameTextBlock"
Text="{Binding DisplayName}" /> Text="{Binding DisplayName, Mode=OneWay}" />
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
</ComboBox.ItemTemplate> </ComboBox.ItemTemplate>
@ -208,13 +206,15 @@
TextWrapping="Wrap" TextWrapping="Wrap"
VerticalAlignment="Stretch" /> VerticalAlignment="Stretch" />
</ScrollViewer> </ScrollViewer>
<ui:Button Grid.Row="2" Grid.ColumnSpan="2" <ui:Button
Margin="24,0,24,8" Appearance="Success"
Command="{Binding LaunchWebUiCommand}" Command="{Binding LaunchWebUiCommand}"
Appearance="Success" Content="Open Web UI"
FontSize="12" FontSize="12"
HorizontalAlignment="Stretch" Grid.ColumnSpan="2"
Visibility="{Binding ShowWebUiButton, Converter={StaticResource BoolToVisConverter}}" Grid.Row="2"
Content="Open Web UI"/> HorizontalAlignment="Stretch"
Margin="24,0,24,8"
Visibility="{Binding ShowWebUiButton, Converter={StaticResource BoolToVisConverter}}" />
</Grid> </Grid>
</Page> </Page>

Loading…
Cancel
Save