Forums

Make EmptyKeys menu transparent to show whats behind it in the game
Last Post 02 Feb 2016 08:31 AM by Filip Dušek. 3 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
wokawakaUser is Offline
New Member
New Member
Posts:6


--
02 Feb 2016 08:17 AM
    Hey!
    I'm wondering how I go about making the emptykeys menu transparent so that I can place it over my game as in game menu.
    As an example of what I want to do, this image shows a transparent overlay menu.
    http://files.gamebanana.com/img/ss/srends/38494.jpg

    According to this SO post I need to add the "window" tag, but that makes empty keys break.
    http://stackoverflow.com/questions/8094957/transparent-background-goes-black-in-wpf

    The generated file just gets this message:
    #error Set property System.Windows.Controls.ContentControl.Content; threw an exception. Line number 1 and line position 480.


    I have a Grid containing all my things and I have set its background to transparent, but this does nothing.

    Thank you!

    P.S. I posted my XAML code here if that helps: http://pastebucket.com/98049
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:695


    --
    02 Feb 2016 08:29 AM
    Move Background="Transparent" to UIRoot in XAML
    wokawakaUser is Offline
    New Member
    New Member
    Posts:6


    --
    02 Feb 2016 08:29 AM
    Solved it.

    Add this to the initialization of the generated class:

    this.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); 
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:695


    --
    02 Feb 2016 08:31 AM

    Posted By wokawaka on 02 Feb 2016 08:29 AM
    Solved it.

    Add this to the initialization of the generated class:

    this.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); 



    Don't change generated class, it will be overwritten on next change. Change it in XAML as I posted.
    You are not authorized to post a reply.