Jump to content
LaunchBox Community Forums

Background Images for Filters View


bbweiners

Recommended Posts

Hi,

Does anyone know if there's a way to select a specific background image for the different categories in the Filters view (genre, series, developer, etc...). There is a setting in Bigbox to select a random games fanart that is within a specific filter, but I'm looking to make the image static.

Thanks!

Link to comment
Share on other sites

30 minutes ago, C-Beats said:

OH so you want an image per filter value, not what filter you were on. So for example if you select "View Genres" you don't want a generic "Genres" image, you want an image matching the name of the Genre value you are moused over?

Yes. That is correct. Is that something we can currently do?

Link to comment
Share on other sites

21 minutes ago, bbweiners said:

Yes. That is correct. Is that something we can currently do?

You CAN via XAML but it isn't very intuitive, easy or strait-forward. What you would basically do is create a invisible text box and use it to build the string to the path the image is in (using static strings and SelectedFilter.Name binding). Then in the image control point to the text box Text binding to get the image (if it's there).

Link to comment
Share on other sites

43 minutes ago, C-Beats said:

You CAN via XAML but it isn't very intuitive, easy or strait-forward. What you would basically do is create a invisible text box and use it to build the string to the path the image is in (using static strings and SelectedFilter.Name binding). Then in the image control point to the text box Text binding to get the image (if it's there).

Yeah, that sounds a bit above my head. I've done a fair amount of stuff with xaml and creating themes, but I'm not a programmer by any stretch. Are there any example code snippets of this. Maybe @faeran would know?

Link to comment
Share on other sites

  • 2 years later...

Hello @C-Beats. I want to do exactly the same thing! In TextFiltersView, I want to use a specific background image for each genre, for each series, etc.

I've created a folder for this: LaunchBox\Images\FiltersView\
In this folder are the images, for example, for the genre Action, an image named 'Action.jpg'
Based on your proposed solution, I've created the following code to generate the path to the images and specify it in the Image Control as the Source:

 

<TextBlock x:Name="FileName" Visibility="Collapsed">
    <TextBlock.Text>
        <MultiBinding StringFormat="{}pack://siteoforigin:,,,/Images/FiltersView/{0}.jpg">
            <Binding Path="SelectedFilter.Name" />
        </MultiBinding>
    </TextBlock.Text>
</TextBlock>



<Image Source="{Binding Text, ElementName=FileName}" />

 

However, it doesn't work, and no background image is displayed.
After carefully reading LaunchBox\Themes\Documentation.pdf, I noticed that there is actually no binding named SelectedFilter.Name! So, I misunderstood something here...
I hope you can help me solve the problem.

Edited by Khaar
Link to comment
Share on other sites

3 hours ago, Khaar said:

Hello @C-Beats. I want to do exactly the same thing! In TextFiltersView, I want to use a specific background image for each genre, for each series, etc.

I've created a folder for this: LaunchBox\Images\FiltersView\
In this folder are the images, for example, for the genre Action, an image named 'Action.jpg'
Based on your proposed solution, I've created the following code to generate the path to the images and specify it in the Image Control as the Source:

 

<TextBlock x:Name="FileName" Visibility="Collapsed">
    <TextBlock.Text>
        <MultiBinding StringFormat="{}pack://siteoforigin:,,,/Images/FiltersView/{0}.jpg">
            <Binding Path="SelectedFilter.Name" />
        </MultiBinding>
    </TextBlock.Text>
</TextBlock>



<Image Source="{Binding Text, ElementName=FileName}" />

 

However, it doesn't work, and no background image is displayed.
After carefully reading LaunchBox\Themes\Documentation.pdf, I noticed that there is actually no binding named SelectedFilter.Name! So, I misunderstood something here...
I hope you can help me solve the problem.

a bit out of the loop in regards to what you're referring to but all filters view have SelectedFilter binding and they all have the Name property on them

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...