|
4 | 4 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
5 | 5 | xmlns:sd="http://schemas.stride3d.net/xaml/presentation" |
6 | 6 | xmlns:md="https://github.com/whistyun/Markdown.Avalonia.Tight" |
| 7 | + xmlns:p="using:Stride.Core.Presentation.Avalonia.Services" |
7 | 8 | xmlns:l="using:Stride.Launcher.Assets.Localization" |
8 | 9 | xmlns:srv="using:Stride.Launcher.Services" |
9 | 10 | xmlns:vm="using:Stride.Launcher.ViewModels" |
|
240 | 241 | </Border> |
241 | 242 | <!-- Visual studio extensions --> |
242 | 243 | <Border DockPanel.Dock="Bottom" |
| 244 | + IsVisible="{Binding Source={x:Static p:OperatingSystemHelper.IsWindows}, Mode=OneTime}" |
243 | 245 | BorderBrush="{StaticResource TileBorderBrush}" BorderThickness="{StaticResource BorderThicknessTile}"> |
244 | 246 | <StackPanel> |
245 | 247 | <StackPanel.DataTemplates> |
|
269 | 271 | </StackPanel> |
270 | 272 | </Border> |
271 | 273 | <Border DockPanel.Dock="Bottom" |
| 274 | + IsVisible="{Binding Source={x:Static p:OperatingSystemHelper.IsWindows}, Mode=OneTime}" |
272 | 275 | BorderBrush="{StaticResource BorderBrushTile}"> |
273 | 276 | <DockPanel Margin="4,0"> |
274 | 277 | <Button Classes="TransparentButton" |
|
284 | 287 | </DockPanel> |
285 | 288 | </Border> |
286 | 289 | <Border DockPanel.Dock="Bottom" |
| 290 | + IsVisible="{Binding Source={x:Static p:OperatingSystemHelper.IsWindows}, Mode=OneTime}" |
287 | 291 | BorderBrush="{StaticResource BorderBrushTile}" BorderThickness="12,0,0,0"> |
288 | 292 | <DockPanel Height="32" Margin="4,0"> |
289 | 293 | <Image Source="/Assets/Images/visual-studio.png" |
|
393 | 397 | <Border.Effect> |
394 | 398 | <DropShadowEffect BlurRadius="5" Opacity="0.4" /> |
395 | 399 | </Border.Effect> |
396 | | - <ScrollViewer VerticalScrollBarVisibility="Auto" MaxHeight="128"> |
| 400 | + <ScrollViewer VerticalScrollBarVisibility="Auto" MaxHeight="256"> |
397 | 401 | <ItemsControl ItemsSource="{Binding AlternateVersions}"> |
398 | 402 | <ItemsControl.ItemTemplate> |
399 | 403 | <DataTemplate DataType="{x:Type vm:StrideStoreAlternateVersionViewModel}"> |
|
507 | 511 | FontSize="24" TextAlignment="Left" VerticalAlignment="Center" /> |
508 | 512 | </DockPanel> |
509 | 513 | </Border> |
510 | | - <Border BorderBrush="{StaticResource BorderBrushTile}" BorderThickness="{StaticResource BorderThicknessTile}" |
511 | | - Background="{StaticResource BackgroundTileAlpha}" |
512 | | - IsVisible="{Binding !RecentProjects.Count, FallbackValue={x:False}}"> |
513 | | - <TextBlock Text="{x:Static l:Strings.NoProjectCreated}" |
514 | | - FontSize="16" Margin="20" |
515 | | - TextAlignment="Center" VerticalAlignment="Center" /> |
516 | | - </Border> |
517 | | - <Border BorderBrush="{StaticResource BorderBrushTile}" BorderThickness="{StaticResource BorderThicknessTile}"> |
518 | | - <ScrollViewer VerticalScrollBarVisibility="Auto"> |
519 | | - <ItemsControl ItemsSource="{Binding RecentProjects}"> |
520 | | - <ItemsControl.ItemTemplate> |
521 | | - <DataTemplate DataType="{x:Type vm:RecentProjectViewModel}"> |
522 | | - <Border BorderBrush="{StaticResource BorderBrushTile}" BorderThickness="{StaticResource BorderThicknessTileList}"> |
523 | | - <Button Command="{Binding OpenCommand}" |
524 | | - IsEnabled="{Binding Launcher.StartStudioCommand.IsEnabled}" |
525 | | - HorizontalAlignment="Stretch" |
526 | | - HorizontalContentAlignment="Stretch"> |
527 | | - <DockPanel Margin="8,4"> |
528 | | - <DockPanel DockPanel.Dock="Bottom"> |
529 | | - <!-- Update dropdown --> |
530 | | - <ToggleButton DockPanel.Dock="Right" x:Name="Toggle" |
531 | | - IsVisible="{Binding CompatibleVersions.Count}"/> |
532 | | - <Popup IsOpen="{Binding ElementName=Toggle, Path=IsChecked}" |
533 | | - PlacementTarget="{Binding ElementName=Toggle}"> |
534 | | - <ScrollViewer VerticalScrollBarVisibility="Auto"> |
535 | | - <ItemsControl ItemsSource="{Binding CompatibleVersions}"> |
536 | | - <ItemsControl.ItemTemplate> |
537 | | - <DataTemplate DataType="{x:Type vm:StrideVersionViewModel}"> |
538 | | - <Button Content="{Binding DisplayName, StringFormat={x:Static l:Strings.OpenProjectWithVersion}}" |
539 | | - Command="{Binding $parent[ScrollViewer].((vm:RecentProjectViewModel)DataContext).OpenWithCommand}" |
540 | | - HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" /> |
541 | | - </DataTemplate> |
542 | | - </ItemsControl.ItemTemplate> |
543 | | - </ItemsControl> |
544 | | - </ScrollViewer> |
545 | | - </Popup> |
546 | | - <TextBlock DockPanel.Dock="Bottom" |
547 | | - Text="{Binding FullPath}" |
548 | | - FontStyle="Italic" /> |
549 | | - </DockPanel> |
550 | | - <DockPanel> |
551 | | - <!-- Discovering --> |
552 | | - <TextBlock Text="{Binding StrideVersionName}" |
553 | | - FontSize="14" |
554 | | - IsVisible="{Binding StrideVersionName, Converter={sd:ObjectToBool}}" /> |
555 | | - <!-- Unknown --> |
556 | | - <TextBlock Text="{x:Static l:Strings.UnknownVersion}" |
557 | | - FontSize="14" |
558 | | - IsVisible="{Binding StrideVersionName, Converter={sd:Chained {sd:ObjectToBool}, {sd:InvertBool}}}" /> |
559 | | - <TextBlock Text="{Binding Name}" |
560 | | - FontSize="16" FontWeight="Bold" /> |
| 514 | + <Grid> |
| 515 | + <Border BorderBrush="{StaticResource BorderBrushTile}" BorderThickness="{StaticResource BorderThicknessTile}" |
| 516 | + Background="{StaticResource BackgroundTileAlpha}" |
| 517 | + IsVisible="{Binding !RecentProjects.Count, FallbackValue={x:False}}" |
| 518 | + VerticalAlignment="Top"> |
| 519 | + <TextBlock Text="{x:Static l:Strings.NoProjectCreated}" |
| 520 | + FontSize="16" Margin="20" |
| 521 | + TextAlignment="Center" VerticalAlignment="Center" /> |
| 522 | + </Border> |
| 523 | + <Border BorderBrush="{StaticResource BorderBrushTile}" BorderThickness="{StaticResource BorderThicknessTile}"> |
| 524 | + <ScrollViewer VerticalScrollBarVisibility="Auto"> |
| 525 | + <ItemsControl ItemsSource="{Binding RecentProjects}"> |
| 526 | + <ItemsControl.ItemTemplate> |
| 527 | + <DataTemplate DataType="{x:Type vm:RecentProjectViewModel}"> |
| 528 | + <Border BorderBrush="{StaticResource BorderBrushTile}" BorderThickness="{StaticResource BorderThicknessTileList}"> |
| 529 | + <Button Command="{Binding OpenCommand}" |
| 530 | + IsEnabled="{Binding Launcher.StartStudioCommand.IsEnabled}" |
| 531 | + HorizontalAlignment="Stretch" |
| 532 | + HorizontalContentAlignment="Stretch"> |
| 533 | + <DockPanel Margin="8,4"> |
| 534 | + <DockPanel DockPanel.Dock="Bottom"> |
| 535 | + <!-- Update dropdown --> |
| 536 | + <ToggleButton DockPanel.Dock="Right" x:Name="Toggle" |
| 537 | + IsVisible="{Binding CompatibleVersions.Count}"/> |
| 538 | + <Popup IsOpen="{Binding ElementName=Toggle, Path=IsChecked}" |
| 539 | + PlacementTarget="{Binding ElementName=Toggle}"> |
| 540 | + <ScrollViewer VerticalScrollBarVisibility="Auto"> |
| 541 | + <ItemsControl ItemsSource="{Binding CompatibleVersions}"> |
| 542 | + <ItemsControl.ItemTemplate> |
| 543 | + <DataTemplate DataType="{x:Type vm:StrideVersionViewModel}"> |
| 544 | + <Button Content="{Binding DisplayName, StringFormat={x:Static l:Strings.OpenProjectWithVersion}}" |
| 545 | + Command="{Binding $parent[ScrollViewer].((vm:RecentProjectViewModel)DataContext).OpenWithCommand}" |
| 546 | + HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" /> |
| 547 | + </DataTemplate> |
| 548 | + </ItemsControl.ItemTemplate> |
| 549 | + </ItemsControl> |
| 550 | + </ScrollViewer> |
| 551 | + </Popup> |
| 552 | + <TextBlock DockPanel.Dock="Bottom" |
| 553 | + Text="{Binding FullPath}" |
| 554 | + FontStyle="Italic" /> |
| 555 | + </DockPanel> |
| 556 | + <DockPanel> |
| 557 | + <!-- Discovering --> |
| 558 | + <TextBlock Text="{Binding StrideVersionName}" |
| 559 | + FontSize="14" |
| 560 | + IsVisible="{Binding StrideVersionName, Converter={sd:ObjectToBool}}" /> |
| 561 | + <!-- Unknown --> |
| 562 | + <TextBlock Text="{x:Static l:Strings.UnknownVersion}" |
| 563 | + FontSize="14" |
| 564 | + IsVisible="{Binding StrideVersionName, Converter={sd:Chained {sd:ObjectToBool}, {sd:InvertBool}}}" /> |
| 565 | + <TextBlock Text="{Binding Name}" |
| 566 | + FontSize="16" FontWeight="Bold" /> |
| 567 | + </DockPanel> |
561 | 568 | </DockPanel> |
562 | | - </DockPanel> |
563 | | - </Button> |
564 | | - <Border.ContextMenu> |
565 | | - <ContextMenu> |
566 | | - <MenuItem Header="{x:Static l:Strings.ShowInExplorer}" Command="{Binding ExploreCommand}" /> |
567 | | - <MenuItem Header="{x:Static l:Strings.RemoveFromList}" Command="{Binding RemoveCommand}" /> |
568 | | - </ContextMenu> |
569 | | - </Border.ContextMenu> |
570 | | - </Border> |
571 | | - </DataTemplate> |
572 | | - </ItemsControl.ItemTemplate> |
573 | | - </ItemsControl> |
574 | | - </ScrollViewer> |
575 | | - </Border> |
| 569 | + </Button> |
| 570 | + <Border.ContextMenu> |
| 571 | + <ContextMenu> |
| 572 | + <MenuItem Header="{x:Static l:Strings.ShowInExplorer}" Command="{Binding ExploreCommand}" /> |
| 573 | + <MenuItem Header="{x:Static l:Strings.RemoveFromList}" Command="{Binding RemoveCommand}" /> |
| 574 | + </ContextMenu> |
| 575 | + </Border.ContextMenu> |
| 576 | + </Border> |
| 577 | + </DataTemplate> |
| 578 | + </ItemsControl.ItemTemplate> |
| 579 | + </ItemsControl> |
| 580 | + </ScrollViewer> |
| 581 | + </Border> |
| 582 | + </Grid> |
576 | 583 | </DockPanel> |
577 | 584 | </Border> |
578 | 585 |
|
|
0 commit comments