Jump to content
LaunchBox Community Forums

XAML Tips and Tricks


Recommended Posts

24 minutes ago, wallmachine said:

instead of having a separate view for videos and images is it possible to have them in one view?

example:

display image and if no image display video

display video and if no video display image

I believe @eatkinola latest plugin has a similar feature where it displays video for the selected game and if no video is available then it will instead display a slideshow of the game's images. Perhaps eatkinola can shed more light into this as he's the plugin owner

Link to comment
Share on other sites

3 hours ago, SNAK3ATER said:

I believe @eatkinola latest plugin has a similar feature where it displays video for the selected game and if no video is available then it will instead display a slideshow of the game's images. Perhaps eatkinola can shed more light into this as he's the plugin owner

Yes, that's how the AutopathVideoLooperFramed control (in Ao.Bigbox.Themer) works. It's easy to drop into a view. Feel free to use that control @wallmachine.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Hello,

I am sorry to bother and I know this has been mentioned but I cannot get my visual studio editing up and running. I am getting the error others mentioned about CoverFactory...I have added the references as have been stated but it wont let me add all the DLLs in the metadata folder. Any help would be seriously appreciated!

2018-07-03.png

Link to comment
Share on other sites

  • 3 weeks later...

Hello there. I was wondering if I could get some help editing the "Wall View" in BigBox?

Would it be very difficult to remove the large vertical gap between game images, and also possible remove the slight tilt entirely?

Thanks in advance if anyone has any tips!

BigBox_2018-07-21_10-58-25.png

  • Like 1
Link to comment
Share on other sites

I'm a bit confused while working on the platform part of a new theme, what I want to do is use a 'Device' image and a 'Fan art' image side by side, for some reason when I use 'Binding Path=ActivePlatform.BackgroundImagePath' (that seems to be the path to the Fanart folder?) I get images used in the Device folder as Background/Fanart images as well (randomized), causing duplicate images which doesn't look nice. 

The weather is very hot atm so it might be I'm missing something, maybe in the way my big box settings/theme settings are set? Any help would be much appreciated.

 

EDIT: Never mind lol I feel really dumb now, I had "Use platform device as background" checked in big box settings ;)

Edited by Mr. RetroLust
Link to comment
Share on other sites

  • 3 weeks later...

Hey guys, hope you can help. Not a xaml question but is an extremely complicated situation I have...

Why wont this work?

namespace ClassLibrary2
{
    public class Class1 : IGameMenuItemPlugin
    {     

        public bool SupportsMultipleGames => false;

        public string Caption
        {
            get
            {
                return "Test";
            }
        }

        public System.Drawing.Image IconImage   
        {
            get
            {
                return null;
            }
        }

        public bool ShowInLaunchBox => true;

        public bool ShowInBigBox => true;

        public bool GetIsValidForGame(IGame selectedGame)
        {
            return true;
        }

        public bool GetIsValidForGames(IGame[] selectedGames)
        {
            return false;
        }

        public void OnSelected(IGame selectedGame)
        {
	    MessageBox.Show(selectedGame.ApplicationPath); //<---Works
            MessageBox.Show(selectedGame.VideoPath); //<---Here... Dont Work
        }

        public void OnSelected(IGame[] selectedGames)
        {
            return;
        }
    }
}

Lol.

Link to comment
Share on other sites

11 minutes ago, Jason Carr said:

@jayjay I know this is confusing; sorry for that, but VideoPath is only used when the video has been set to a custom path (isn't automatically picked up from the file system). Instead, you can just use selectedGame.GetVideoPath(), which will include the default paths as well.

Ah excellent. Thank you @Jason Carr. Much appreciated. 

 

Untitled.thumb.png.4f04acc61890ef1b87757b5db160cf49.png

Edited by jayjay
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
15 minutes ago, ReignStumble said:

Hi, don't know if @Jason Carr or someone else can help me on this one.

I'm currently working on a theme but for some reason, the console image is always blury.

Don't know if it's related to the size of it or something else. (The source file in in high resolution and really clean when opened in Image Viewer.)

I've refreshed all images but it's still blury.

This is my current code:


<Grid Grid.Row="1">
  <coverFlow:FlowControl x:Name="FlowControl" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ImageType="Banner" CurveAmount="0" CameraZPosition="2.2" ItemZPosition="1.0" SelectedItemZPosition="1" Spacing="10" Panel.ZIndex="1">
    <coverFlow:FlowControl.CoverFactory>
      <coverFlow:HorizontalWheelCoverFactory />
    </coverFlow:FlowControl.CoverFactory>
  </coverFlow:FlowControl>
</Grid>

I've aslo tried with:


RenderOptions.BitmapScalingMode="HighQuality" 

But it is still blury.

 

Does anyone have an idea on how to fix this ?

Thanks in advance for your help :)

1.PNG

Hi @ReignStumble, excited to see the theme. Make sure in your Big Box options as well that you have the highest setting for CoverFlow quality. Beyond that, if it's still blurry, it's probably because there's not enough RAM in your system in order to manage displaying all the high-res images. Are you on 8 gigs of RAM?

Link to comment
Share on other sites

@ReignStumble I forgot about this, but there's a property on the FlowControl that you can use like this:

MaxVerticalImageResolutionOverride="1000"

I think it should be safe to have a high value in there for platforms, since there's typically not very many of them. For games though, if you set it too high then users will start running out of RAM in big games lists. :)

Link to comment
Share on other sites

52 minutes ago, Jason Carr said:

@ReignStumble I forgot about this, but there's a property on the FlowControl that you can use like this:


MaxVerticalImageResolutionOverride="1000"

I think it should be safe to have a high value in there for platforms, since there's typically not very many of them. For games though, if you set it too high then users will start running out of RAM in big games lists. :)

You think I should use this property with a lower value  in my theme as well to speed it up or is it optimized by default? Always looking to speed the theme up as long lists with thousands of games are a bit sluggish <- Which seems logical to me but if I can speed it up further any advice is welcome :)

Link to comment
Share on other sites

2 hours ago, Mr. RetroLust said:

You think I should use this property with a lower value  in my theme as well to speed it up or is it optimized by default? Always looking to speed the theme up as long lists with thousands of games are a bit sluggish <- Which seems logical to me but if I can speed it up further any advice is welcome :)

This will actually slow the theme down, not speed it up. It increases the size of the image cache.

Edit: Oic what you mean. No, it's optimized by default, so it's best not to override it.

  • Thanks 1
Link to comment
Share on other sites

Hey @Grila are you able to have a look at this for me? I'm not able to centre the dot and it also gets cut off when going to the A-Z search? Maybe a better way to do it?

<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

	<Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
		<Setter Property="FocusVisualStyle" Value="{x:Null}" />
		<Setter Property="Padding" Value="0.00" />
		<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" />
		<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" />
		<Setter Property="Background" Value="Transparent" />
		<Setter Property="BorderBrush" Value="Transparent" />
		<Setter Property="BorderThickness" Value="1.00" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ListBoxItem}">
					<Grid>
						<Grid>
							<Ellipse x:Name="Dot" Visibility="Hidden" Width="19.00" Height="19.00" Margin="0.00,8.00,0.00,0.00" HorizontalAlignment="Left" Fill="#35C8F1" Stretch="Fill" />
						</Grid>

						<Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0.00" Padding="15.70,0.00,0.00,0.00" SnapsToDevicePixels="True">
							<ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}" SnapsToDevicePixels="True" />
						</Border>
					</Grid>

					<ControlTemplate.Triggers>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="IsMouseOver" Value="True" />
							</MultiTrigger.Conditions>
							<Setter TargetName="Bd" Property="TextElement.Foreground" Value="#35C8F1" />
							<Setter TargetName="Dot" Property="Visibility" Value="Visible" />
						</MultiTrigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="Selector.IsSelectionActive" Value="False" />
								<Condition Property="IsSelected" Value="True" />
							</MultiTrigger.Conditions>
							<Setter TargetName="Bd" Property="TextElement.Foreground" Value="#35C8F1" />
							<Setter TargetName="Dot" Property="Visibility" Value="Visible" />
						</MultiTrigger>
						<MultiTrigger>
							<MultiTrigger.Conditions>
								<Condition Property="Selector.IsSelectionActive" Value="True" />
								<Condition Property="IsSelected" Value="True" />
							</MultiTrigger.Conditions>
							<Setter TargetName="Bd" Property="TextElement.Foreground" Value="#35C8F1" />
							<Setter TargetName="Dot" Property="Visibility" Value="Visible" />
						</MultiTrigger>
						<Trigger Property="IsEnabled" Value="False">
							<Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>

 

Edited by wallmachine
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...